- 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 `
- Clone the Repository:
git clone https://github.com/SAMAHAN-Systems-Development/samahan-all-for-more-backend.git
- Fetch the updates:
git fetch
- Switch to the branch of your ticket, for example:
git checkout 3-add-category
- 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
- Generation of Jwt secret:
node -e "console.log(require('crypto').randomBytes(64).toString('hex'))"
- Duplicate the
.env.example
file and rename it to.env.
You can accomplish this manually or run this command:
For Windows:
copy .env.example .env
For Linux:
cp .env.example .env
- 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
Note the service role key
and set the value of supabase_key
in your .env file to the value of the service role key.
- Run the NestJS backend
npm run start
-
📌 After you finish programming, run this command to stop the docker containers:
npx supabase stop