graph TB subgraph ClientLayer ["Client Layer"] Client[MVNO Frontend
React SPA] end subgraph GatewayLayer ["API Gateway Layer"] Gateway[API Gateway
Authentication/Authorization
Rate Limiting Load Balancing
Request Routing
Logging Monitoring] end subgraph MicroservicesLayer ["Microservices Layer"] Auth[Auth Service
JWT Management
User Sessions
Role-based Access Control
Login Failure Handling] BillQuery[Bill-Inquiry Service
Query Menu Processing
KOS Integration
Cache Management
History Tracking] ProdChange[Product-Change Service
Change Menu Screen
Pre-check Processing
KOS Integration
Change History] end subgraph CachingLayer ["Caching Layer"] Redis[Redis Cache
User Sessions 30min TTL
Bill Query Results 1hr TTL
Product Information 24hr TTL
Customer Data 4hr TTL] end subgraph DataLayer ["Data Layer"] AuthDB[(Auth Database
PostgreSQL
User Information
Access Rights
Login History)] BillDB[(Bill History DB
PostgreSQL
Query History
KOS Integration Logs)] ProdDB[(Product Change DB
PostgreSQL
Change History
Processing Logs)] end subgraph ExternalSystems ["External Systems"] KOS[KOS-Order System
Legacy Backend
Bill Query API
Product Change API
Customer Info API] MVNO[MVNO AP Server
Frontend API
Result Transmission
Screen Updates] end %% Client to Gateway Client -->|HTTPS Request| Gateway %% Gateway to Services (API Gateway Pattern) Gateway -->|Auth Login Request| Auth Gateway -->|Bill Query Menu| BillQuery Gateway -->|Product Change Request| ProdChange %% Services to Cache (Cache-Aside Pattern) Auth -.->|Session Cache
Cache-Aside| Redis BillQuery -.->|Query Result Cache
Cache-Aside| Redis ProdChange -.->|Product Info Cache
Cache-Aside| Redis %% Services to Databases Auth --> AuthDB BillQuery --> BillDB ProdChange --> ProdDB %% External System Connections (Circuit Breaker Pattern) BillQuery -->|KOS Bill Query
Circuit Breaker| KOS ProdChange -->|Product Change Process
Circuit Breaker| KOS BillQuery -->|Query Result Send| MVNO ProdChange -->|Process Result Send| MVNO %% Service Dependencies (Token Validation via Gateway) BillQuery -.->|Token Validation
via Gateway| Auth ProdChange -.->|Token Validation
via Gateway| Auth %% Styling classDef gateway fill:#e1f5fe,stroke:#01579b,stroke-width:3px classDef service fill:#f3e5f5,stroke:#4a148c,stroke-width:2px classDef cache fill:#fff3e0,stroke:#e65100,stroke-width:2px classDef database fill:#e8f5e8,stroke:#1b5e20,stroke-width:2px classDef external fill:#ffebee,stroke:#b71c1c,stroke-width:2px class Gateway gateway class Auth,BillQuery,ProdChange service class Redis cache class AuthDB,BillDB,ProdDB database class KOS,MVNO external