Project Setup
This guide covers two main scenarios: quick local development and the contribution workflow required for submitting changes.
Quick Local Development
This method is ideal for quick features development or debugging. It runs the Next.js dev server on your host machine and connects to a PostgreSQL database running in Docker.
Prerequisites
Steps
- Clone & Install:bash
git clone https://github.com/Priveetee/Mood.git cd Mood bun install - Configure Environment:bashEnsure
cp .env.example .envNEXT_PUBLIC_APP_URLis set tohttp://localhost:3000and generate aJWT_SECRET. - Start Database:bash
docker-compose up -d postgres - Apply Migrations:bash
bunx prisma migrate dev - Run Dev Server:
bash bun run devThe application will be accessible at http://localhost:3000.
Contribution & Pre-PR Workflow (Recommended)
This is the required workflow for submitting a Pull Request. It ensures your changes work correctly in a clean, containerized production-like environment. This process builds the application, runs linting, and catches errors that your local dev server might miss.
Prerequisites
Steps
- Clone & Configure: Follow steps 1 and 2 from the quick setup.
- Build and Run the Full Stack:bashThis single command builds the application image, starts both the web server and the database, and automatically applies migrations via the
docker compose up --build -dentrypoint.shscript.
If the containers start successfully, your changes are ready to be pushed for a Pull Request. For a detailed explanation of this process, see the Deployment page.