How m-cmp/mc-web-console works
Project Type and Purpose
• This is a full-stack web application (“M-CMP WEB Console”) built with Go/Buffalo for both frontend and backend, designed to provide multi-cloud management portals (user and admin) and open APIs.
• Key external integrations: MC-INFRA-MANAGER and MC-IAM-MANAGER services.
• Persistence: PostgreSQL database for session, user, and portal data.
Main Components
a. Frontend Service
• Located under /front
• Buffalo web server serving HTML templates, static assets (JS/CSS/images)
• Proxying API calls to the backend
• Built with Go, yarn/npm, SCSS, Tabler UI
b. Backend API Service
• Located under /api
• Buffalo web server exposing RESTful JSON endpoints
• Business logic in actions/ and HTTP handlers in handler/
• Data models in models/ and migrations in migrations/
• Integrates with external services (IAM and Infra managers)
c. Database
• PostgreSQL (container mcwebconsole-postgresdb)
• Schema managed via Buffalo migrations (.fizz files)
• Connection configured via environment (DEV/PROD_DATABASE_URL)
d. External Services
1. MC-IAM-MANAGER (Identity and Access Management)
2. MC-INFRA-MANAGER (Multi-Cloud Infrastructure Manager)
e. Orchestration & Deployment
• Docker Compose (scripts/docker-compose.yml)
• CI/CD pipelines (.github/workflows)
• Environment configuration in /conf
Relationships and Data Flows
• End user’s browser → Frontend Buffalo app (port 3000)
• Serves UI pages
• API calls go: Frontend → Backend API (port 3001) via proxy
• Backend API ↔ PostgreSQL
• CRUD operations for sessions, roles, menus, workspace-project mapping
• Backend API ↔ External Services (HTTP REST)
• AuthN/Z via IAM
• Infrastructure operations via Infra manager
Architectural Patterns & Principles
• Layered MVC (Buffalo’s “actions” for controllers, “models” for data, “templates” for views)
• Separation of concerns: frontend app solely handles UI/templates, backend app solely handles data/API
• Twelve-factor app principles via environment configs
• Dockerized microservices communicating over a dedicated Docker network