Skip to content

Backend Repository of SmartCampus, a facility reservation system for Mapua Malayan Colleges Mindanao

Notifications You must be signed in to change notification settings

louispawaon/smartcampus-backend

Repository files navigation

SmartCampus

The official Backend Repository of SmartCampus, a facility reservation system for Mapua Malayan Colleges Mindanao.

Technology Stack

Database Design

Users

Type Column Name Type
String id uuid default
String supabaseId unique
String username
String? fullName optional
String? idNum optional
String email unique
String password
Role role
Reservation[] Reservation
Feedback[] Feedback[]

Reservation

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

Facility

Type Column Name Type
Int id autoincrement default
String? roomNum optional
String name
String? description optional
Int? capacity optional

Role enum

  • STUDENT
  • TEACHER
  • STAFF

Status enum

  • CONFIRMED
  • PENDING
  • CANCELLED
  • FINISHED

Setting up the Application

  1. Clone the Repository
git clone git@github.com:louispawaon/smartcampus-backend.git

or

git clone https://github.com/louispawaon/smartcampus-backend.git
  1. Fetch for updates
git fetch origin
  1. Install the necessary libraries
npm i
  1. Add a .env file locally based on the .env.example file
  2. Update the database by the Prisma Migrations
npx prisma migrate reset
npx prisma generate
npx prisma migrate dev

Running your Application

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

Other Commands to rememeber

  • Perform Code Linting
npm run lint
  • In cases that the database is reset, perform seed operation
npm run seed

About

Backend Repository of SmartCampus, a facility reservation system for Mapua Malayan Colleges Mindanao

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published