Skip to content

Overall Architecture

Thuy Pham edited this page Oct 9, 2023 · 4 revisions

Overview

  • The web app is supported by a Express/Node.js backend using a Firebase database and a React frontend that fetches data from the backend. The overall architecture can be visualized as such:
[Frontend]: (subscribes to data)
- Handles user input, e.g. searching on FAQ/review pages.
- Displays FAQ/review data.
  /\
  |
  |
  |
[Backend]: (retrieves data from Firebase)
- Supports database access.

Available Scripts

Root directory: cu-apts/
  • yarn start: runs the backend and frontend together on a local development
  • rm -rf node_modules & yarn install: tells yarn to add all necessary dependencies in the project. Good idea to run this if you notice some import errors after pulling new changes from main.
  • yarn start-prod: runs the backend and frontend together on a production development
Backend: cu-apts/backend/
  • yarn start: starts the server locally by running node on the dev environment (need to run yarn build first)
  • yarn dev: starts the server locally by running ts-node on the dev environment
  • yarn prod: starts the server locally by running ts-node on the prod environment
Frontend: cu-apts/frontend/
  • yarn start: runs the frontend only on the dev environment
  • yarn start-prod: runs the frontend only on the prod environment