Jaredcscott / 3450-Project-Files-FooBar

A repo for submitting project milestone files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Project Milestone 4

Presentation file is located in docs/FinalPresentation.pdf

Use Case videos are located in docs/use case videos/

Group Name: FooBar

Sprint documents are located at docs/sprint

Group Members

  • Jared Scott
  • Peter Allen (Gone)
  • Braysen Goodwin
  • Nathan Johnson

Project

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.

Team Organization

  • 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

Team Planning

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.


Software Development Process

Policies, Procedures and tools

Tech stack

Tools for communication:

  • Discord (Communication and video conferencing)
  • Canvas (General class communication)
  • Git (For version control and code review)
  • Google Drive (For file sharing)

Naming Conventions:

  • 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.

Code organization:

  • no code should be referenced between the server and client 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.
  • client
    • all url routes should be handled by a single parent (wrapper)component in a file or folder within the routes folder.

Code preferences:

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].

Version Control Procedure:

  • All code files and code documentation is handled by git.
  • Before merge to master (or dev) 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.

Running Testing

Creating tests:

  • 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.

Running automated tests (system/unit)

  1. navigate to the client or server folder and run yarn test (majestic can be used if you want a GUI).

Manual testing instructions (system)

  1. check out the master branch of both client and server.
  2. use setup instructions.
  3. use the client to try to break everything.
  4. write down what is broken, and steps to recreate.
  5. bugs will be discussed during sprint planning the next Monday.

Setup

  1. install node version manager (nvm) [mac: brew install nvm]
  2. install and use node version 10 nvm install 10 && nvm alias default 10
  3. install yarn npm install -g yarn
  4. install mongoDB community edition
  5. install dependencies cd ./server && yarn && cd ../client && yarn
    • navigate into the client folder and run yarn
    • navigate into the server folder and run yarn
  6. navigate to server folder and copy the file .env.example to .env
  7. navigate to the client folder and copy the file .env.development to .env
  8. install google chrome
  9. install google chrome extensions

Starting Servers

  • start server
    1. start mongoDB server, see mongoDB documentation
    2. navigate into the server folder and run yarn dev
  • start client
    1. navigate into the server folder and run yarn start

Creating first admin or manager

  • 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.

About

A repo for submitting project milestone files.


Languages

Language:JavaScript 99.0%Language:HTML 1.0%Language:Shell 0.1%Language:CSS 0.0%