workspace "Event Directory" "A directory of events in the city" { !identifiers hierarchical model { u = person "User" { tags "Customer" } ss = softwareSystem "Event Directory" { wa = container "Web Application" { tags "Web App" } ma = container "Mobile Application" { tags "Mobile App" } proxy-ext = container "Envoy External" { tags "Proxy" } proxy-int = container "Envoy Internal" { tags "Proxy" } api-int = container "API Internal" { tags "API" technology "Rust" grpc = component "gRPC API" { tags "API Component" } } api-ext = container "API External" { tags "API" technology "Rust" rest = component "REST API" { tags "API Component" } } interface = container "Interface" "Core code to do the dirty work" { tags "Interface" technology "Rust" interface = component "Interface API" { tags "API Component" } } cache = container "Write-Through Cache paired with Cache-Aside" "Write to cache and DB in parallel, but also update cache if a key is missed" { tags "Cache" } db = container "MongoDB" { tags "Database" } group "Observability" { posthog = container "PostHog" { tags "Observability" } grafana = container "Grafana" { tags "Observability" } } group "DWH" { metabase = container "Metabase" "This could be expanded in the future to include iceberg with spark, if needed" { tags "DWH" } } } ext = softwareSystem "B2B Systems" { tags "Customer" } billing = softwareSystem "Billing (Stripe or similar)" { tags "Billing" } maps = softwareSystem "Maps (Google Maps or similar)" { tags "Maps" } u -> ss "Search for events in the nearby area" u -> ss.wa "Uses the web application to search for events" u -> ss.ma "Uses the mobile application to search for events" ss.wa -> ss.proxy-int "Connect to" ss.ma -> ss.proxy-int "Connect to" ext -> ss.proxy-ext "Connect to" ss.proxy-ext -> ss.api-ext "Load balance to API" ss.proxy-int -> ss.api-int "Load balance to API" ss.api-int.grpc -> ss.interface "Uses the interface to search for events" ss.api-ext.rest -> ss.interface "Uses the interface to search for events" ss.interface -> ss.cache "Reads from and writes to the cache" ss.cache -> ss.db "Reads from and writes to the database" ss.api-int -> ss.grafana "Visualize data with Grafana" ss.api-ext -> ss.grafana "Visualize data with Grafana" ss.interface -> ss.grafana "Visualize data with Grafana" ss.wa -> ss.posthog "Track user behavior with PostHog" ss.ma -> ss.posthog "Track user behavior with PostHog" ss.interface -> ss.posthog "Track user behavior with PostHog" ss.metabase -> ss.db "Create reports from the data in the database" ss.api-ext -> billing "Billing B2B events" ss.api-int -> billing "Billing Users events" ss.wa -> maps "Uses the maps to get the location of the events" ss.ma -> maps "Uses the maps to get the location of the events" } views { systemContext ss "SystemContext" { include * autolayout lr } container ss "Container" { include * autolayout lr } styles { element "Element" { color #0773af stroke #0773af strokeWidth 7 shape roundedbox } element "Person" { shape person } element "Boundary" { strokeWidth 5 } relationship "Relationship" { thickness 4 } element "Database" { shape cylinder } element "Container" { shape box } element "API Component" { shape box } element "Web App" { shape WebBrowser } element "Mobile App" { shape MobileDevicePortrait } element "API" { shape Hexagon } } } }