- Node.js v22+
- Express – HTTP server
- TypeScript
- pnpm – package manager
- tsx – runner TS/ESM
- Vitest – test runner
- Supertest – tests E2E
- Prettier – format
pnpm dev # Start dev server with tsx in watch mode (NODE_ENV=local)
pnpm build # Compile TypeScript to ./dist
pnpm start # Run compiled code from dist (NODE_ENV=production)
pnpm test # Run all tests with Vitest
pnpm format # Run Prettier on the whole repoFrom the .env.example you must create -> .env and .env.production
- NODE_ENV
Used only to decide which .env.* file to load.
Current logic:
If NODE_ENV=production → .env.production will be loaded
For any other value → .env will be loaded
Important: NODE_ENV does not control authentication or app behavior, it only determines which .env file is loaded.
docker compose up -d
Creates the services: postgres and pgweb
The API is documented with OpenAPI 3 and served with Swagger UI.
Interactive UI: http://localhost:3000/swagger
Raw spec (JSON): http://localhost:3000/swagger.json
Source spec (YAML): src/docs/openapi.yaml
Place and filename
The Postman collection is stored at: tests/ApiCallCollection/managements.json.
How to import
Open Postman, choose "Import" → "File", and select the JSON file from the path above.
Alternatively, copy the JSON content and use "Import" → "Raw text" in Postman.
Authentication
Most endpoints require a JWT in the Authorization header.
Example requests included
GET /health — public health check.
GET /api/managements — list managements (summary).
POST /api/managements — create management (JSON body example provided).
GET /api/managements/{id} — retrieve management details.
DELETE /api/managements/{id} — delete a management.
GET /api/managements/company/{companyId}/role/{role} — filtered listing by company and role.