Full-stack authentication test task for a React/Vite frontend and NestJS/MongoDB backend.
Use Node 22.14.0 and pnpm 10.26.2.
pnpm install
cp .env.example .env
pnpm infra:up
pnpm migrate:up
pnpm validateRun the API and web app together:
pnpm --parallel --stream --filter @easygen/api --filter @easygen/web run devOr use the Makefile shortcuts:
make setup
make infra
make dev
make validateapps/
api/ NestJS API, Swagger docs, MongoDB module, tests
web/ React + Vite app shell
migrations/ migrate-mongo migration files
packages/ Shared workspace packages
planning/ Business and technical planning context
Copy .env.example to .env.
| Variable | Purpose | Default |
|---|---|---|
PORT |
API HTTP port | 3000 |
LOG_LEVEL |
Pino/Nest logger level | info |
WEB_PORT |
Vite dev server port | 5173 |
VITE_API_URL |
API URL used by the frontend | http://127.0.0.1:3000 |
MONGODB_PORT |
MongoDB host port | 27018 |
MONGODB_URI |
API and migration MongoDB connection string | mongodb://127.0.0.1:27018/easygen?directConnection=true |
JWT_SECRET |
JWT signing secret required by the API | empty; set in local .env |
JWT_EXPIRES_IN |
JWT access token lifetime | 15m |
docker-compose.yml starts MongoDB 8.0 on 127.0.0.1:${MONGODB_PORT:-27018}. The Compose file avoids fixed container names so worktree-specific stacks can be isolated.
For parallel git worktrees, use worktree-compose with the committed .wtcrc.json; keep migrations, app URLs, and browser QA pointed at the current worktree's .env.
GET /healthPOST /auth/signupPOST /auth/signinGET /auth/me- requires a bearer tokenGET /docsGET /docs-json
POST /auth/signupcreates a user and returns an access token.POST /auth/signinreturns an access token for valid credentials.GET /auth/meverifies the stored token and powers the protected application page.- The React app provides
/signup,/signin, and/app.
pnpm validate runs format check, lint, type-check, tests, Knip, dependency audit, and build.
Run the browser smoke test when you want full-stack UI confidence:
pnpm --filter @easygen/web exec playwright install chromium
pnpm test:browser
pnpm infra:downLicense: MIT