workspace "Global Food Delivery Platform - Azure Edition" "Enterprise microservice systém běžící v Microsoft Azure" { !identifiers hierarchical model { // --- People --- customer = person "Zákazník" "Objednává jídlo přes mobilní aplikaci" courier = person "Kurýr" "Doručuje jídlo a aktualizuje stav dopravy" restaurant_staff = person "Manager restaurace" "Spravuje menu a přijímá objednávky" // --- External Systems --- payment_gateway = softwareSystem "Platební brána" "Externí systém pro procesování plateb (Stripe/Adyen)" "External" maps_provider = softwareSystem "Mapový provider" "Azure Maps nebo Google Maps pro geokódování" "External" notification_provider = softwareSystem "Push/SMS Provider" "Firebase FCM nebo Azure Communication Services" "External" restaurant_pos = softwareSystem "Restaurant POS Systems" "Externí systémy restaurací (Toast, Square, atd.)" "External" // --- Internal System --- delivery_platform = softwareSystem "Delivery Platform" "Hlavní softwarový ekosystém rozvozu" { // Clients customer_app = container "Customer Mobile App" "iOS/Android aplikace pro zákazníky" "Flutter" "Mobile" courier_app = container "Courier Mobile App" "Aplikace pro logistiku" "React Native" "Mobile" restaurant_web = container "Restaurant Dashboard" "Webové rozhraní pro správu menu" "Next.js" "Web" api_gateway = container "Azure API Management" "Vstupní bod, security a throttling" "Azure APIM" // Services identity_service = container "Identity Service" "Správa uživatelů a oprávnění" "Go" identity_db = container "Identity DB" "Data uživatelů" "Azure SQL" "Database" catalog_service = container "Catalog Service" "Správa restaurací a menu" "Java/Spring Boot" catalog_db = container "Catalog DB" "NoSQL data o menu" "Azure Cosmos DB" "Database" order_service = container "Order Service" "Orchestrace objednávek" "Go" { order_manager = component "Order Manager" "Hlavní stavový automat objednávky" pricing_engine = component "Pricing Engine" "Výpočet slev a daní" integration_client = component "POS Integration Client" "Adaptér pro externí systémy" } order_db = container "Order DB" "Historie objednávek" "Azure Database for PostgreSQL" "Database" integration_service = container "Integration Service" "Adaptéry pro POS restaurací" "Node.js" delivery_service = container "Delivery Service" "Logistika a dispatching" "Python" delivery_db = container "Delivery DB" "Real-time tracking kurýrů" "Azure Cache for Redis" "Database" review_service = container "Review Service" "Zpětná vazba a hodnocení" "Java" review_db = container "Review DB" "Hodnocení a komentáře" "Azure Database for PostgreSQL" "Database" notification_service = container "Notification Service" "Asynchronní odesílání zpráv" "Node.js" } // --- Relationships (Model Block) --- customer -> delivery_platform.customer_app "Používá" courier -> delivery_platform.courier_app "Používá" restaurant_staff -> delivery_platform.restaurant_web "Používá" // Interactions with Gateway delivery_platform.customer_app -> delivery_platform.api_gateway "Požadavky /orders" "HTTPS" delivery_platform.courier_app -> delivery_platform.api_gateway "Požadavky /delivery" "HTTPS" delivery_platform.restaurant_web -> delivery_platform.api_gateway "Požadavky /catalog" "HTTPS" // Gateway routing delivery_platform.api_gateway -> delivery_platform.identity_service "Směruje Auth" "GRPC" delivery_platform.api_gateway -> delivery_platform.catalog_service "Směruje Catalog" "GRPC" delivery_platform.api_gateway -> delivery_platform.order_service "Směruje Order" "GRPC" delivery_platform.api_gateway -> delivery_platform.delivery_service "Směruje Tracking" "GRPC" delivery_platform.api_gateway -> delivery_platform.review_service "Směruje Reviews" "GRPC" // Database access delivery_platform.identity_service -> delivery_platform.identity_db "Čte/Píše" delivery_platform.catalog_service -> delivery_platform.catalog_db "Čte/Píše" delivery_platform.order_service -> delivery_platform.order_db "Čte/Píše" delivery_platform.delivery_service -> delivery_platform.delivery_db "Čte/Píše" delivery_platform.review_service -> delivery_platform.review_db "Čte/Píše" // Inter-service logic delivery_platform.order_service -> delivery_platform.catalog_service "Ověřuje dostupnost" delivery_platform.order_service -> payment_gateway "Procesuje platbu" delivery_platform.order_service -> delivery_platform.delivery_service "Žádá o rozvoz" delivery_platform.order_service -> delivery_platform.integration_service "Sync s POS" delivery_platform.integration_service -> restaurant_pos "Zasílá objednávku" delivery_platform.order_service -> delivery_platform.notification_service "Trigger notifikace" delivery_platform.notification_service -> notification_provider "Odesílá Push/SMS" delivery_platform.delivery_service -> maps_provider "Počítá trasu" // Component mapping delivery_platform.order_service.order_manager -> delivery_platform.order_service.pricing_engine "Počítá cenu" delivery_platform.order_service.order_manager -> delivery_platform.order_service.integration_client "Volá integraci" delivery_platform.order_service.integration_client -> delivery_platform.integration_service "API volání" // --- Deployment Azure --- prod = deploymentEnvironment "Production" { deploymentNode "Microsoft Azure" { region = deploymentNode "West Europe" { vnet = deploymentNode "Azure Virtual Network" { frontend_subnet = deploymentNode "App Gateway Subnet" { containerInstance delivery_platform.api_gateway } aks = deploymentNode "Azure Kubernetes Service (AKS)" { deploymentNode "System Node Pool" { containerInstance delivery_platform.identity_service containerInstance delivery_platform.catalog_service } deploymentNode "User Node Pool (High Compute)" { containerInstance delivery_platform.order_service containerInstance delivery_platform.delivery_service containerInstance delivery_platform.review_service } } data_subnet = deploymentNode "Database Subnet" { deploymentNode "Azure Database for PostgreSQL" { containerInstance delivery_platform.order_db containerInstance delivery_platform.review_db } deploymentNode "Azure Cache for Redis" { containerInstance delivery_platform.delivery_db } } } } } } } views { systemContext delivery_platform "Ctx" "Systémový kontext v Azure" { include * autolayout lr } container delivery_platform "Ctn" "Kontejnerový pohled (Azure Cloud Services)" { include * autolayout lr } component delivery_platform.order_service "Comp" "Detail Order Microservice" { include * autolayout lr } dynamic delivery_platform "Flow_Order" "Dynamický pohled: Celý proces objednávky" { customer -> delivery_platform.customer_app "Zadává objednávku" delivery_platform.customer_app -> delivery_platform.api_gateway "POST /orders" delivery_platform.api_gateway -> delivery_platform.order_service "Iniciuje workflow" delivery_platform.order_service -> delivery_platform.catalog_service "Kontrola zásob" delivery_platform.order_service -> payment_gateway "Proces platby" delivery_platform.order_service -> delivery_platform.integration_service "Odeslání do POS restaurace" delivery_platform.integration_service -> restaurant_pos "Tisk objednávky v kuchyni" delivery_platform.order_service -> delivery_platform.notification_service "Notifikace zákazníkovi" autolayout lr } dynamic delivery_platform "Flow_Tracking" "Dynamický pohled: Tracking kurýra" { courier -> delivery_platform.courier_app "Aktualizuje GPS polohu" delivery_platform.courier_app -> delivery_platform.api_gateway "PATCH /location" delivery_platform.api_gateway -> delivery_platform.delivery_service "Uložit polohu" delivery_platform.delivery_service -> delivery_platform.delivery_db "Update Redis cache" customer -> delivery_platform.customer_app "Sleduje mapu" delivery_platform.customer_app -> delivery_platform.api_gateway "GET /delivery/track" delivery_platform.api_gateway -> delivery_platform.delivery_service "Získej polohu" autolayout lr } deployment delivery_platform prod "Dep" "Azure Infrastructure Architecture" { include * autolayout lr } styles { element "Person" { shape person background "#0078d4" color "#ffffff" } element "Software System" { background "#106ebe" color "#ffffff" } element "Container" { background "#2b88d8" color "#ffffff" } element "Database" { shape cylinder background "#005a9e" color "#ffffff" } element "Mobile" { shape mobileDevicePortrait } element "Web" { shape webBrowser } } theme default } }