Architecture Overview
The six-layer system structure and full data flow across all components.
Table of Contents
2.1 Six-Layer Architecture
| Layer | Components | Language |
|---|---|---|
| Layer 1 — Presentation | React Web (Operator Workspace · Executive Dashboard) · React Native Mobile (Banker / RM) · React Web (Digital Banking Portal — treasury clients) · AI Assistant Panel (embedded, role-aware) | TypeScript |
| Layer 2 — API Gateway | Spring Boot GraphQL BFF · Spring Boot REST API · Domain services (Case · Product · Workflow · Audit · Metrics) · Portal API Gateway (customer-facing reverse proxy) · Notification Service WebSocket hub | Java · Go |
| Layer 3 — Workflow Orchestration | Temporal.io · ClientServicingWorkflow · ComplianceGateWorkflow · ProductProvisioningOrchestrator (multiple concurrent product workflows) · Signal-based human task pattern |
Java |
| Layer 4 — Agentic AI | Python / FastAPI agent service · DocumentReviewAgent · CompliancePreFillAgent · AI Assistant · OCR · NLP · LLM toolchain (framework TBD) |
Python |
| Layer 5 — Integration Services | Spring Boot adapters — one per external system · Resilience4j circuit breaker · Retry · Dead-letter queues · OpenAPI 3.0 contract per system | Java |
| Layer 6 — Data | Amazon Aurora PostgreSQL (pgvector) · Amazon S3 (document store, 7-year retention) · Amazon ElastiCache Redis (session · agent memory) | — |
All layers run on Amazon EKS. Platform and DevOps teams interact via anchita-cli — a Go single-binary CLI wrapping the REST API.
Language Allocation
| Language | Runtime | Components |
|---|---|---|
| Java 25 LTS | JVM + Virtual threads (Project Loom) | Temporal workers · Spring Boot APIs · Integration adapters · Domain services |
| Python 3 | CPython + FastAPI | AI agent service · LLM toolchain · DocumentReviewAgent · CompliancePreFillAgent |
| Go | Native binary | anchita-cli operations CLI · Notification Service WebSocket hub · Portal API Gateway |
| TypeScript | Node.js / React | Operator workspace · React Native mobile app |
2.2 System Data Flow
%%{init: {'theme': 'base'}}%%
flowchart TD
classDef client fill:#6d597a,stroke:#4a3f5c,color:#ffffff
classDef aiService fill:#e76f51,stroke:#bc4749,color:#ffffff,font-weight:bold
classDef apiLayer fill:#1d3557,stroke:#a8dadc,color:#ffffff
classDef workflow fill:#5c4a8a,stroke:#c77dff,color:#ffffff
classDef dataLayer fill:#2d6a4f,stroke:#52b788,color:#ffffff
classDef integration fill:#e9c46a,stroke:#f4a261,color:#1a1a1a
classDef external fill:#6c757d,stroke:#495057,color:#ffffff
classDef goService fill:#457b9d,stroke:#a8dadc,color:#ffffff
RM["📱 Banker / Relationship Manager\nReact Native"]:::client
Operator["🖥 Operator Team\nReact Web Workspace"]:::client
Channel["🌐 Digital Account\nOpening Channel"]:::client
AIAssistant["🤖 AI Assistant\nPython · FastAPI"]:::aiService
GQL["GraphQL BFF\nSpring Boot 3.x"]:::apiLayer
REST["REST API\nSpring Boot 3.x"]:::apiLayer
Notify["Notification Service\nGo · WebSocket hub"]:::goService
Temporal["Temporal.io\nWorkflow Engine"]:::workflow
Workers["Temporal Workers\nSpring Boot activity executors"]:::workflow
Aurora["Amazon Aurora\nPostgreSQL"]:::dataLayer
S3["Amazon S3\nDocument Store"]:::dataLayer
Redis["Amazon ElastiCache\nRedis"]:::dataLayer
IntSvc["Integration Services\nSpring Boot adapters"]:::integration
ExtSys["External Systems\nmultiple target systems"]:::external
RM --> REST
Operator --> GQL
Channel --> REST
Operator <--> AIAssistant
AIAssistant --> GQL
AIAssistant --> IntSvc
GQL --> Temporal
REST --> Temporal
GQL --> Aurora
REST --> Aurora
Temporal --> Workers
Workers --> Aurora
Workers --> IntSvc
Workers --> S3
Workers --> Redis
IntSvc --> ExtSys
Aurora -. "LISTEN / NOTIFY" .-> Notify
Notify -. "WebSocket push" .-> Operator
Layer key 🟣 Client tier · 🟧 AI service · 🟦 API gateway · 🔵 Go services · 🟪 Workflow engine · 🟩 Data layer · 🟡 Integration adapters · ⬜ External systems
Key Data Flows
New case intake (Banker via mobile): React Native → REST API → Temporal (start workflow) → Aurora (case record) → React workspace subscription fires
Operator approval (Document Review): React workspace → GraphQL mutation → workflow-service → Temporal signal → workflow advances → Aurora task written → workspace subscription fires
AI pre-fill (compliance questionnaire): Temporal workflow reaches compliance review phase → workflow-service calls agent-service REST → CompliancePreFillAgent runs OCR+NLP chain → pre-filled form written to Aurora → React compliance panel reads and displays
Integration failure recovery:
Activity throws ApplicationFailure → Temporal routes to error recovery signal → Aurora error task created → React Error Recovery Panel surfaces task → operator submits decision → submitErrorRecovery signal → workflow resumes