This project is a fullstack web application built with:
- ✅ Next.js (App Router)
- 💾 PostgreSQL via Docker
- 🔍 Prisma for database access
- 📬 React Hook Form and Zod for validation
- 🧪 Vitest for unit tests
- 🎭 Playwright for end-to-end testing
- Node.js (v22 or later)
- Docker & Docker Compose
- npm
git clone git@github.com:alexfqc/next-auth-tasks.git
cd next-auth-tasksnpm installcp sample.ev .envCreate the file .env.test and add the env vars
DATABASE_URL="postgresql://postgres:postgres@localhost:5433/test_db"
IS_TEST=trueCreate the file .env.playwright and add the env var
DATABASE_URL="postgresql://postgres:postgres@localhost:5434/playwright"
IS_TEST=truedocker compose up -dThis will spin up:
- postgres_dev (port 5432)
- postgres_test (port 5433)
- postgres_playwright (port 5434)
- pgadmin (port 5050)
npx prisma db pushGenerate the Prisma Client:
npx prisma generatenpm run devVisit http://localhost:3000 to access the app.
npm run test:servernpm run test:ui npm run run:e2e npm run test:e2eAccess pgAdmin at http://localhost:5050
Email: admin@admin.com
Password: admin
Hostnames (Connections tab):
postgres_dev → port 5432 → username postgres → password postgres → maintenance database dev_db
postgres_test → port 5432 → username postgres → password postgres → maintenance database test_db
postgres_playwright → port 5432 → username postgres → password postgres → maintenance database playwright
If prisma db push fails, ensure Docker is running and .env is properly set.