Skip to content

Commit

Permalink
☄️Consolidate projects into single repo (#150)
Browse files Browse the repository at this point in the history
* 🎉 Initialize via create react native app

* 🍱 Add material ui and Roboto font

* 🚧 Get basic structure moved from web app

* 🚧 Redo home buttons layout without grid

* 🍱 Add OpenSans

* ✨ Create OpenSans font components

* 🍱 Get icons to actually work

* 💄 Decrease gaps to 8

Was 12, which was wasting just a little too much space.

* ✨ Add logo & header

* ✨ Add Algolia search logo

* ✨ Add linking to Algolia

* 💄 Create unstyled text placeholder while loading fonts

* ✨ Make Android hardware back button active

* 🚧 Create category banner and back button

* 💄 Tweak padding on category banner

* 💄 Tweak spacing on Upswyng local

* ✨ Make subcategory selector work

* 🔧 Add .env file

* ✨ Add Algolia fetching

* 💄 Lay out search results

* 🐛 Fix studder from loading fonts with each text element

* 💥 Remove styled components

* ✨ Make coordinated entry button work

* ✨ Make resource fetch happen

* ♻️ Remove extraneous import

* 🚧 Shell out resource page

* ✨ Add service types to resource page

* 📝 Create README

TODO: Verify that the data pipeline stuff mentioned in the readme is actually in the repo.

* ⬆️ Bump react-native-svg

* 📝 Add screenshot to readme

* ✨ Add map to resource page

* 📝 Add link to upswyng-web

* ✨ Add search from home screen

* ➕ Add sapper server template

* 🏷️ Add typescript support for sapper server

* ✨ Add Google Sign In

* 🗃 Setup mongo db and Resource table

* 🗃 Create method to add legacy record to database

* 🗃 Create feature to sync resources from strappd

* ♻️ Tweak the way a resource is exported and document

* 🗃 Offload service trimming to mongoose

* ✨ Remove keys with undefined values from resources

* 🗃 Create category and subcategory models

* 🗃 Add ID to ressource and update subcategory with resources

* 🏷️ Put some bandaids on the model typing

* ✨ Add categories endpoint

* ✨ Add stubs to category and subcategory

* 🗃 Add reference to parent category on subcategory

* ✨ Actually add category endpoints

* ✨ List subcategories on category page

* ✨ Add resources to subcategory page

* ✨ Shell out resource page

* ✨ Add nav link to categories

* ✨ Shell out resource modifcation form

* ✨ Create schedule input

* ✨ Create close schedule selector input

* ✨ Create services input

* 📌 Pin svelte-forms to hotfix version

The NPM svelte-forms package had an error in the logic it used to validate URL fields. The PR to upstream the fix is at [https://github.com/chainlist/svelte-forms/pull/2](https://github.com/chainlist/svelte-forms/pull/2), but in the meantime set the form version to the temporary fix.

* ✨ Add lat-lng to resource form & extract errors

* 💄 Fix up resource page

* 🗃 Add deleted field to Resource model

* ✨ Add Subcategory reference on Resource

* 📦 Fix server build and export commands

* 🗃 Add color when setting up category

* ✨ Create selector to pick subcategories for resources

* ✨ Add breadcrumbs to resource page

* 🗃 Enable creation of draft resources

* ♻️ Fix up an unused argument

* 🔥 Remove boilerplate blog routes

* 🚸 Fix up server.js minutiae

* ✨ Add saving draft resources

* 🎨 Move resources directory to /resource

* ✨ Create api route for draft resources

* ✨ Create resource display

* ✨ Enable deletion of draft resources

* 🐛 Fix broken link to subcategory

* 🔥 Remove sapper borat boilerplate

* 💄 Update Nav with login

* ♻️ Refactor out resource editor to own component

* 🐛 Fix phone validation for short numbers

* 🚧 Add Typescript to pages and start work on approve route

* ✨ Create diffResource utility function

* ✨ Create removeResourceFromCategory utility function

* ✨ Enable approving a draft resource for update of an existing resource

Code is all here (I think) but I still need to test it, at least manually.

* 💚 Fix server-build

* 🚀 Setup heroku config

* 🏷️ Remove ts from .svelte file

Build wasn't working with this. Will try again later.

* 🐛 Get category/subcategory display working

* ✨ Implement approving draft resources

* ✨ Enable adding resources to subcategories

* ✅ Fix up cypress tests

* 🐛 Fix resource diffing

* 💄 Update draft approval page to show diffs

* ✨ Block development code from using prod database

* ✨ Enable creating a new resource

* ✨ Add listing of all resources on resource page

* ✨ Add facebook login and save user to session

* ✨ Add creating users via google

* ✨ Add logout button

* 🐛 Remove stray console log

* ✨ Add error return when there's a bad login

* ♻️ Extract logic to get users from grants

* ✨ Require admin for approving and deleting drafts

* 💄 Add badge when logged in as admin

* ✨ Require admin to view and manipulate drats on pages

* 🎨 Warn, but don't fail, on more than one user in the session

* ✨ Populate subcategories when querying categories

* 💄 Update favicon

* 🎨 Autoformat template

* ✨ Track who created a resource and require logging in to create one

* 💄 Install bulma framework and rollup config

* 🏗 Add CORS support to all routes

* 🚧 Start polishing the hell out of the UI

* 🗃 Remove unique indexes on user fields

These were causing errors when users were only logging in with one service or another. The value would be undefined on the unused service and not unique.

* 💄 Add logos and make shit look nice

* 🐛 Remove oauth grant from session upon error

* 💄 Fix checkmark icon on submission buttons

* ✨ Enable trashing resources

* ✨ Add sync to algolia

* 💄 Redo error page layout with balena

* 🚧 Create resource search

Next up, make this add a resource to a subcategory.

* 🗃 Return full resource spec with category

* 💄 Add note on header if user is admin

* 🗃 Add method to get subcategory by stub

* ✨ Warn when using prod Algolia index in dev

* 🎨 Format models utility file

* ✨ Enable adding resources to subcategories from the subcategory page

* ✨ Show a notice when there are no resources for a subcategory

* 💄 Fix up the resource page

* 💄 Show user name or email on nav bar

* ⚡️ Prefetch categories, subcategories, and resources

* ✨ Add flash messaging for actions that redirect to resource page

* 🐛 Fix errors on the resource editor

* 🐛 Fix error notice on phone number

* 🐛 Make resource name require only 3 chars

Previous requirement was six, but there are some resources (eg OASOS) that are shorter

* 🗃 Add last modified by field to Resource

* 🏷️ Add svelte types

* 🐛 Fix display of address on resource diff

Was showing as [Object object]

* 🎨 Autoformat resource api index

* ♻️ Pull out flash messaging into its own utility

* 🏷️ Standardize and delinate document types vs api types

* ✅ Add jest

* ✨ Add a RRule wapper to keep resource schedules

* merge multiple repositories into a monorepo

- merged using: 'monorepo_build.sh main-repository upswyng-web:packages/upswyng-web upswyng-server:packages/upswyng-server upswyng-native:packages/upswyng-native upswyng-data-pipeline:packages/upswyng-data-pipeline'
- see https://github.com/shopsys/monorepo-tools

* 🎉 Combine upswyng packages into one repo

* ♻️ Move data-pipeline into server

* 🏷️ Fix up type problems with config

* 🏗 Modify setup to use 'lerna bootstrap'

* 🚑 Get server to build in monorepo

* 🏷️ Fix type errors in web so it compiles

* 📝 Create top level README

* 🎨 Create upwsyng-core package

* ⬆️ Fix up package-lock file

* 💚 Update travis config to bootstrap project

* 💚 Fix error with config not being found for native

* ✅ Pass server tests with no tests

* 💚 Add a ci-build to upswyng-web which bootstraps the project

* 🏗 Change local packages to be path imports

* 📌 Move styled-components type dependency to upswyng-web

* 📌 Fix up package-locks

* 🏗 Switch to yarn workspaces

* 👷 Add command to build web

* 📌 Pin server to node 10.17.0 to make netlify happy

* 📌 Tweak node version
  • Loading branch information
rhinodavid authored Nov 4, 2019
1 parent ca96764 commit 7786c0d
Show file tree
Hide file tree
Showing 255 changed files with 30,434 additions and 19,616 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
30 changes: 19 additions & 11 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,38 @@
// see https://www.robertcooper.me/using-eslint-and-prettier-in-a-typescript-project

module.exports = {
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
parser: "@typescript-eslint/parser", // Specifies the ESLint parser
extends: [
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
'plugin:prettier/recommended' // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended", // Uses the recommended rules from the @typescript-eslint/eslint-plugin
"prettier/@typescript-eslint", // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
"plugin:prettier/recommended" // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
],
parserOptions: {
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
sourceType: "module", // Allows for the use of imports
ecmaFeatures: {
jsx: true // Allows for the parsing of JSX
}
},
project: "./tsconfig.json"
},
rules: {
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
// e.g. "@typescript-eslint/explicit-function-return-type": "off",
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'react/display-name': { ignoreTranspilerName: true }
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
argsIgnorePattern: "^_"
}
],
"react/display-name": ["off", { ignoreTranspilerName: true }]
},
settings: {
react: {
version: 'detect' // Tells eslint-plugin-react to automatically detect the version of React to use
version: "detect" // Tells eslint-plugin-react to automatically detect the version of React to use
}
}
};
35 changes: 26 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,27 +1,44 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
node_modules
/.pnp
.pnp.js

# testing
/coverage
/cypress/screenshots/

# production
/build
packages/upswyng-web/build
__sapper__
__build__

# misc
.DS_Store
# configuration
.env
.env
.env.local
.env.development.local
.env.test.local
.env.local
.env.production.local
#.vscode/*
.env.test.local
config.ts

# misc
.DS_Store
.expo/*
*.jks
*.key
*.mobileprovision
*.orig.*
*.p12
*.p8
npm-debug.*
npm-debug.log*
web-build/
web-report/
yarn-debug.log*
yarn-error.log
yarn-error.log*

# DB files
/data_pipeline/all.json
# force include
!.vscode
5 changes: 5 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
trailingComma: "es5",
tabWidth: 2,
singleQuote: false,
};
12 changes: 8 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
language: node_js
cache:
directories:
- "node_modules"
node_js:
- '11'
- "11"
script:
- npm run ci-lint
- npm run build
- npm test
- yarn
- mv packages/upswyng-native/config.example.ts packages/upswyng-native/config.ts
- yarn run ci-lint
- yarn run test
1 change: 1 addition & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"recommendations": [
"ardenivanov.svelte-intellisense",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"msjsdiag.debugger-for-chrome",
Expand Down
15 changes: 15 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,21 @@
"name": "Launch Chrome against localhost",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}"
},
{
"name": "jest upswyng",
"type": "node",
"request": "launch",
"address": "localhost",
"protocol": "inspector",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/lerna",
"runtimeArgs": ["exec", "--scope", "my-package", "--", "node"],
"args": [
"${workspaceRoot}/node_modules/jest/bin/jest.js",
"--runInBand",
"--no-cache",
"packages/my-package"
]
}
]
}
15 changes: 2 additions & 13 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,6 @@
{ "language": "typescript", "autoFix": true },
{ "language": "typescriptreact", "autoFix": true }
],
"[javascript]": {
"editor.formatOnSave": false
},
"[javascriptreact]": {
"editor.formatOnSave": false
},
"[typescript]": {
"editor.formatOnSave": false
},
"[typescriptreact]": {
"editor.formatOnSave": false
},
"eslint.enable": true
"eslint.enable": true,
"typescript.tsdk": "node_modules/typescript/lib"
}
Loading

0 comments on commit 7786c0d

Please sign in to comment.