Skip to content

This project was to be a replacement for Alex Daifotis '14's LabQueueV1, but it was never launched and Diana Liao '17 graduated before completion.

Notifications You must be signed in to change notification settings

PrincetonCS-UCA/LabQueueV2

Repository files navigation

Directory Structure

/api - all relevant server-side code for endpoint logic
    /v1 - top-level files are endpoint definitions
        /controllers - contains functions called at each endpoint
        /middleware - contains route middleware (functions resolved before calling the main logic of the endpoint)
        /accessors - contains functions that access database. 
    v1.js - packages up the serverside code to be included in the app
/app - contains other application code besides code for the api / endpoints
    /client - a React mess. `index.jsx` is the main entry point
    /server - other serverside code.
        /views - views (using nunjucks) that are rendered server side.

/config - contains application (serverside) configuration, including which view engines, passport setup, and database options
/enums - contains enum definitions used by the rest of the app. JS doesn't support enums, so it's a bit hacky.
/models - database models for Sequelize
/public - static files. Autogenerated, so don't edit!
/utils - one-off functions that are useful in various places
/vendor - 3rd party libraries that either weren't on npm or had to be modified

Main entry point into app is at index.js. Please also take a look at frontend.md and api.md for some design notes.

Testing

There is now a test suite that can be run with the following commands:

npm install
./test.sh

There aren't many tests right now. They are currently used to ensure that nothing breaks during development.

Other Notes

General structure of how the /api folder works is as follows:

  • User hits an endpoint, which is defined in the top-level files in the /v1 folder.
  • Any middleware for that endpoint is called
  • The endpoint function is called (which is found in the /controllers folder)
    • A controller may call functions from the repository to manipulate the database

About

This project was to be a replacement for Alex Daifotis '14's LabQueueV1, but it was never launched and Diana Liao '17 graduated before completion.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages