How evanxdsouza/mangrove works
Mangrove is a self-hosted PaaS control plane. A user creates or links a project, configures a deployment from Git, a Dockerfile, Compose, an image, or a template, then Mangrove builds/runs it, health-checks it, and routes traffic through Caddy; GitHub pushes and pull requests can trigger redeploys and previews. The graph also preserves major product branches: auth/workspaces, deployment management, templates, terminal, and optional NAS storage. Some subsystem links are documented capabilities rather than sampled call sites; those are dashed where implementation wiring was not shown.
Main entry points: router.go HTTP API · deploy.go Deploy orchestration · docker.go Container executor · storage.go NAS orchestration
Components 29
Clients
- Dashboard
web/src/lib/pages/ProjectsPage.svelte - Web API client
web/src/lib/api.ts - CLI
cmd/mangrovectl/main.go - Terminal UI
cmd/mangrove-tui/main.go - MCP server
cmd/mangrove-mcp/main.go
Control plane
- Control daemon
cmd/mangrove/main.go - HTTP API
internal/api/router.go - Session and access
internal/auth/session.go
Deployment runtime
- Deploy orchestration
internal/orchestrator/deploy.go - Container executor
internal/executor/docker.go - Traffic proxy
internal/proxy/caddy.go - Health and lifecycle jobs
internal/scheduler/health.go - App templates
internal/orchestrator/templates.go - Interactive terminal
internal/api/terminal.go
Integrations
- GitHub webhooks
internal/api/webhook.go - GitHub integration
internal/github/oauth.go - Email notifications
internal/notify/resend.go - Storage API
internal/api/storage.go - NAS orchestration
internal/orchestrator/storage.go - Mount helper client
internal/mountd/client.go - Privileged mount helper
cmd/mangrove-mountd/main.go
State and storage
- SQLite store
internal/store/store.go - Domain models
internal/models/models.go
Other components
- Operator
- Host drive
- LAN SMB clients
- Caddy
- Docker
- GitHub
Connections 32
- Operator → Dashboard: operates
- Dashboard → Web API client: requests
web/src/lib/api.ts - Web API client → HTTP API: calls HTTP
- CLI → HTTP API: calls HTTP
- Terminal UI → HTTP API: calls HTTP
cmd/mangrove-tui/main.go - MCP server → HTTP API: calls HTTP
cmd/mangrove-mcp/main.go - Control daemon → HTTP API: configures
cmd/mangrove/main.go - HTTP API → Session and access: requires sessions
internal/api/router.go - HTTP API → SQLite store: reads and writes
- HTTP API → Deploy orchestration: dispatches deploys
- GitHub webhooks → Deploy orchestration: triggers deploys
internal/api/webhook.go - GitHub webhooks → SQLite store: records deliveries
internal/api/webhook.go - GitHub → GitHub webhooks: sends events
- Deploy orchestration → Container executor: runs containers
- Container executor → Docker: controls
- Deploy orchestration → Traffic proxy: configures routes
- Traffic proxy → Caddy: uses admin API
- Health and lifecycle jobs → Deploy orchestration: reaps previews
- Control daemon → Health and lifecycle jobs: starts jobs
cmd/mangrove/main.go - Deploy orchestration → SQLite store: persists state
- SQLite store → Domain models: stores records
internal/store/store.go - App templates → Container executor: deploys templates
- HTTP API → GitHub integration: supports OAuth
internal/api/router.go - Interactive terminal → Container executor: opens container shell
- Deploy orchestration → Email notifications: sends results
- Dashboard → Storage API: manages drives
- Storage API → NAS orchestration: creates shares
internal/api/storage.go - NAS orchestration → Mount helper client: requests mounts
internal/orchestrator/storage.go - Mount helper client → Privileged mount helper: uses Unix socket
cmd/mangrove-mountd/main.go - Privileged mount helper → Host drive: mounts drive
cmd/mangrove-mountd/main.go - NAS orchestration → Container executor: runs SMB service
internal/orchestrator/storage.go - LAN SMB clients → NAS orchestration: connects over LAN