-
Notifications
You must be signed in to change notification settings - Fork 1
Folder Structure
zechajw edited this page Jun 29, 2022
·
6 revisions
If you are new to the repo, do take some time reading this section in order to familiarize yourself with the structure of the project as well as the responsibilities of each folder so that you can quickly learn how to navigate the codebase.
/skylab-backend
├── ./github
├── /prisma
│ ├── /migrations
│ └── schema.prisma
└── /src
├── /environments
├── /errors
├── /helpers
├── /models
├── /routes
├── /utils
├── index.ts
└── server.ts
- Contains
.yml
files that are responsible for configuring GitHub actions - These actions help to run automated checks such as linting, formatting and testing to ensure code quality and consistency
- Contains all the files necessary to initialize and utilize Prisma, the ORM connector between Express and the PostgreSQL Database
- The
/migrations
folder contains.sql
files representing the migrations of the database as the schema changes - The
prisma.schema
file contains the schema definition of the current PostgreSQL Database
- Contains the source code powering the Skylab Backend Server
- This directory is split into several subdirectories, with the main ones being
models
,helpers
, androutes
- Contains methods that interface with the database directly
- This involves generic implementations of SQL queries available via the Prisma Client (e.g.
findMany
,delete
,update
) - Helper methods interface with these methods using Prisma arguments that tailor the output to the specific use cases.
- Contains helper methods that are specific to each use case
- Contains the Express routes that are exposed to the client
- More information on the HTTP Request Documentation is available in the Endpoints section of the GitHub Wiki
- Contains utility files that are used throughout the application
-
ApiResponseWrapper.ts
: Abstracts the Express Response functionality for easier handling -
HTTP_Status_Codes.ts
: A library of HTTP Status Codes to ensure consistency throughout the application -
Emails.ts
: Constants used by our SendInBlue Email Service
- Contains custom error files that are used throughout the application
-
SkylabError.ts
is a custom error wrapper that allows HTTP status codes and error metadata to be passed alongside error information.
-
Auth Endpoints
/api/auth
-
Users Endpoints
/api/users
-
Students Endpoints
/api/students
-
Advisers Endpoints
/api/advisers
-
Mentors Endpoints
/api/mentors
-
Administrators Endpoints
/api/administrators
-
Cohorts Endpoints
/api/cohorts
-
Deadlines Endpoints
/api/deadlines
-
Projects Endpoints
/api/projects
-
Dashboard Endpoints
/api/dashboard
-
Evaluation Relationships Endpoints
/api/relations
-
Submissions Endpoints
/api/submissions
-
Announcements Endpoints
/api/announcements
-
Application Endpoints
/api/application
-
Vote Events Endpoints
/api/vote-events