This monorepo contains a Next.js web application and a NestJS API, orchestrated with Docker Compose for infrastructure.
- Web: Next.js (TypeScript, Tailwind, ESLint)
- API: NestJS (TypeScript, Prisma, IORedis)
- Database: PostgreSQL (Dockerized)
- Cache: Redis (Dockerized)
- Node.js (v18+)
- Docker & Docker Compose
Run everything (install, db setup, start apps) with a single command:
./start.sh-
Install Dependencies
npm install
-
Start Infrastructure (Postgres & Redis)
docker-compose up -d
-
Initialize Database Go to the API directory to set up Prisma:
cd apps/api npx prisma migrate dev --name init npx prisma db seed cd ../..
-
Run Applications Run both apps (requires
concurrentlyif configured in root, or run separately):Web (Next.js):
npm run dev -w apps/web
Runs on http://localhost:3000
API (NestJS):
npm run start:dev -w apps/api
Runs on http://localhost:3000 (Wait, default is 3000, Next.js is 3000. You need to change API port!)
Note: Next.js and NestJS both default to port 3000. Configuring API to port 3001.
- API Port: Update
apps/api/src/main.tsto listen on 3001. - Environment:
apps/api/.env:DATABASE_URL="postgres://vibe_user:vibe_password@localhost:5432/vibe_db"