C4 Model Diagram - Component

@startuml !include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml title Component Diagram - Backend API ' --- External user --- Person(user, "End User") ' --- External containers (referenced, not redefined as components) --- ContainerDb(redis_store, "Redis", "In-memory cache", "Managed ElastiCache") ContainerDb(rds_store, "AWS RDS", "Relational DB", "PostgreSQL") ContainerDb(sf1_store, "Snowflake DB 1", "Data Warehouse", "Analytics") ContainerDb(sf2_store, "Snowflake DB 2", "Data Warehouse", "Analytics") ' --- Application boundary with components --- Container_Boundary(backend_container, "Backend API (ECS Fargate)") { Component(comp_api, "API Router", "Express/FastAPI", "Handles HTTP routing") Component(comp_user_svc, "User Service", "Business Logic", "Manages user operations") Component(comp_data_svc, "Data Service", "Business Logic", "Orchestrates data fetches") Component(comp_cache_mgr, "Cache Manager", "Utility", "Abstraction over Redis") Component(comp_rds_client, "RDS Client", "DAO", "Connects to RDS") Component(comp_sf_client, "Snowflake Client", "DAO", "Connects to Snowflake") } ' --- Frontend container (external to this component diagram) --- Container(frontend_container, "React Frontend", "S3 + CloudFront", "Static web app") ' --- Relationships --- Rel(user, frontend_container, "Uses", "HTTPS") Rel(frontend_container, comp_api, "Calls", "HTTPS") Rel(comp_api, comp_user_svc, "Delegates", "") Rel(comp_api, comp_data_svc, "Delegates", "") Rel(comp_data_svc, comp_cache_mgr, "Uses", "") Rel(comp_data_svc, comp_rds_client, "Fetches", "") Rel(comp_data_svc, comp_sf_client, "Queries", "") ' --- Component-to-external-container links --- Rel(comp_cache_mgr, redis_store, "Writes/Reads", "Redis Protocol") Rel(comp_rds_client, rds_store, "Executes", "SQL") Rel(comp_sf_client, sf1_store, "Queries", "Snowflake JDBC") Rel(comp_sf_client, sf2_store, "Queries", "Snowflake JDBC") @enduml

Comments

Popular posts from this blog

AWS S3 MRAP

SLO Compliance