Skip to content

SAMAHAN-Systems-Development/ACMS-backend-2023

Repository files navigation

ACMS Backend

More info at ACMS Documentation

Tools that needs to be installed:

Tech Stack

  • 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

Database Design:

Student

Type Column Name
String uuid
String name
String email
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

Setting up your application

  1. Clone the Repository:
git clone https://github.com/SAMAHAN-Systems-Development/ACMS-backend-2023
  1. Fetch the updates:
git fetch
  1. Switch to the branch of your ticket, for example:
git checkout 1-login-of-facilitator-cashier-and-admin
  1. Install the libraries with this command:
npm i
  1. Install and create the docker containers with this command (make sure that you already started your docker application):
npx supabase start
  1. Add a .env file

    1. Create a .env file in your root directory
    2. 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';
  2. Update the database by the Prisma migrations with these commands:

npm run prisma:migrate:reset
npx prisma generate

Running your application

If you just turned your pc on and you want to start the application, run the following commands:

  1. Pull from the main
git pull origin main
  1. Install the libraries
npm i
  1. Run the docker containers (make sure that you already started your docker application)
npx supabase start
  1. Run the NestJS backend
npm run start
  • 📌 After you finish programming, run this command to stop the docker containers:
    npx supabase stop

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published