How pagopa/io-backend works
a. Authentication Flow:
• Mobile App → Authentication Endpoints
• Bearer Token Validation
• Session Management
b. API Flows:
• Mobile App → API Gateway
• API Gateway → Controllers
• Controllers → Services
• Services → External APIs
Infrastructure Components
a. Docker Containers:
• Backend Node.js Application
• Redis Instance
• Nginx Reverse Proxy
b. Azure Services:
• Azure App Service
• Azure Storage
• Application Insights
Security Layer (Highlight with a distinct border)
• API Key Authentication
• Bearer Token Validation
• IP Whitelisting
• CIDR Range Restrictions
Monitoring & Logging
• Application Insights Integration
• Logging System
• API Monitoring
Important Elements to Include:
Clear separation of concerns between
• API Routes
• Business Logic (Services)
• Data Storage
• External Service Integration
Key architectural patterns
• Dependency Injection Container
• Multiple Instance Deployment
• Cache Layer
• Message Queue System
Version Compatibility
• Mobile App Version Check
• PagoPA Version Compatibility
Use the following visual conventions:
• Blue: Core application components
• Green: External services
• Yellow: Security components
• Red: Critical infrastructure
• Gray: Supporting services
Lines
• Solid: Synchronous communications
• Line styles and their meanings
• Any abbreviations or technical terms
• Version compatibility indicators
Keep the abstraction level balanced:
• Enough detail to understand the system's architecture
• Avoid cluttering with implementation details
• Interactions and data flows
• Critical security and scaling components