Skip to main content

01 System context

Status: Current Last verified: 604c95a

GitHub Backup copies a person's GitHub repositories to storage they choose, every week, and shows them what was backed up, what failed and why. One deployment serves many accounts; the person who runs it owns account 1.

flowchart LR
user(["Account holder"])
owner(["Deployment owner (account 1)"])
agentclient(["AI agent (MCP client)"])

subgraph system["GitHub Backup"]
dashboard["Dashboard"]
api["Backup API"]
observatory["Observatory (AI assistant)"]
mcp["MCP server"]
worker["Backup worker (on the user's machine)"]
end

github[("GitHub: API and git")]
sink[("The user's storage: git remote, folder or S3 bucket")]
db[("PostgreSQL with pgvector")]
openrouter["OpenRouter (LLMs, embeddings)"]
receivers["Alert receivers: Slack, Discord, webhooks"]

user --> dashboard
owner --> dashboard
agentclient --> mcp
dashboard --> api
dashboard --> observatory
mcp --> api
observatory --> api
worker -->|"lists repositories, clones"| github
worker -->|"writes archives"| sink
worker -->|"self-hosted: SQL"| db
worker -->|"linked: /v1 over HTTPS"| api
api --> db
observatory --> db
observatory --> openrouter
api -->|"alerts"| receivers

People and systems around it​

Who or whatUses the system forTalks to
Account holderLinking machines, watching runs, asking the assistant, personal access tokens, alerts of failed and missed backupsDashboard (GitHub sign-in), the API's alert routes (session or personal token)
Deployment ownerAll of the above, plus deployment-wide settings: the embedding index, metrics, the password loginDashboard, the Observatory's password login
AI agentReading runs and failures, queuing backups, recording fixesMCP server (personal access token)
GitHubThe repositories to back up, and sign-inThe worker (REST API, git), the dashboard (OAuth)
The user's storageWhere archives live: a git remote, a local folder or an S3-compatible bucketThe worker only
PostgreSQLAccounts, run telemetry, worker state, chats, embeddingsAPI, Observatory, a self-hosted worker
OpenRouterChat models and embeddings for the assistantObservatory
Slack, Discord, the account's webhooksAlerts, to URLs the account gives; the system sends no e-mail (ADR 0020)The API's notify service (public addresses only)

The boundary that matters​

Repository contents travel only from GitHub, through the worker on the user's machine, into the user's storage. The platform stores what happened (runs, results, logs, decision reasons, worker state), never the code. A linked worker reports over the API's /v1 routes and holds no database connection; a self-hosted worker (the owner's own machines) writes to PostgreSQL directly.

How the parts are deployed and talk: 02 containers and deployment. Who owns which data: 03 data ownership.