Architecture
Raiken is built as a monorepo with a clear separation between the CLI, dashboard, and core logic.
Modules
| Module | Location | Responsibility |
|---|---|---|
| CLI | apps/cli | Runs the server, detects project info, starts the agent |
| Dashboard | apps/dashboard | UI for prompts, results, and test management |
| Core | libs/core | Code graph, DOM capture, test generation, orchestration |
| Shared | libs/shared | tRPC router, shared types, config |
Data flow
- Developer runs the CLI.
- CLI starts a local Fastify server.
- Dashboard connects via tRPC.
- Core builds a code graph and stores it in
.raiken/raiken.db. - The agent captures DOM context and generates tests.
Example request timeline
T+0s CLI started and project loadedT+2s Code graph refreshedT+4s DOM capture snapshot receivedT+6s Test generated and streamed to UIPorts
- CLI server:
http://localhost:7101 - Dashboard (dev):
http://localhost:4200
Local state
Raiken keeps local state under .raiken/ so it can:
- track project structure over time
- cache embeddings and analysis
- store entry points and file metadata