The official Backend Repository of SmartCampus, a facility reservation system for Mapua Malayan Colleges Mindanao.
- NestJS - Back-End Framework
- Prisma - Object Relational Mapping Tool
- Supabase - Database, Storage and Authentication Provider
- PostgreSQL - Database Management System
- Git/Github - Version Control
- Swagger - API Endpoint Documentation and Testing
- Thunder Client - API Endpoint Testing
Type | Column Name | Type |
---|---|---|
String | id | uuid default |
String | supabaseId | unique |
String | username | |
String? | fullName | optional |
String? | idNum | optional |
String | unique | |
String | password | |
Role | role | |
Reservation[] | Reservation | |
Feedback[] | Feedback[] |
Type | Column Name | Type |
---|---|---|
String | id | uuid default |
String? | department | optional |
String? | purpose | optional |
String? | professorName | optional |
String? | classGrade | optional |
String[] | equipments | optional |
Int[] | equipmentQty | optional |
Date | fillingDate | default (now()) |
Date | startDate | |
Date | endDate | |
Status | status | |
Role | role |
Type | Column Name | Type |
---|---|---|
Int | id | autoincrement default |
String? | roomNum | optional |
String | name | |
String? | description | optional |
Int? | capacity | optional |
- STUDENT
- TEACHER
- STAFF
- CONFIRMED
- PENDING
- CANCELLED
- FINISHED
- Clone the Repository
git clone git@github.com:louispawaon/smartcampus-backend.git
or
git clone https://github.com/louispawaon/smartcampus-backend.git
- Fetch for updates
git fetch origin
- Install the necessary libraries
npm i
- Add a
.env
file locally based on the.env.example
file - Update the database by the Prisma Migrations
npx prisma migrate reset
npx prisma generate
npx prisma migrate dev
You may either perform the following:
- Run the NestJS Back-End in development mode
npm run start:dev
- Run the NestJS Back-End with Hot-Reloading
npm run start:hot
- Perform Code Linting
npm run lint
- In cases that the database is reset, perform seed operation
npm run seed