CONTAINER ARCHITECTURE
graph TB
subgraph Client["Client Layer"]
WEB["🌐 Next.js 14 Frontend
shadcn/ui
Port: 3000"]
end
subgraph API["API & Backend Layer"]
APIGW["📡 API Gateway
NestJS
Port: 3001"]
AUTH["🔐 Auth Service
API Key + Secret
(POC)"]
WORKFLOW["⚙️ Workflow Service
NestJS Module"]
APPROVAL["✅ Approval Service
NestJS Module"]
DOCUMENT["📄 Document Service
NestJS Module"]
end
subgraph Data["Data Layer"]
DB["🗄️ PostgreSQL
Port: 5432
license_requests
approvals, documents
audit_logs"]
CACHE["⚡ Redis Cache
Port: 6379
Session, Workflow State"]
STORAGE["📦 MinIO
Port: 9000
Document Files
License PDFs"]
end
subgraph Blockchain["Blockchain Layer"]
BESU["⛓️ Hyperledger Besu
QBFT Consensus
Port: 8545"]
CONTRACTS["📋 Smart Contracts
• LicenseRequestNFT
• ApprovalManager
• DepartmentRegistry
• WorkflowRegistry"]
BCDB["📚 Chain State
Account Balances
NFT Metadata"]
end
subgraph Integrations["External Integrations"]
DIGILOCKER["📱 DigiLocker Mock
Document Verification"]
LEGACY["💼 Legacy Systems
Data Integration"]
WEBHOOK["🔔 Webhook Service
Event Notifications"]
end
WEB -->|REST/GraphQL| APIGW
APIGW -->|Validate Token| AUTH
APIGW -->|Route Request| WORKFLOW
APIGW -->|Route Request| APPROVAL
APIGW -->|Route Request| DOCUMENT
WORKFLOW -->|Read/Write| DB
WORKFLOW -->|Cache State| CACHE
WORKFLOW -->|Submit TX| BESU
APPROVAL -->|Read/Write| DB
APPROVAL -->|Cache| CACHE
APPROVAL -->|Smart Contract Call| BESU
DOCUMENT -->|Store Files| STORAGE
DOCUMENT -->|Hash Generation| DOCUMENT
DOCUMENT -->|Record Hash| BESU
BESU -->|Execute| CONTRACTS
CONTRACTS -->|Update State| BCDB
APIGW -->|Verify Docs| DIGILOCKER
APIGW -->|Query Legacy| LEGACY
APPROVAL -->|Send Event| WEBHOOK
style WEB fill:#10b981,stroke:#059669,stroke-width:2px,color:#fff
style APIGW fill:#3b82f6,stroke:#1e40af,stroke-width:2px,color:#fff
style AUTH fill:#f59e0b,stroke:#d97706,stroke-width:2px,color:#fff
style DB fill:#8b5cf6,stroke:#6d28d9,stroke-width:2px,color:#fff
style STORAGE fill:#ec4899,stroke:#be123c,stroke-width:2px,color:#fff
style CACHE fill:#06b6d4,stroke:#0891b2,stroke-width:2px,color:#fff
style BESU fill:#ef4444,stroke:#991b1b,stroke-width:2px,color:#fff
style CONTRACTS fill:#dc2626,stroke:#7f1d1d,stroke-width:2px,color:#fff