Developer
Architecture
High-level system design for Ragnarock services.
Ragnarock splits product UI, business API, and AI execution across three runtimes connected by Postgres, Redis, and optional Typesense.
Repositories
| Repo | Role |
|---|---|
| ragnarock | Next.js 16 web app |
| ragnarock-backend | NestJS monorepo — API, auth, Prisma, embedded agent Docker build |
| ragnarock-agent | Standalone FastAPI worker (same code as backend/agent/) |
| ragnarock-docs | Fumadocs documentation site |
Communication patterns
| Pattern | Used for |
|---|---|
| REST (JSON) | CRUD — projects, docs, tasks, integrations |
| Better Auth HTTP | Sessions, orgs, 2FA — /api/auth/* |
WebSocket /ai-chat | Live AI turn updates (cookie auth on handshake) |
| Redis Streams | Async agent jobs — no HTTP timeout between API and worker |
| GraphQL (outbound) | Linear API only |
Data stores
| Store | Purpose |
|---|---|
| PostgreSQL | Primary app data (Prisma) |
| pgvector DB | Agent semantic memory |
| Redis | Sessions cache, AI job queue |
| Typesense | User search indexing |
| Local/S3 | Uploads (requirements files, exports) |
AI job flow
- API validates project membership and enqueues payload to
stream:ai-requirements:jobs. - FastAPI worker reads job, routes via LangGraph (
requirements,developer_intelligence,planner,qa_intelligence). - Worker writes result to
stream:ai-requirements:results. - API consumer persists messages and broadcasts to connected clients.
API documentation
- Main API Scalar UI:
http://localhost:8000/docs - Agent health:
http://localhost:8100/health