System Design
CleverCase V2 container architecture, request flow, data model, AI integration, and security layers
System Design
CleverCase V2 is a standalone tenant client of the Rakontevr platform. The Next.js app, Gladys agent rail, Prisma data layer, and Rusakov Shield posture compose a legal practice management surface that calls the platform over authenticated HTTP only.
Technical stack
| Layer | Technology | Notes |
|---|---|---|
| Framework | Next.js 16 App Router | Port 3001 in dev |
| UI | React 19, Tailwind CSS | Responsive, mobile-first |
| ORM | Prisma 6 | ~100 models in prisma/schema.prisma |
| Validation | Zod | Request/response schemas on domain routes |
| Auth | CC OAuth JWT + Azure Entra | resolveTenantContext is server-trusted |
| AI | Gladys → Iorek via Gateway | BFF keeps service key server-side |
| Compliance | Shield V2 | SOC 2, HIPAA, ABA 1.6 posture |
| CI/CD | GitHub Actions → GHCR/ECR | Docker multi-stage ARM64 builds |
High-level architecture
Request flow
Core data model
AI integration
Security layers
Related pages
- Rakontevr Integration — SDK, MCP, Gateway, BuilderHub
- Data Flow — Gladys SSE sequence
- Architecture Book — Rakontevr Platform — narrative deep-dive