# arkeep-io/arkeep architecture

> Architecture diagram of the GitHub repository arkeep-io/arkeep, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/arkeep-io/arkeep
- Repository: https://github.com/arkeep-io/arkeep

## Overview

Arkeep is a self-hosted backup manager: users configure agents, policies and destinations in a web dashboard; the server schedules work, agents run Restic backups, and users can browse and restore snapshots. The map preserves Docker discovery, retention and integrity checks, snapshot synchronization, and notifications as distinct capabilities. Relationships are based on the README and shown source excerpts or SOURCE INDEX references; several unsampled subsystems are represented at their documented directory paths, with uncertain wiring omitted.

Main entry points: [`server/internal/api/router.go`](https://github.com/arkeep-io/arkeep/blob/main/server/internal/api/router.go) (REST API), [`server/internal/agentmanager/manager.go`](https://github.com/arkeep-io/arkeep/blob/main/server/internal/agentmanager/manager.go) (Agent registry), [`agent/internal/connection/manager.go`](https://github.com/arkeep-io/arkeep/blob/main/agent/internal/connection/manager.go) (Agent connection), [`agent/internal/executor/executor.go`](https://github.com/arkeep-io/arkeep/blob/main/agent/internal/executor/executor.go) (Job executor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Web interface"]
  node_gui["Web dashboard<br/>[App.vue]"]
  node_gui_pages["Management pages"]
  node_gui_api["API client<br/>[api.ts]"]
end

subgraph group_control["Server control plane"]
  node_api["REST API<br/>[router.go]"]
  node_auth["Authentication<br/>[service.go]"]
  node_scheduler["Job scheduling"]
  node_agent_registry["Agent registry<br/>[manager.go]"]
  node_grpc["Agent gRPC<br/>[server.go]"]
  node_database[("Persistent state<br/>[db.go]")]
end

subgraph group_agent["Agent execution"]
  node_agent["Backup agent<br/>[main.go]"]
  node_connection["Agent connection<br/>[manager.go]"]
  node_executor["Job executor<br/>[executor.go]"]
  node_docker["Docker discovery<br/>[discovery.go]"]
end

subgraph group_backup["Backup and recovery"]
  node_retention["Retention checks"]
  node_restic["Restic operations<br/>[wrapper.go]"]
  node_destination["Backup destinations"]
  node_snapshots["Snapshot browsing<br/>[snapshots.go]"]
  node_restore["Restore workflow<br/>[RestoreSheet.vue]"]
  node_snapshot_sync["Snapshot synchronization<br/>[service.go]"]
end

subgraph group_operations["Operations"]
  node_notifications["Notifications<br/>[service.go]"]
  node_job_reports["Job reports<br/>[service.go]"]
end

node_user(("Administrator"))
node_external_store[("Backup storage")]
node_email_webhook["Email and webhooks"]

node_user -->|"manages backups"| node_gui
node_gui -->|"shows workflows"| node_gui_pages
node_gui_pages -.->|"requests data"| node_gui_api
node_gui_api -.->|"calls REST API"| node_api
node_api -->|"authenticates"| node_auth
node_api -.->|"serves management data"| node_database
node_api -.->|"configures jobs"| node_scheduler
node_scheduler -->|"dispatches jobs"| node_agent_registry
node_retention -.->|"requests agent work"| node_agent_registry
node_grpc -->|"registers agents"| node_agent_registry
node_grpc -->|"persists agent data"| node_database
node_agent -->|"starts connection"| node_connection
node_connection -->|"connects over gRPC"| node_grpc
node_connection -->|"forwards assignments"| node_executor
node_executor -->|"runs backup jobs"| node_restic
node_executor -->|"discovers volumes"| node_docker
node_restic -->|"reads and writes snapshots"| node_external_store
node_api -.->|"manages destinations"| node_destination
node_api -->|"serves snapshot actions"| node_snapshots
node_snapshots -->|"supports restore"| node_restore
node_snapshot_sync -->|"requests repository import"| node_agent_registry
node_snapshot_sync -.->|"updates snapshot records"| node_database
node_notifications -->|"delivers alerts"| node_email_webhook
node_job_reports -.->|"sends scheduled reports"| node_notifications

click node_gui "https://github.com/arkeep-io/arkeep/blob/main/gui/src/App.vue"
click node_gui_pages "https://github.com/arkeep-io/arkeep/tree/main/gui/src/pages"
click node_gui_api "https://github.com/arkeep-io/arkeep/blob/main/gui/src/services/api.ts"
click node_api "https://github.com/arkeep-io/arkeep/blob/main/server/internal/api/router.go"
click node_auth "https://github.com/arkeep-io/arkeep/blob/main/server/internal/auth/service.go"
click node_scheduler "https://github.com/arkeep-io/arkeep/tree/main/server/internal/scheduler"
click node_retention "https://github.com/arkeep-io/arkeep/blob/main/server/internal/retentionscheduler/retentionscheduler.go"
click node_agent_registry "https://github.com/arkeep-io/arkeep/blob/main/server/internal/agentmanager/manager.go"
click node_grpc "https://github.com/arkeep-io/arkeep/blob/main/server/internal/grpc/server.go"
click node_database "https://github.com/arkeep-io/arkeep/blob/main/server/internal/db/db.go"
click node_agent "https://github.com/arkeep-io/arkeep/blob/main/agent/cmd/agent/main.go"
click node_connection "https://github.com/arkeep-io/arkeep/blob/main/agent/internal/connection/manager.go"
click node_executor "https://github.com/arkeep-io/arkeep/blob/main/agent/internal/executor/executor.go"
click node_docker "https://github.com/arkeep-io/arkeep/blob/main/agent/internal/docker/discovery.go"
click node_restic "https://github.com/arkeep-io/arkeep/blob/main/agent/internal/restic/wrapper.go"
click node_destination "https://github.com/arkeep-io/arkeep/tree/main/server/internal/destutil"
click node_snapshots "https://github.com/arkeep-io/arkeep/blob/main/server/internal/api/snapshots.go"
click node_restore "https://github.com/arkeep-io/arkeep/blob/main/gui/src/components/snapshots/RestoreSheet.vue"
click node_snapshot_sync "https://github.com/arkeep-io/arkeep/blob/main/server/internal/snapshotsync/service.go"
click node_notifications "https://github.com/arkeep-io/arkeep/blob/main/server/internal/notification/service.go"
click node_job_reports "https://github.com/arkeep-io/arkeep/blob/main/server/internal/jobreport/service.go"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_gui,node_gui_pages,node_gui_api toneBlue
class node_api,node_auth,node_scheduler,node_agent_registry,node_grpc,node_database,node_external_store toneAmber
class node_agent,node_connection,node_executor,node_docker,node_email_webhook toneMint
class node_retention,node_restic,node_destination,node_snapshots,node_restore,node_snapshot_sync toneRose
class node_notifications,node_job_reports,node_user toneIndigo
```

## Components

### Web interface

- [Web dashboard](https://github.com/arkeep-io/arkeep/blob/main/gui/src/App.vue): `gui/src/App.vue`
- [Management pages](https://github.com/arkeep-io/arkeep/tree/main/gui/src/pages): `gui/src/pages`
- [API client](https://github.com/arkeep-io/arkeep/blob/main/gui/src/services/api.ts): `gui/src/services/api.ts`

### Server control plane

- [REST API](https://github.com/arkeep-io/arkeep/blob/main/server/internal/api/router.go): `server/internal/api/router.go`
- [Authentication](https://github.com/arkeep-io/arkeep/blob/main/server/internal/auth/service.go): `server/internal/auth/service.go`
- [Job scheduling](https://github.com/arkeep-io/arkeep/tree/main/server/internal/scheduler): `server/internal/scheduler`
- [Agent registry](https://github.com/arkeep-io/arkeep/blob/main/server/internal/agentmanager/manager.go): `server/internal/agentmanager/manager.go`
- [Agent gRPC](https://github.com/arkeep-io/arkeep/blob/main/server/internal/grpc/server.go): `server/internal/grpc/server.go`
- [Persistent state](https://github.com/arkeep-io/arkeep/blob/main/server/internal/db/db.go): `server/internal/db/db.go`

### Agent execution

- [Backup agent](https://github.com/arkeep-io/arkeep/blob/main/agent/cmd/agent/main.go): `agent/cmd/agent/main.go`
- [Agent connection](https://github.com/arkeep-io/arkeep/blob/main/agent/internal/connection/manager.go): `agent/internal/connection/manager.go`
- [Job executor](https://github.com/arkeep-io/arkeep/blob/main/agent/internal/executor/executor.go): `agent/internal/executor/executor.go`
- [Docker discovery](https://github.com/arkeep-io/arkeep/blob/main/agent/internal/docker/discovery.go): `agent/internal/docker/discovery.go`

### Backup and recovery

- [Retention checks](https://github.com/arkeep-io/arkeep/blob/main/server/internal/retentionscheduler/retentionscheduler.go): `server/internal/retentionscheduler/retentionscheduler.go`
- [Restic operations](https://github.com/arkeep-io/arkeep/blob/main/agent/internal/restic/wrapper.go): `agent/internal/restic/wrapper.go`
- [Backup destinations](https://github.com/arkeep-io/arkeep/tree/main/server/internal/destutil): `server/internal/destutil`
- [Snapshot browsing](https://github.com/arkeep-io/arkeep/blob/main/server/internal/api/snapshots.go): `server/internal/api/snapshots.go`
- [Restore workflow](https://github.com/arkeep-io/arkeep/blob/main/gui/src/components/snapshots/RestoreSheet.vue): `gui/src/components/snapshots/RestoreSheet.vue`
- [Snapshot synchronization](https://github.com/arkeep-io/arkeep/blob/main/server/internal/snapshotsync/service.go): `server/internal/snapshotsync/service.go`

### Operations

- [Notifications](https://github.com/arkeep-io/arkeep/blob/main/server/internal/notification/service.go): `server/internal/notification/service.go`
- [Job reports](https://github.com/arkeep-io/arkeep/blob/main/server/internal/jobreport/service.go): `server/internal/jobreport/service.go`

### Other components

- **Administrator**
- **Backup storage**
- **Email and webhooks**

## Connections

- Administrator → Web dashboard: manages backups (evidence: `README.md`)
- Web dashboard → Management pages: shows workflows (evidence: `gui/src/App.vue`)
- Management pages → API client: requests data
- API client → REST API: calls REST API
- REST API → Authentication: authenticates (evidence: `server/internal/api/router.go`)
- REST API → Persistent state: serves management data
- REST API → Job scheduling: configures jobs (evidence: `server/internal/api/router.go`)
- Job scheduling → Agent registry: dispatches jobs (evidence: `server/internal/agentmanager/manager.go`)
- Retention checks → Agent registry: requests agent work
- Agent gRPC → Agent registry: registers agents (evidence: `server/internal/grpc/server.go`)
- Agent gRPC → Persistent state: persists agent data (evidence: `server/internal/grpc/server.go`)
- Backup agent → Agent connection: starts connection (evidence: `agent/cmd/agent/main.go`)
- Agent connection → Agent gRPC: connects over gRPC (evidence: `README.md`)
- Agent connection → Job executor: forwards assignments (evidence: `agent/internal/connection/manager.go`)
- Job executor → Restic operations: runs backup jobs (evidence: `agent/internal/executor/executor.go`)
- Job executor → Docker discovery: discovers volumes (evidence: `agent/internal/executor/executor.go`)
- Restic operations → Backup storage: reads and writes snapshots (evidence: `README.md`)
- REST API → Backup destinations: manages destinations
- REST API → Snapshot browsing: serves snapshot actions (evidence: `server/internal/api/router.go`)
- Snapshot browsing → Restore workflow: supports restore (evidence: `README.md`)
- Snapshot synchronization → Agent registry: requests repository import (evidence: `server/internal/snapshotsync/service.go`)
- Snapshot synchronization → Persistent state: updates snapshot records
- Notifications → Email and webhooks: delivers alerts (evidence: `server/internal/notification/service.go`)
- Job reports → Notifications: sends scheduled reports
