System Context (C4 Level 1)
High-level view of the e-commerce platform and its external dependencies.
graph TD
Customer[Customer]
Admin[Administrator]
PaymentGateway[Payment Gateway
Stripe]
EmailService[Email Service
SendGrid]
System[E-Commerce Platform]
Customer -->|Browse products,
Place orders| System
Admin -->|Manage products,
View analytics| System
System -->|Process payments| PaymentGateway
System -->|Send notifications| EmailService
Container Diagram (C4 Level 2)
Containers within the e-commerce platform showing technologies and communication.
graph TD
Customer[Customer
Web Browser]
Admin[Administrator
Web Browser]
WebApp[Web Application
React 18 SPA]
API[REST API
Node.js + Express]
Database[(Database
PostgreSQL 15)]
Cache[(Cache
Redis)]
Customer -->|HTTPS| WebApp
Admin -->|HTTPS| WebApp
WebApp -->|JSON/HTTPS| API
API -->|SQL| Database
API -->|Cache queries| Cache
Component Diagram (C4 Level 3) - Optional for Technical Audiences
Components within the REST API container showing internal structure.
graph TD
API[REST API Container]
AuthController[Authentication
Controller]
ProductController[Product Catalog
Controller]
CartController[Shopping Cart
Controller]
OrderController[Order
Controller]
AuthService[Auth Service]
ProductService[Product Service]
CartService[Cart Service]
OrderService[Order Service]
ProductRepo[Product
Repository]
UserRepo[User
Repository]
CartRepo[Cart
Repository]
OrderRepo[Order
Repository]
Database[(PostgreSQL)]
Cache[(Redis)]
ProductController --> ProductService
CartController --> CartService
OrderController --> OrderService
AuthController --> AuthService
ProductService --> ProductRepo
CartService --> CartRepo
OrderService --> OrderRepo
AuthService --> UserRepo
ProductRepo --> Database
UserRepo --> Database
CartRepo --> Cache
OrderRepo --> Database
Deployment Diagram
Infrastructure and deployment architecture on AWS.
graph TD
subgraph "AWS Cloud"
subgraph "Public Subnet"
ALB[Application Load
Balancer]
CloudFront[CloudFront CDN]
end
subgraph "Private Subnet"
ECS1[ECS Container 1
Node.js API]
ECS2[ECS Container 2
Node.js API]
RDS[(RDS PostgreSQL
Primary)]
RDSReplica[(RDS PostgreSQL
Read Replica)]
ElastiCache[(ElastiCache
Redis)]
end
subgraph "Storage"
S3[S3 Bucket
Static Assets]
end
end
CloudFront --> S3
ALB --> ECS1
ALB --> ECS2
ECS1 --> RDS
ECS2 --> RDS
ECS1 --> RDSReplica
ECS2 --> RDSReplica
ECS1 --> ElastiCache
ECS2 --> ElastiCache