More info at ACMS Documentation
- Docker (https://docs.docker.com/desktop/install/windows-install/)
- Node (https://nodejs.org/en/download)
- NestJS CLI (https://docs.nestjs.com/cli/overview)
- VS Code (https://code.visualstudio.com/)
- NestJS - Back-end Framework
- Prisma - Object Relational Mapping (ORM) Tool
- Supabase - Database, Storage and Authentication Provider
- PostgreSQL - Database Management System
- Docker - Containerization Tool
- Git/Github - Version Control
Student
Type | Column Name |
---|---|
String | uuid |
String | name |
String | |
String | year_and_course |
Payment | payment |
Event | event |
Payment
Type | Column Name |
---|---|
Student | student |
String | photo_src |
String | status |
Event
Type | Column Name |
---|---|
String | title |
String | price |
Integer | people_max_limit |
Boolean | requires_payment |
String | description |
Boolean | isActive |
String | formName |
Student | student |
- Clone the Repository:
git clone https://github.com/SAMAHAN-Systems-Development/ACMS-backend-2023
- Fetch the updates:
git fetch
- Switch to the branch of your ticket, for example:
git checkout 1-login-of-facilitator-cashier-and-admin
- Install the libraries with this command:
npm i
- Install and create the docker containers with this command (make sure that you already started your docker application):
npx supabase start
-
Add a .env file
- Create a
.env
file in your root directory - Add this to your
.env
file:
DATABASE_URL='postgresql://postgres:postgres@localhost:54322/postgres?schema=public'; DIRECT_URL='postgresql://postgres:postgres@localhost:54322/postgres?schema=public'; SUPABASE_URL='http://127.0.0.1:54321'; SUPABASE_KEY='supabase_key'; FRONTEND_URL='http://localhost:3001'; NODE_ENV='development';
- Create a
-
Update the database by the Prisma migrations with these commands:
npm run prisma:migrate:reset
npx prisma generate
If you just turned your pc on and you want to start the application, run the following commands:
- Pull from the main
git pull origin main
- Install the libraries
npm i
- Run the docker containers (make sure that you already started your docker application)
npx supabase start
- Run the NestJS backend
npm run start
- 📌 After you finish programming, run this command to stop the docker containers:
npx supabase stop