# tegarthegreat/skifity architecture

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

- Interactive diagram: https://gitdiagram.com/tegarthegreat/skifity
- Repository: https://github.com/tegarthegreat/skifity

## Overview

Skifity is a self-hosted Kubernetes application platform: an operator connects servers, then deploys and manages apps through a web panel, CLI, or MCP assistant. The main app path runs from a user request through the API, build/deploy services, and the Kubernetes cluster; supporting capabilities include server provisioning, databases, templates, backups, authentication, and persistent state. The README documents product-level relationships; source excerpts confirm selected startup, authentication, database, backup, and MCP wiring. Unsampled relationships are not asserted beyond documented behavior.

Main entry points: [`internal/api/api.go`](https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/internal/api/api.go) (HTTP API), [`internal/dbsvc/manager.go`](https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/internal/dbsvc/manager.go) (Managed databases), [`internal/backup/manager.go`](https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/internal/backup/manager.go) (Backup and restore), [`internal/deploy/deployer.go`](https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/internal/deploy/deployer.go) (Deployment)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User interfaces"]
  node_binary["Skifity binary<br/>[main.go]"]
  node_webui["Web panel<br/>[App.tsx]"]
  node_cli["CLI<br/>[commands.go]"]
  node_mcp["MCP server<br/>[server.go]"]
end

subgraph group_control["Platform control"]
  node_api["HTTP API<br/>[api.go]"]
  node_provision["Server provisioning<br/>[provisioner.go]"]
  node_git["Git sources<br/>[webhook.go]"]
  node_templates["App templates<br/>[templates.go]"]
  node_docs["Embedded docs<br/>[docsite.go]"]
end

subgraph group_runtime["App runtime"]
  node_builder["Build detection<br/>[detect.go]"]
  node_deploy["Deployment<br/>[deployer.go]"]
  node_cluster["Cluster management<br/>[cluster.go]"]
  node_databases["Managed databases<br/>[manager.go]"]
end

subgraph group_state["State and recovery"]
  node_backup["Backup and restore<br/>[manager.go]"]
  node_store[("Platform state<br/>[store.go]")]
end

subgraph group_integrations["Identity and extensions"]
  node_auth["Authentication<br/>[service.go]"]
end

node_operator(("Operator"))
node_assistant(("AI assistant"))
node_kubernetes["Kubernetes API"]
node_backupstorage[("S3-compatible storage")]

node_operator -->|"manages apps"| node_webui
node_operator -->|"runs commands"| node_cli
node_assistant -->|"requests tools"| node_mcp
node_binary -->|"dispatches commands"| node_cli
node_binary -->|"starts server"| node_mcp
node_binary -->|"starts panel"| node_webui
node_webui -->|"calls API"| node_api
node_cli -->|"uses API"| node_api
node_mcp -->|"uses client"| node_cli
node_api -->|"authenticates"| node_auth
node_api -->|"adds servers"| node_provision
node_api -->|"accepts repositories"| node_git
node_api -->|"installs templates"| node_templates
node_api -->|"requests deployment"| node_deploy
node_deploy -->|"builds image"| node_builder
node_deploy -->|"applies releases"| node_cluster
node_cluster -->|"manages resources"| node_kubernetes
node_api -->|"manages databases"| node_databases
node_databases -->|"reads cluster status"| node_cluster
node_databases -->|"stores records"| node_store
node_databases -->|"syncs linked app"| node_deploy
node_api -->|"manages backups"| node_backup
node_backup -->|"runs backup jobs"| node_cluster
node_backup -->|"records backups"| node_store
node_backup -.->|"stores backup objects"| node_backupstorage
node_api -.->|"persists platform data"| node_store
node_operator -->|"reads guidance"| node_docs

click node_binary "https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/cmd/skifity/main.go"
click node_webui "https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/web/src/App.tsx"
click node_cli "https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/internal/cli/commands.go"
click node_mcp "https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/internal/mcpserver/server.go"
click node_api "https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/internal/api/api.go"
click node_auth "https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/internal/auth/service.go"
click node_provision "https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/internal/provision/provisioner.go"
click node_git "https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/internal/gitsrc/webhook.go"
click node_builder "https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/internal/builder/detect.go"
click node_deploy "https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/internal/deploy/deployer.go"
click node_cluster "https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/internal/cluster/cluster.go"
click node_templates "https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/internal/templates/templates.go"
click node_databases "https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/internal/dbsvc/manager.go"
click node_backup "https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/internal/backup/manager.go"
click node_store "https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/internal/store/store.go"
click node_docs "https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/internal/docsite/docsite.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_binary,node_webui,node_cli,node_mcp toneBlue
class node_api,node_provision,node_git,node_templates,node_docs,node_backupstorage toneAmber
class node_builder,node_deploy,node_cluster,node_databases,node_kubernetes toneMint
class node_backup,node_store toneRose
class node_auth,node_operator,node_assistant toneIndigo
```

## Components

### User interfaces

- [Skifity binary](https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/cmd/skifity/main.go): `cmd/skifity/main.go`
- [Web panel](https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/web/src/App.tsx): `web/src/App.tsx`
- [CLI](https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/internal/cli/commands.go): `internal/cli/commands.go`
- [MCP server](https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/internal/mcpserver/server.go): `internal/mcpserver/server.go`

### Platform control

- [HTTP API](https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/internal/api/api.go): `internal/api/api.go`
- [Server provisioning](https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/internal/provision/provisioner.go): `internal/provision/provisioner.go`
- [Git sources](https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/internal/gitsrc/webhook.go): `internal/gitsrc/webhook.go`
- [App templates](https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/internal/templates/templates.go): `internal/templates/templates.go`
- [Embedded docs](https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/internal/docsite/docsite.go): `internal/docsite/docsite.go`

### App runtime

- [Build detection](https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/internal/builder/detect.go): `internal/builder/detect.go`
- [Deployment](https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/internal/deploy/deployer.go): `internal/deploy/deployer.go`
- [Cluster management](https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/internal/cluster/cluster.go): `internal/cluster/cluster.go`
- [Managed databases](https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/internal/dbsvc/manager.go): `internal/dbsvc/manager.go`

### State and recovery

- [Backup and restore](https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/internal/backup/manager.go): `internal/backup/manager.go`
- [Platform state](https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/internal/store/store.go): `internal/store/store.go`

### Identity and extensions

- [Authentication](https://github.com/tegarthegreat/skifity/blob/claude/eloquent-shannon-12qxje/internal/auth/service.go): `internal/auth/service.go`

### Other components

- **Operator**
- **AI assistant**
- **Kubernetes API**
- **S3-compatible storage**

## Connections

- Operator → Web panel: manages apps (evidence: `README.md`)
- Operator → CLI: runs commands (evidence: `README.md`)
- AI assistant → MCP server: requests tools (evidence: `README.md`)
- Skifity binary → CLI: dispatches commands (evidence: `cmd/skifity/main.go`)
- Skifity binary → MCP server: starts server (evidence: `cmd/skifity/main.go`)
- Skifity binary → Web panel: starts panel (evidence: `cmd/skifity/main.go`)
- Web panel → HTTP API: calls API (evidence: `README.md`)
- CLI → HTTP API: uses API (evidence: `README.md`)
- MCP server → CLI: uses client (evidence: `internal/mcpserver/server.go`)
- HTTP API → Authentication: authenticates
- HTTP API → Server provisioning: adds servers (evidence: `README.md`)
- HTTP API → Git sources: accepts repositories (evidence: `README.md`)
- HTTP API → App templates: installs templates (evidence: `README.md`)
- HTTP API → Deployment: requests deployment (evidence: `README.md`)
- Deployment → Build detection: builds image (evidence: `README.md`)
- Deployment → Cluster management: applies releases (evidence: `README.md`)
- Cluster management → Kubernetes API: manages resources (evidence: `README.md`)
- HTTP API → Managed databases: manages databases (evidence: `README.md`)
- Managed databases → Cluster management: reads cluster status (evidence: `internal/dbsvc/manager.go`)
- Managed databases → Platform state: stores records (evidence: `internal/dbsvc/manager.go`)
- Managed databases → Deployment: syncs linked app (evidence: `internal/dbsvc/manager.go`)
- HTTP API → Backup and restore: manages backups (evidence: `README.md`)
- Backup and restore → Cluster management: runs backup jobs (evidence: `internal/backup/manager.go`)
- Backup and restore → Platform state: records backups (evidence: `internal/backup/manager.go`)
- Backup and restore → S3-compatible storage: stores backup objects
- HTTP API → Platform state: persists platform data
- Operator → Embedded docs: reads guidance (evidence: `README.md`)
