Code Monkey home page Code Monkey logo

the-burger-joint's Introduction

README

This is the readme file for Group 5's Restaurant Ordering System

General Setup - For Running the Application

Steps for getting the project running (Within an IDE)

  1. CD into the frontend folder in a new terminal window
  2. Run npm install (to install frontend libraries)
  3. In a new terminal window CD into the backend folder.
  4. Run npm install (to install backend libraries)
  5. Within the frontend folder run npm start (which will build the application on your local machine)
  6. Within the backend folder, run npm start OR npm run dev (which will build the backend api on your local machine)

.env files are needed for the Frontend and Backend (TO DO for R2, configure the pipeline to read and use stored env variables for deployment).

Repository Structure

The repository is divided into two primary sections:

  1. frontend - Contains the code and logic for displaying all of the pages and its components to the client.
  2. backend - Contains the server-side code and logic for all the API routes and handling data transfer between the database and frontend.

Branching Strategy

For the branching strategy, we utilized feature branches for our features which were merged into the main branch upon completion The approach used is detailed below:

  1. Before working on a new feature, perform a git pull from the main branch to fetch and sync your machine with the latest changes.
  2. Once pulled, create a new feature branch for your features with the following naming convention [Name Initials-Feature]
  3. Once the branch has been created and the feature has been developed, the group member will push their changes to GitHub and create a corresponding PR (Pull Request) into Main.
  4. Once the PR has been created, the team member should provide a corresponding title and description of their PR as well as assigned group members to the PR for review.
  5. Once the PR has been reviewed and the corresponding pipeline checks and unit tests have passed, members should merge into main and repeat steps 1 - 5 for their next feature.

Testing

To ensure that the features developed are working as intended, we created corresponding unit tests for our features. To run the unit tests If the unit tests are related to frontend

  1. Cd into the frontend folder
  2. Run npm install (to install all of the required libraries)
  3. run npm run test OR npm run ci:unit
  4. After running, users should see the test results in the console as well as a generated XML of the test results.

If the unit tests are related to backend

  1. Cd into the backend folder
  2. Run npm install (to install all of the required libraries)
  3. run npm run test OR npm run ci:unit
  4. After running, users should see the test results in the console as well as a generated XML of the test results.

To run the unit tests

  1. To run the tests locally, simply run npm run tests which will run all the test files
  2. To run the tests within the pipeline, upon all code pushes, pull requests and merges, the pipeline will execute and run all the test files (as a part of the pipeline configuration)

To view the results of the tests

  1. Locally, this will be displayed within the terminal after running each test as well as the generated XML file.
  2. Within the pipeline, the results of the tests will be displayed within the Test Run section of the pipeline as well as within the Test Tab of each pipeline job.

Contributions

Michael Jiang (Cart and Ordering System)

  • Cart page and all cart-related components in the front-end
  • Frontend utilities
  • Redux store
  • Navbar setup, cart icon and cart items display in navbar
  • All coupon and extras related items in the backend

Kenny Doan (Menu and Sales Management)

  • Menu page and the search bar and sidebar component
  • Sales Management page and the graph and table component
  • Dish and Orderline (models, controllers and routes) in the backend

Michael Scovell

  • Account Profile Page (AccountDetails.js)
  • Order History Page (orderHistory.js)
  • Profile Component (AccountProfile.js).
  • Login and Registration functionality using Auth0.
  • Profile API (Profile Controller) + Accompanying unit tests (profileController.test.js)
  • JWT Bearer Token for authentication (JWT Middleware within server.js)
  • Route protection for frontend and backend APIs and routes (checkJWT function added to protected routes on server.js + header checks on frontend routes).
  • MFA for Login and Registration within Auth0.
  • RBAC Role and Policies for Admin (with corresponding route permissions added to check the supplied JWT for the corresponding roles need to access admin related capabilities).

Daniel Creak

  • Frontend
    • Products page
    • AddProduct, EditProduct, ProductItem components
    • ProductContext context, useProductContext hook components
    • Small bit of css formating in index.css
    • Small bit of formatting in public/index.html for icons on products page
  • Backend
    • productController
    • productController.test in test folder
    • sample data files for mongoDB (except coupon and extras samples)
    • products.js routes file

Nicholas Harrison

  • Ticket.js & AdminTicket.js Pages & Ticket Components in frontend
    • ActiveTicket.js
    • ResolvingTicket.js
    • ResolvedTicket.js
  • Checkout.js & ReciptHistory.js Pages & Components in frontend
    • CheckoutBar.js
    • CheckoutItems.js (Removed)
    • ReciptDetails.js
  • Ticket & Recipt Route, Model & Controller in backend
  • Added POST method & API route to OrderLine controller & route

the-burger-joint's People

Contributors

elmiang avatar riverkid99 avatar minoka5105 avatar danielcreak avatar michaelscovell avatar daniel-c-uts avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.