Experience · Backend · Active
cs-tools api
NestJS BFF for CS Tools, owning catalog persistence and same-origin product APIs while delegating login, setup and session resolution to platform-auth-service.
- NestJS 11
- Prisma
- PostgreSQL
- class-validator
- helmet
- cookie-parser
Spec sheet
Repository path
cs-tools/apps/api
Runtime
NestJS 11 BFF
Default port
3006
Public surface
Same-origin /api on tools host
Database
tools-postgres via Prisma
Responsibilities
- Expose health, auth status/login/setup/logout and catalog APIs.
- Resolve product sessions through platform-auth-service.
- Persist folders, tools and content pages through Prisma.
- Keep catalog controllers thin and domain logic inside services.
- Keep Core HTTP calls isolated in small platform-auth client modules.
Interfaces and contract surface
- GET /api/health
- GET /api/auth/status
- POST /api/auth/setup
- POST /api/auth/login
- POST /api/auth/logout
- GET /api/catalog/navigation
- GET /api/catalog/folders
- GET /api/catalog/folders/:folderSlug/tools/:toolSlug
- GET /api/catalog-admin/tools
- POST /api/catalog-admin/tools
Consumers
Dependencies and external touchpoints
- platform-auth-service
- cs tools shared
- PostgreSQL
Notes
- The local-stack entrypoint runs Prisma migrate deploy and generate before Nest watch.
- Platform auth outages are surfaced instead of silently dropping the session except for expected 401/403 session failures.
Source references
cs-tools/apps/api/package.jsoncs-tools/apps/api/prisma/schema.prismacs-tools/apps/api/src/authcs-tools/apps/api/src/catalog