# deployment-architecture

# DEPLOYMENT ARCHITECTURE

graph TB subgraph Host["Host Machine
Docker Compose Environment"] Docker["🐳 Docker Engine"] end subgraph Services["Services & Containers"] subgraph Frontend_svc["Frontend Service"] NJS["Next.js 14
Container
Port: 3000
Volume: ./frontend"] end subgraph API_svc["Backend API Service"] NESTJS["NestJS
Container
Port: 3001
Volume: ./backend
Env: DB_HOST,
BLOCKCHAIN_RPC"] end subgraph Database_svc["Database Service"] PG["PostgreSQL 15
Container
Port: 5432
Volume: postgres_data
POSTGRES_DB: goa_gel
POSTGRES_USER: gel_user"] end subgraph Cache_svc["Cache Service"] REDIS["Redis 7
Container
Port: 6379
Volume: redis_data"] end subgraph Storage_svc["File Storage Service"] MINIO["MinIO
Container
Port: 9000 API
Port: 9001 Console
Volume: minio_data
Access: minioadmin
Secret: minioadmin"] end subgraph Blockchain_svc["Blockchain Network"] BESU1["Besu Validator 1
Container
Port: 8545 RPC
Port: 30303 P2P
Volume: besu_data_1"] BESU2["Besu Validator 2
Container
Port: 8546 RPC
Port: 30304 P2P
Volume: besu_data_2"] BESU3["Besu Validator 3
Container
Port: 8547 RPC
Port: 30305 P2P
Volume: besu_data_3"] BESU4["Besu Validator 4
Container
Port: 8548 RPC
Port: 30306 P2P
Volume: besu_data_4"] end subgraph Monitoring_svc["Monitoring & Logging"] PROMETHEUS["Prometheus
Port: 9090"] GRAFANA["Grafana
Port: 3000 Alt
Volume: grafana_storage"] end end subgraph Network["Docker Network"] COMPOSE_NET["gel-network
Driver: bridge"] end subgraph Volumes["Named Volumes"] PG_VOL["postgres_data"] REDIS_VOL["redis_data"] MINIO_VOL["minio_data"] BESU_VOL1["besu_data_1"] BESU_VOL2["besu_data_2"] BESU_VOL3["besu_data_3"] BESU_VOL4["besu_data_4"] GRAFANA_VOL["grafana_storage"] end subgraph Config["Configuration Files"] COMPOSE["docker-compose.yml"] ENV[".env
BLOCKCHAIN_RPC
DB_PASSWORD
API_SECRET_KEY"] BESU_CONFIG["besu/config.toml
genesis.json
ibft_config.toml"] end Docker -->|Run| Services Services -->|Connect via| COMPOSE_NET NJS -->|HTTP Client| NESTJS NESTJS -->|SQL Query| PG NESTJS -->|Cache| REDIS NESTJS -->|S3 API| MINIO NESTJS -->|RPC Call| BESU1 BESU1 -->|Peer| BESU2 BESU1 -->|Peer| BESU3 BESU1 -->|Peer| BESU4 BESU2 -->|Peer| BESU3 BESU2 -->|Peer| BESU4 BESU3 -->|Peer| BESU4 PG -->|Store| PG_VOL REDIS -->|Store| REDIS_VOL MINIO -->|Store| MINIO_VOL BESU1 -->|Store| BESU_VOL1 BESU2 -->|Store| BESU_VOL2 BESU3 -->|Store| BESU_VOL3 BESU4 -->|Store| BESU_VOL4 GRAFANA -->|Store| GRAFANA_VOL PROMETHEUS -->|Scrape| NESTJS PROMETHEUS -->|Scrape| BESU1 GRAFANA -->|Query| PROMETHEUS ENV -->|Configure| NESTJS ENV -->|Configure| PG BESU_CONFIG -->|Configure| BESU1 BESU_CONFIG -->|Configure| BESU2 BESU_CONFIG -->|Configure| BESU3 BESU_CONFIG -->|Configure| BESU4 style Host fill:#1f2937,stroke:#111827,stroke-width:2px,color:#fff style Services fill:#374151,stroke:#1f2937,stroke-width:2px,color:#fff style Blockchain_svc fill:#dc2626,stroke:#991b1b,stroke-width:2px,color:#fff style Network fill:#06b6d4,stroke:#0891b2,stroke-width:2px,color:#fff style Volumes fill:#8b5cf6,stroke:#6d28d9,stroke-width:2px,color:#fff style Config fill:#f59e0b,stroke:#d97706,stroke-width:2px,color:#fff