-
Create and setup your .env file: Refer to .env.example
-
Install Dependencies - this project uses pnpm over npm or yarn to optimize performance and minimize dependency conflicts. Installing pnpm.
Run the following in the terminal in the root directory of the project.
pnpm installYou may encounter warnings if you do not have the correct version of Node installed. This project uses the version in .nvmrc file (currently 20.11.0). When working with Node, it is highly recommended to use nvm (Node Version Manager). nvm Documentation. Once you have nvm, you can type
nvm useto use the correct version. -
Setup Local Database - PostgreSQL
-
Starting docker container. First make sure that you have Docker installed. Getting Started With Docker.
Once Docker is installed and the Docker daemon is running (start Docker Desktop) run the following in your terminal
Additional Documentation on Building/Running Docker containers
docker-compose up -dNote: Adding the
-dflag lets the container run in detached mode allowing for it not to use a whole terminal window.When you're done, you can stop the docker container via
docker-compose down -
Seed dev database
- Push updated schema changes to database
pnpm run db:push - Seed DB based off seed.ts file (seeds mentee, mentor, and admin user and form schemas)
pnpm run db:seed - Populate DB with large number of mentors and mentees
pnpm run db:populate - (OPTIONAL) You can check contents of DB using Prisma GUI
pnpm exec prisma studio
- Push updated schema changes to database
-
-
Start the application
Run the following in your terminal:
pnpm run devThe application should now be running on http://localhost:3000.
Please make a branch from main when contributing to the project. Refer to the issues board for a list of ongoing tasks.
Naming conventions:
- Creating a new feature: feature/featureName
- Documentation/Setup: docs/description
- Bug Fix: bugfix/bugName
It is best practice to run the code linter and formatter before pushing changes to help prevent merge conflicts. To do this, run the following in your terminal:
pnpm run lint
pnpm run format