Classbase is a database and associated API of CUNY classes and professors (right now only Queens College).
The API is currently a private-facing API, but it may be turned into a public-facing API if the need arises. It is being built under the premise that it will one day be publicly exposed.
The API exposes a PostgreSQL database containing information on courses and professors.
The database and API server can be run using Docker.
There are a few terms to become familiar with:
- Course: A generic course given at a college. E.g. 'CSCI 120'.
- Class: A specific instance of a course. E.g. 'CSCI 120, Section 3, Fall 2019'.
- Professor: Someone who taught a class. Each class has an associated professor.
The API has a few layers at a high level:
- The REST API: Clients (e.g. Gradebot) will interface with this. It presents all data at a high level as JSON objects.
- The database accessors: An internal, non-HTTP API (e.g. Node functions) that will be used to interact with the database. It contains the business logic and regulates access.
- The database itself: A PostgreSQL database. It currently does not have much logic programmed into it. Since this is a smaller project, there are no current plans to add any.
At a lower level, the API is split into 5 distinct layers:
- Routes: Route requests to certain paths to the correct controller.
- Controllers: Handle the different types of requests for a given path, at a higher level. The HTTP context ends here.
- Services: Contain the majority of the business logic.
- Accessors: Interacts directly with the database (data access). Makes simple requests.
- Database: Currently a Postgres database.