Developer
Backend
NestJS monorepo modules and API surface.
The API lives in ragnarock-backend — NestJS 11 monorepo with apps/main (port 8000) and apps/admin (port 3001).
Monorepo layout
projects/
project-documentations/
project-requirements/
project-tasks/
ai-requirements/
linear-sync/
integrations/
repositories/
project-auth/
REST route map
| Module | Controller prefix | Notes |
|---|---|---|
| Projects | GET/POST /projects | CRUD, overview |
| Members | /projects/:projectId/members | Invites, personas |
| Documentations | .../documentations | Typed markdown docs |
| Requirements | .../requirements | Structured requirements |
| Tasks | .../tasks | Task board |
| Skills | .../skills | Agent skill markdown |
| Activity | .../activity | Event feed |
| AI | .../ai | Chat, Ragnarock, planner, QA |
| Specifications | .../specifications | Spec artifacts |
| Repositories | .../repositories | GitHub links + browse |
| GitHub search | /repositories/search | OAuth-backed search |
| Integrations | /integrations | Org-level OAuth |
| Linear org | /integrations/linear | Team/project lists |
| Linear project | /projects/:projectId/linear | Sync, import/export |
| Webhooks | /webhooks | Linear inbound |
| Users | /users | Profile |
| Auth | /api/auth/* | Better Auth handler |
Global @Auth() guard applies unless @Public(). Project routes add ProjectMemberGuard and often ProjectRoleGuard.
WebSocket
AiChatGateway — namespace /ai-chat, authenticates via Better Auth session cookies on handshake.
Database
- Schema:
libs/prisma/src/schema.prisma - 29 models, enums for tasks, documentation types, integrations
- Migrate:
bun run prisma:migrate:dev
Scripts
bun run start:dev # Main API :8000
bun run start:admin:dev # Admin API :3001
bun run test
bun run test:e2eOpenAPI
Scalar reference at /docs when the server is running. OpenAPI JSON path configured via DOCS_OPENAPI_PATH_MAIN.
Cross-reference frontend constants in ragnarock/src/api/endpoints.ts — they mirror these paths.
See Authentication and AI agents.