omscentral

Monorepo for omscentral.com containing the following projects:

Getting Started

To install top-level dependencies:

npm ci

Before proceeding, follow the instructions in project-specific READMEs in the order above (graphql, server, then client).

Scripts

npm run format

Formats all source code and package.json.

npm test

Tests services.

npm run dev

Starts services in development mode w/hot-reload.

npm run build

Builds services.

npm start

Starts services in production mode. Note: You must run npm run build first.

npm run cypress

Runs cypress integration tests that enforce correct behavior. Requires the application to be up with npm run dev or npm start first.

npm run cypress:clean

When finished, users created during tests may be cleaned up using this script.

System Architecture

OMSCentral is a web application written primarily in TypeScript.

This section provides a high level summary of the current architecture:

system architecture diagram

Client

  • The client is a React single-page-application (SPA) that allows users to see anonymous reviews.
  • Authenticated users may also publish, edit, or delete reviews that they own.

Technologies

The following is a short list of technologies used, ordered by category:

UI

Logging

  • sentry is used for error reporting and logging.

Communication

  • graphql is a query language used to communicate between the client and the server.
  • apollo is a graphql client library.

Deployment

Build

  • eslint for build time linting and static analysis.
  • prettier is used for code formatting.

Testing

  • cypress is used for writing tests.

Please refer to client/package.json file for the most up-to-date list of dependencies used with version numbers mentioned.

Server

  • Persists course reviews and semester information to the database (see persistence section below).
  • Updates the statistics for courses (e.g average workload, minimum rating etc.).

Technologies

The following is a short list of technologies used, ordered by category:

Framework

Database IO

  • objection is used for Object Relational Mapping (ORM).
  • knex is used as a query builder.

Async

  • bluebird is used for access to synchronization primitives like promises in JavaScript.

Logging

Please refer to server/package.json file for the most up-to-date list of dependencies used with version numbers mentioned.

Data Persistence

  • Courses, semesters, reviews, etc. is stored in postgres (relational database).
  • Server reads and writes to postgres database using objection js and knex js.

User Authentication

  • User authentication is a security layer, allowning users to register for an account.
  • After his/her credentials are verified at time of login, the user can modify review data after.
  • Identity as a Service (IaaS): Firebase.

Package Management

  • Third party dependencies are installed using npm.