architecture "Simple Diagram" {
actor "User" as user
box "VPC Boundary" as vpc {
layout: horizontal
service "Web server" as web
database "DB server" as db
}
user -> web : "requests"
web -> db : "queries" [color="blue", style="dashed"]
}
Realtime Analytics Pipeline (Test Case)
Test Case
architecture "Real-Time User Analytics Pipeline" {
actor "Mobile User" as user
box "GCP Virtual Private Cloud (VPC)" as vpc {
layout: vertical
gcp::network::CloudLoadBalancing "Global HTTPs LB" as lb
stack "Compute & Ingestion" {
direction: left-right
layer "API Gateway" {
gcp::compute::CloudRun "Ingestion API" as api
}
layer "Event Bus" {
gcp::analytics::PubSub "Events Topic" as pubsub
}
}
stack "Data Processing & Storage" {
direction: left-right
layer "Stream Processing" {
gcp::analytics::Dataflow "Streaming ETL Job" as dataflow
}
layer "Persistence" {
layout: vertical
gcp::storage::CloudStorage "Raw Data Lake" as gcs
gcp::analytics::BigQuery "Analytics DWH" as bq
}
}
}
box "Business Intelligence" {
gcp::analytics::Looker "Looker Dashboards" as looker
}
user -> lb : "HTTPS JSON Payload"
lb -> api : "Route traffic"
api => pubsub : "Publish Event"
pubsub => dataflow : "Subscribe / Stream"
dataflow => gcs : "Backup Raw Events"
dataflow => bq : "Write Aggregated Metrics"
looker -> bq : "Query Data" [color="blue", style="dashed"]
}
Attributes And Tags (Test Case)
Test Case
architecture "Attributes and Tags" {
service "Secure Web" as web [color="red", tags="secure,frontend"]
box "VPC Box" as vpc [fill="blue"] {
database "DB" as db
}
}
Horizontal Diagram (Test Case)
Test Case
architecture "Horizontal Diagram" {
direction: left-right
actor "User" as user
service "Web" as web
}
Platform Architecture (Test Case)
Test Case
architecture "Platform Architecture" {
box "Ingestion Layer" {
layout: horizontal
service "Web Frontend"
service "Mobile Gateway"
}
box "Processing Core" {
layout: horizontal
box "Stream Processing" {
layout: vertical
service "Kafka Topic"
service "Flink Job"
}
box "Batch Processing" {
layout: vertical
service "Airflow Scheduler"
service "Hadoop Cluster"
}
}
}
Three Tier Web App (Test Case)
Test Case
architecture "Three-Tier Web Application" {
direction: left-right
actor "End User" as user [text-color="#1A73E8"]
box "Presentation Tier (Web App)" as presentation_tier [background-color="#E8F0FE", border-color="#1A73E8", border-width="3", padding="20px"] {
layout: vertical
service "React Single Page Application" as web_client [background-color="#FFFFFF", border-color="#1A73E8"]
service "CDN Endpoint (Static Assets)" as cdn [background-color="#FFFFFF", border-color="#1A73E8", border-style="dashed"]
}
box "Application Tier (API Services)" as app_tier [background-color="#E6F4EA", border-color="#137333", border-width="3", padding="20px", margin="0 40px"] {
layout: vertical
service "REST API Service (Go/Gin)" as api_srv [background-color="#FFFFFF", border-color="#137333"]
queue "Redis Cache Cluster" as cache [background-color="#FFFFFF", border-color="#137333", border-style="dotted"]
}
box "Data Tier (Persistence)" as data_tier [background-color="#FCE8E6", border-color="#C5221F", border-width="3", padding="20px"] {
layout: vertical
database "Primary PostgreSQL DB" as primary_db [background-color="#FFFFFF", border-color="#C5221F"]
database "Replica DB (Read-Only)" as replica_db [background-color="#FFFFFF", border-color="#C5221F", border-style="dashed"]
}
user -> web_client : "HTTPS Requests"
web_client => api_srv : "API Calls"
api_srv => cache : "Cache Lookups"
api_srv => primary_db : "Write queries"
replica_db -> primary_db : "Replication" [border-style="dashed"]
}