- Migrate from custom HTTP server to VitePress framework - Rename project to Tokenized License Approval System (TLAS) - Add comprehensive documentation for all stakeholders: - Business: Executive summary, value proposition, governance - Operations: Infrastructure, installation, monitoring, backup - Departments: User guide, workflows, verification, issuance - Developers: API reference, authentication, webhooks, SDKs - Compliance: OWASP, DPDP Act, IT Act, audit framework - Add modern theme with dark mode and full-text search - Update Dockerfile for VitePress build process Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
7.0 KiB
7.0 KiB
Architecture Overview
System Architecture
┌─────────────────────────────────────────────────────────────────────┐
│ TLAS Platform │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ Presentation Layer │ │
│ │ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │ │
│ │ │ Citizen │ │ Department │ │ Admin │ │ │
│ │ │ Portal │ │ Portal │ │ Console │ │ │
│ │ │ (Angular) │ │ (Angular) │ │ (Angular) │ │ │
│ │ └──────────────┘ └──────────────┘ └──────────────┘ │ │
│ └─────────────────────────────────────────────────────────────┘ │
│ │ │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ Application Layer │ │
│ │ │ │
│ │ ┌─────────────────────────────────────────────────────┐ │ │
│ │ │ API Gateway (NestJS) │ │ │
│ │ │ ┌───────────┐ ┌───────────┐ ┌───────────┐ │ │ │
│ │ │ │ Auth │ │Applications│ │ Documents │ │ │ │
│ │ │ │ Module │ │ Module │ │ Module │ │ │ │
│ │ │ └───────────┘ └───────────┘ └───────────┘ │ │ │
│ │ └─────────────────────────────────────────────────────┘ │ │
│ └─────────────────────────────────────────────────────────────┘ │
│ │ │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ Data Layer │ │
│ │ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │ │
│ │ │ PostgreSQL │ │ Redis │ │ File Store │ │ │
│ │ │ (Primary) │ │ (Cache) │ │ (Documents) │ │ │
│ │ └──────────────┘ └──────────────┘ └──────────────┘ │ │
│ └─────────────────────────────────────────────────────────────┘ │
│ │ │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ Blockchain Layer │ │
│ │ ┌────────────────────────────────────────────────────┐ │ │
│ │ │ Hyperledger Besu Network │ │ │
│ │ │ ┌─────────────┐ ┌─────────────┐ │ │ │
│ │ │ │ NFT Smart │ │ Ledger │ │ │ │
│ │ │ │ Contract │ │ Storage │ │ │ │
│ │ │ └─────────────┘ └─────────────┘ │ │ │
│ │ └────────────────────────────────────────────────────┘ │ │
│ └─────────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────┘
Key Design Decisions
| Decision | Rationale |
|---|---|
| Angular SPA | Rich interactive UI, offline capability |
| NestJS Backend | TypeScript consistency, modular architecture |
| PostgreSQL | ACID compliance, JSON support, proven reliability |
| Hyperledger Besu | Ethereum-compatible, enterprise features, private network |
| Docker Containers | Consistent deployment, scalability |
Data Flow
- Application Submission: User → Frontend → API → Database → Workflow Engine
- Document Upload: User → Frontend → API → File Storage → Hash to Blockchain
- Certificate Issuance: Approval → Smart Contract → NFT Minted → Certificate Generated
Scalability
- Horizontal scaling: Multiple API instances behind load balancer
- Database scaling: Read replicas for query load
- Caching: Redis for session and query caching
- Async processing: Queue-based document processing