Skip to content

Outline for the project

Raul Becker edited this page Apr 30, 2018 · 20 revisions

Project outline

Our course project work consists of separate frontend and backend NodeJS applications.

Files associated with the frontend are found in the path /labtool2.0 and the Dockerfile from the repository root. All files associated with the backend are found under /backend path.

Frontend

  • react-scripts are used for something
  • redux-thunk?

Backend

  1. Is a plain NodeJS implementation
    • less facepalming than with react-scripts
  2. Uses Express for application routing into Ruby on Rails alike controllers
    • asd
  3. Sequelize ORM is being used as the database backend with its models.
    • asd
  4. Somewhat Ruby on Rails alike application helpers implemented but differentiating
    • /backend/server/helpers/application_helper.js intended to store application wide commonly used functions
    • each controller has its own helper which imports functions from application_helpers and exports them along with the functions associated only to the controller.
    • perhaps not the best way
  5. Middlewares located in /backend/app.js and are run before any request is processed
    • extractToken: reads the header Authorization and extracts the token and saves it in the request.token variable
      • perhaps unnecessary completely since the next function may be the sole consumer of the variable
    • authenticate: uses request.token and decodes it with jwt and sets request.authenticated as a json which indica
      • application_helpers.js has
  6. Admin page /admin path not in interaction with the frontend.
    • implemented using PUG layout which is again Ruby on Rails alike having its view template in the path /backend/views/index.pug