How oneprolabs/hypercdr works
HyperCDR is a Kubernetes application disaster-recovery control plane. Its principal workflow runs from cluster registration and inventory discovery through protection configuration, scheduled or manual synchronization, persisted task dispatch, restore-point tracking, and target-cluster recovery. The graph combines README-described behavior with sampled implementation; unsampled subsystem links are shown only where the README explicitly documents them.
Main entry points: postgres.go PostgreSQL store · client.go Secure connection · router.go HTTP API · task_dispatch.go Task dispatch
Components 28
User interface
- Platform UI
frontend/src/App.tsx - Cluster views
frontend/src/features/clusters/cluster-page.tsx - Protection plans
frontend/src/features/policies/policy-page.tsx - Recovery workflows
frontend/src/features/recovery/task-ui.tsx
Control plane
- HTTP API
backend/internal/httpserver/router.go - Cluster registration
backend/internal/httpserver/agent_registration_handlers.go - Inventory handlers
backend/internal/httpserver/cluster_handlers.go - Plan handlers
backend/internal/httpserver/protection_plan_handlers.go - Protection scheduler
backend/internal/httpserver/scheduler.go - Task dispatch
backend/internal/httpserver/task_dispatch.go - Backup handlers
backend/internal/httpserver/backup_handlers.go - Recovery handlers
backend/internal/httpserver/recovery_handlers.go - Storage management
backend/internal/httpserver/storage_handlers.go - PostgreSQL store
backend/internal/store/postgres.go - Credential encryption
backend/internal/store/storage_crypto.go
Cluster agent
- comm-agent
agent/comm-agent/cmd/comm-agent/main.go - Secure connection
agent/comm-agent/internal/wsclient/client.go - Cluster inventory
agent/comm-agent/internal/inventory/collector.go - Backup execution
agent/comm-agent/internal/executor/backup.go - Restore execution
agent/comm-agent/internal/executor/restore.go - Storage execution
agent/comm-agent/internal/executor/storage.go
Protection runtime
- Velero integration
agent/comm-agent/internal/velero/backup.go - Kubernetes operations
agent/comm-agent/internal/kube/dynamic_applier.go
Other components
- Browser user
- Kubernetes API
- Velero engine
- Object storage
- PostgreSQL
Connections 40
- Browser user → Platform UI: uses
- Platform UI → HTTP API: REST requests
- Platform UI → Cluster views: renders
- Platform UI → Protection plans: renders
- Platform UI → Recovery workflows: renders
- Cluster views → HTTP API: manages clusters
- Protection plans → HTTP API: configures protection
- Recovery workflows → HTTP API: requests recovery
- HTTP API → Cluster registration: routes registration
- Cluster registration → PostgreSQL store: persists cluster
- HTTP API → Inventory handlers: routes inventory
- Inventory handlers → PostgreSQL store: persists inventory
- HTTP API → Plan handlers: routes plans
- Plan handlers → PostgreSQL store: persists plans
- Protection scheduler → PostgreSQL store: reads due plans
- Protection scheduler → Task dispatch: creates scheduled tasks
- Backup handlers → Task dispatch: creates backup tasks
- Recovery handlers → Task dispatch: creates recovery tasks
- Storage management → PostgreSQL store: manages repositories
- PostgreSQL store → Credential encryption: protects credentials
- PostgreSQL store → PostgreSQL: reads and writes
- Task dispatch → PostgreSQL store: persists tasks
- Task dispatch → Secure connection: sends task
- comm-agent → Secure connection: registers and reconnects
- Secure connection → Cluster inventory: requests discovery
- Cluster inventory → Kubernetes API: reads resources
- Secure connection → Backup execution: executes backup
- Secure connection → Restore execution: executes restore
- Secure connection → Storage execution: executes storage sync
- Backup execution → Velero integration: builds backup operations
- Restore execution → Velero integration: builds restore operations
- Storage execution → Velero integration: builds storage manifests
- Storage execution → Kubernetes operations: applies manifests
- Velero integration → Velero engine: coordinates protection
- Kubernetes operations → Kubernetes API: applies resources
- Velero engine → Object storage: stores backup data
- Secure connection → Task dispatch: reports progress
- Task dispatch → PostgreSQL store: updates task state
- Backup handlers → PostgreSQL store: records restore points
- Recovery handlers → PostgreSQL store: tracks recovery state