- Install dependencies
npm install- Start Postgres (Docker)
create a .env file with DATABASE_URL=postgresql://postgres:postgres@localhost:5432/dive
docker compose up -d- Run Prisma migrations + generate client
npx prisma migrate dev
npx prisma generate- Seed the database
npm run prisma:seed- Start the dev server
npm run devApp runs at http://localhost:3000.
- Edit schema:
prisma/schema.prisma - Apply changes locally:
npx prisma migrate dev --name <change-name>
npx prisma generate- Reset local DB (destructive):
npx prisma migrate reset- Prisma Studio:
npx prisma studio- Run tests:
npm run test