Run backend and frontend directly on your machine (without Docker).
- Node.js 18+ (Node 20 recommended)
- npm
- PostgreSQL 16+ (or any PostgreSQL compatible with Prisma configuration)
From the repository root, install dependencies in both apps.
cd backend
npm ci
cd ../frontend
npm ciCreate a backend env file from the provided example:
cd backend
copy .env.example .envIf you are not on Windows, use:
cp .env.example .envUpdate at least these values in backend/.env:
DATABASE_URLJWT_SECRET(set a long random value)
See Environment Configuration for all variables.
From backend/, run Prisma migration in development mode:
npm run prisma:migrateThis applies migrations and generates Prisma client artifacts.
From backend/:
npm run devExpected API base URL:
http://localhost:3001/api
Quick health check:
http://localhost:3001/api/health
In a second terminal, from frontend/:
npm startExpected app URL:
http://localhost:3000
In development, frontend API calls default to http://localhost:3001/api.
- Open
http://localhost:3000 - Register a user from the login page
- Confirm authenticated requests succeed (no CORS errors)
- Confirm PostgreSQL is running
- Confirm
DATABASE_URLcredentials and database name are valid - Re-run
npm run prisma:migrateinbackend/
- Confirm backend is listening on
3001 - Confirm
CORS_ORIGINinbackend/.envincludeshttp://localhost:3000
From backend/ run:
npm run prisma:generate