How yassinos-coder/berth works
Berth is a self-hosted deployment control plane: the dashboard and GitHub integrations request deployments, the NestJS server stores desired state and coordinates agents, and Rust agents reconcile Docker on managed VPSs while reporting status and telemetry. The map emphasizes that path, plus authentication, fleet enrollment, proxying, backups, teams, notifications, and public status pages. Several server subsystems are represented at directory level because their source was not sampled; those links are included only where the README documents the relationship.
Main entry points: panel.rs Agent Runtime · services API Client · docker.rs Docker Reconciler · github-webhook.controller.ts GitHub Webhooks
Components 22
Dashboard and API
- Web Dashboard
apps/berth-ui/src/pages - API Client
apps/berth-ui/src/services
Control Plane
- Authentication
apps/berth-server/src/auth/services/auth.service.ts - Service API
apps/berth-server/src/services/controllers/services.controller.ts - Service Orchestration
apps/berth-server/src/services/services/services.service.ts - GitHub Webhooks
apps/berth-server/src/github-app/github-webhook.controller.ts - Agent Gateway
apps/berth-server/src/agent-gateway - Agent Enrollment
apps/berth-server/src/agent-gateway/pki/enrollment.service.ts - Panel Database
apps/berth-server/src/prisma/prisma.service.ts
Server Agent
- Shared Protocol
packages/protocol/src/index.ts - Agent Runtime
apps/berth-agent/src/panel.rs
Host Runtime
- Docker Reconciler
apps/berth-agent/src/docker.rs - Docker Services
- HTTPS Proxy
apps/berth-agent/src/docker.rs - Managed VPS
Operations Features
- Backup Operations
apps/berth-server/src/backups - Fleet Management
apps/berth-server/src/servers - Teams and RBAC
apps/berth-server/src/team - Notifications
apps/berth-server/src/notifications - Status Pages
apps/berth-server/src/status-pages - GitHub Integration
apps/berth-server/src/github-app
Other components
- Operator
Connections 22
- Operator → Web Dashboard: manages
README.md - Web Dashboard → API Client: requests data
README.md - API Client → Authentication: authenticates
README.md - API Client → Service API: calls API
README.md - Service API → Service Orchestration: dispatches
apps/berth-server/src/services/controllers/services.controller.ts - Service Orchestration → Panel Database: persists state
- GitHub Webhooks → Panel Database: records deployments
apps/berth-server/src/github-app/github-webhook.controller.ts - GitHub Webhooks → Agent Gateway: requests reconcile
apps/berth-server/src/github-app/github-webhook.controller.ts - GitHub Integration → GitHub Webhooks: delivers push event
README.md - Fleet Management → Agent Enrollment: enrolls agent
README.md - Agent Enrollment → Panel Database: updates credentials
apps/berth-server/src/agent-gateway/pki/enrollment.service.ts - Agent Gateway → Agent Runtime: communicates WebSocket
README.md - Agent Runtime → Shared Protocol: exchanges messages
README.md - Agent Runtime → Docker Reconciler: invokes reconcile
apps/berth-agent/src/main.rs - Docker Reconciler → Docker Services: applies desired state
README.md - Docker Reconciler → HTTPS Proxy: configures routes
apps/berth-agent/src/docker.rs - Agent Runtime → Managed VPS: collects host specs
- Agent Runtime → Agent Gateway: reports status
README.md - Operator → Backup Operations: manages backups
README.md - Operator → Teams and RBAC: assigns roles
README.md - Operator → Notifications: configures alerts
- Operator → Status Pages: publishes status