Backend API (Swagger / OpenAPI)
PURPOSE
Provide a live, accurate API reference for backend endpoints while the project is still early and changing quickly.
WHY ADD SWAGGER EARLY
- Keeps frontend/backend integration aligned with a single source of truth.
- Reduces onboarding time for new contributors.
- Makes endpoint discovery, payloads, and auth requirements visible without reading controllers line-by-line.
ACCESS
- Start backend (
backend):pnpm start:dev - Open docs UI:
http://localhost:3001/api - Root redirects to docs:
http://localhost:3001/→/api
Base URL and port follow
PORTinbackend/.env.
IMPLEMENTATION NOTES
- Swagger is initialized in
backend/src/main.ts. - API metadata is configured through Nest
DocumentBuilder. - Bearer authentication support is declared via
.addBearerAuth().
CONVENTIONS FOR NEW ENDPOINTS
- Add concise summaries/descriptions on controllers and DTOs using Nest Swagger decorators.
- Keep request/response DTOs typed and validated so docs remain accurate.
- Update this page if the docs path or exposure policy changes.