Sprint documents are located at docs/sprint
- Jared Scott
- Peter Allen (Gone)
- Braysen Goodwin
- Nathan Johnson
Dan from Dan's Bagels would like a web-based application to manage and operate his bagel shop. See the google drive for living documents.
- Server Code Reviewer: Braysen Goodwin
- Front End Code Reviewer: Jared Scott
- Back End Developers: Braysen Goodwin and Nathan Johnson
- Fron End Developers: Jared Scott and Peter Goodwin
We will be using an agile development method for this project. We will have sprint planning every Monday after class between 2:30pm-3:00pm to determine tasks for the week, and standup/scrum on Wednesday and Friday after class between 2:30pm and 3:00pm.
- client
- react - front end rendering
- styled-components - css manager
- react-redux - front end state manager
- react-query - back end (server) state manager
- axios - back end (server) communication manager
- react-testing-library - testing framework (extends jest testing framework)
- yarn - package (dependency) manager
- flow - type hinting
- eslint - code syntax enforcer
- server
- database
- mongoDB - database (none sql)
- Discord (Communication and video conferencing)
- Canvas (General class communication)
- Git (For version control and code review)
- Google Drive (For file sharing)
- variables:
- All caps for Constants
- Lower camel Case for variables
- Upper camel case for components and classes
- files:
- files which export component(s) or classes have UpperCamelCase names
- folders which contain an
index.js
file which exports a component, then the name is UpperCamelCase, else the folder name is lowerCamelCase.
- no code should be referenced between the
server
andclient
folders. - server
- all url end points should exist within the
routes
folder. - all shared functions between files should exists outside the
routes
folder. - all mongoose models should exist within the
models
folder.
- all url end points should exist within the
- client
- all url routes should be handled by a single parent (wrapper)component in a file or folder within the
routes
folder.
- all url routes should be handled by a single parent (wrapper)component in a file or folder within the
These are not hard rules, but they should be followed whenever possible.
- client
- all persistent variables values (values which persist between renders) should be treated as immutable (you can use immer for easy immutability).
- all colors, fontsizes, and spacing (padding and margin) should be based off the theme supplied by (styled components )[https://styled-components.com/docs/advanced#theming].
- All code files and code documentation is handled by git.
- Before merge to
master
(ordev
) all merge/pull requests must be reviewed by at least one other member (preferably by the appropriate reviewer - Braysen for back end, Jared for front end). - Living documents are in google drive.
- server (uses jest)
- unit tests should be created for any general functions (if unable to test separately, it should be tested in the system it is used).
- each route should be tested for good and bad data.
- client (uses jest with react-testing-library)
- generalized components should be tested individually (if none-trivial).
- server queries should have a mock implementation in the client.
- routes should be tested as a whole.
- system
- manual testing of the client and server (combined) should be done each week on saturday.
- navigate to the client or server folder and run
yarn test
(majestic can be used if you want a GUI).
- check out the master branch of both client and server.
- use setup instructions.
- use the client to try to break everything.
- write down what is broken, and steps to recreate.
- bugs will be discussed during sprint planning the next Monday.
- install node version manager (nvm) [mac:
brew install nvm
] - install and use node version 10
nvm install 10 && nvm alias default 10
- install yarn
npm install -g yarn
- install mongoDB community edition
- install dependencies
cd ./server && yarn && cd ../client && yarn
- navigate into the client folder and run
yarn
- navigate into the server folder and run
yarn
- navigate into the client folder and run
- navigate to server folder and copy the file
.env.example
to.env
- navigate to the client folder and copy the file
.env.development
to.env
- install google chrome
- install google chrome extensions
- install react developer tools
- install redux developer tools
- start server
- start mongoDB server, see mongoDB documentation
- navigate into the server folder and run
yarn dev
- start client
- navigate into the server folder and run
yarn start
- navigate into the server folder and run
- there is no client way to create an Admin or the first manager
- You will have to create a customer user and then use the
mongo
command (on the terminal) to update the user role with the following commands
To make manager
>> use accounts
>> db.users.update({email: <user-email>}, {$push: {roles: "MANAGER"}})
To make admin
>> use accounts
>> db.users.update({email: <user-email>}, {$push: {roles: "ADMIN"}})
where <user-email>
is replaced with the email of the user to update the roles on.