# Deployment View ## Infrastructure Overview ```txt ┌─────────────┐ ┌──────────────────────────────────────┐ │ Discord │◄─────►│ Coolify │ │ Gateway │ WSS │ │ │ + REST API │ │ ┌──────────────────────────────┐ │ └─────────────┘ │ │ omo-bot (Node.js process) │ │ │ │ - Command handlers │ │ │ │ - Event listeners │ │ │ │ - Mileage engine │ │ │ └──────────┬───────────────────┘ │ │ │ │ │ ▼ │ │ ┌──────────────────────────────┐ │ │ │ PostgreSQL (local) │ │ │ │ - User profiles │ │ │ │ - Mileage scores │ │ │ │ - Event schedules │ │ │ │ - Content cache │ │ │ └──────────────────────────────┘ │ │ │ │ ┌──────────────────────────────┐ │ │ │ Admin API / Dashboard │ │ │ │ (React SPA) │ │ │ │ admin.openmicodyssey.com │ │ │ └──────────────────────────────┘ │ └──────────────────────────────────────┘ │ OAuth2 │ ▼ ┌─────────────────────┐ │ openmicodyssey.com │ │ (Web Application) │ └─────────────────────┘ ``` ## Environments | Environment | Host | Bot Instance | DB | Purpose | | ----------- | ---------------- | ------------ | ---------------- | ---------------------------- | ---------------------- | | Development | Local machine | 1 process | Local Postgres | Feature development, testing | | Staging | Coolify | 1 instance | Staging Postgres | Integration | Pre-release validation | | Production | Coolify (scaled) | 2+ instances | Production (HA) | Live community server |