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 what | Uses the system for | Talks to |
|---|---|---|
| Account holder | Linking machines, watching runs, asking the assistant, personal access tokens, alerts of failed and missed backups | Dashboard (GitHub sign-in), the API's alert routes (session or personal token) |
| Deployment owner | All of the above, plus deployment-wide settings: the embedding index, metrics, the password login | Dashboard, the Observatory's password login |
| AI agent | Reading runs and failures, queuing backups, recording fixes | MCP server (personal access token) |
| GitHub | The repositories to back up, and sign-in | The worker (REST API, git), the dashboard (OAuth) |
| The user's storage | Where archives live: a git remote, a local folder or an S3-compatible bucket | The worker only |
| PostgreSQL | Accounts, run telemetry, worker state, chats, embeddings | API, Observatory, a self-hosted worker |
| OpenRouter | Chat models and embeddings for the assistant | Observatory |
| Slack, Discord, the account's webhooks | Alerts, 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.