# hunvreus/devpush architecture

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

- Interactive diagram: https://gitdiagram.com/hunvreus/devpush
- Repository: https://github.com/hunvreus/devpush

## Overview

/dev/push is a self-hostable application deployment platform. Users sign in, connect a GitHub repository, configure a project and environments, then deploy and monitor it; teams manage access and shared storage alongside that workflow. The application routes requests into project, identity, and team features, while background workers execute deployment and maintenance tasks. The graph also preserves registry, domains, and logging capabilities. Evidence is limited to the README, source index references, and excerpts shown; uncertain runtime integrations are marked dashed or omitted.

Main entry points: [`app/main.py`](https://github.com/hunvreus/devpush/blob/main/app/main.py) (Web application), [`app/routers/project.py`](https://github.com/hunvreus/devpush/blob/main/app/routers/project.py) (Project workflows), [`app/db.py`](https://github.com/hunvreus/devpush/blob/main/app/db.py) (Data access), [`app/services/deployment.py`](https://github.com/hunvreus/devpush/blob/main/app/services/deployment.py) (Deployment engine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web and identity"]
  node_app["Web application<br/>[main.py]"]
  node_auth["Authentication<br/>[auth.py]"]
  node_github_auth["GitHub OAuth<br/>[github.py]"]
  node_google_auth["Google OAuth<br/>[google.py]"]
  node_user_mgmt["User management<br/>[user.py]"]
end

subgraph group_projects["Projects and teams"]
  node_project_routes["Project workflows<br/>[project.py]"]
  node_team_routes["Team collaboration<br/>[team.py]"]
  node_admin["Administration<br/>[admin.py]"]
  node_forms["Project and team forms"]
  node_github_service["GitHub integration<br/>[github.py]"]
  node_preset["Preset detection<br/>[preset_detector.py]"]
  node_domain["Domain management<br/>[domain.py]"]
  node_storage["Shared storage<br/>[storage.py]"]
end

subgraph group_runtime["Deploy and observe"]
  node_deployment["Deployment engine<br/>[deployment.py]"]
  node_registry["Runner registry<br/>[registry.py]"]
  node_jobs["Background job registry<br/>[jobs.py]"]
  node_deploy_task["Deployment worker<br/>[deployment.py]"]
  node_project_task["Project worker<br/>[project.py]"]
  node_registry_task["Registry worker<br/>[registry.py]"]
  node_monitor["Deployment monitor<br/>[monitor.py]"]
  node_logs["Log service<br/>[loki.py]"]
end

subgraph group_core["Application foundation"]
  node_db["Data access<br/>[db.py]"]
  node_models["Domain models<br/>[models.py]"]
  node_postgres[("PostgreSQL")]
  node_redis["Redis queue"]
end

node_user(("Platform user"))
node_github["GitHub"]
node_docker["Docker runtime"]
node_loki_service["Loki"]

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_auth
node_app -->|"routes to"| node_admin
node_app -->|"routes to"| node_user_mgmt
node_app -->|"routes to"| node_project_routes
node_app -->|"routes to"| node_github_auth
node_app -->|"routes to"| node_google_auth
node_app -->|"routes to"| node_team_routes
node_auth -->|"authenticates with"| node_github
node_github_auth -->|"uses"| node_github_service
node_project_routes -->|"uses"| node_github_service
node_project_routes -->|"requests deployment"| node_deployment
node_project_routes -->|"manages domains"| node_domain
node_project_routes -->|"detects presets"| node_preset
node_project_routes -->|"reads runners"| node_registry
node_team_routes -->|"uses"| node_storage
node_project_routes -->|"validates input"| node_forms
node_team_routes -->|"validates input"| node_forms
node_github_service -->|"calls API"| node_github
node_jobs -->|"registers"| node_deploy_task
node_jobs -->|"registers"| node_project_task
node_jobs -->|"registers"| node_registry_task
node_deploy_task -->|"executes"| node_deployment
node_deploy_task -->|"reads runners"| node_registry
node_deploy_task -->|"writes logs"| node_logs
node_registry_task -->|"updates"| node_registry
node_monitor -->|"monitors"| node_deployment
node_logs -.->|"stores logs"| node_loki_service
node_deployment -.->|"runs containers"| node_docker
node_deployment -->|"loads runner config"| node_registry
node_app -->|"initializes"| node_logs
node_app -->|"configures sessions"| node_db
node_db -->|"connects"| node_postgres
node_models -->|"uses base"| node_db
node_app -->|"creates job pool"| node_redis
node_project_routes -->|"queries data"| node_db
node_team_routes -->|"queries data"| node_db
node_auth -->|"queries data"| node_db
node_deploy_task -->|"updates records"| node_db
node_project_routes -.->|"queues work"| node_redis
node_user -->|"connects repository"| node_github
node_deployment -->|"deploys app"| node_user
node_monitor -->|"streams status"| node_user

click node_app "https://github.com/hunvreus/devpush/blob/main/app/main.py"
click node_auth "https://github.com/hunvreus/devpush/blob/main/app/routers/auth.py"
click node_github_auth "https://github.com/hunvreus/devpush/blob/main/app/routers/github.py"
click node_google_auth "https://github.com/hunvreus/devpush/blob/main/app/routers/google.py"
click node_user_mgmt "https://github.com/hunvreus/devpush/blob/main/app/routers/user.py"
click node_project_routes "https://github.com/hunvreus/devpush/blob/main/app/routers/project.py"
click node_team_routes "https://github.com/hunvreus/devpush/blob/main/app/routers/team.py"
click node_admin "https://github.com/hunvreus/devpush/blob/main/app/routers/admin.py"
click node_forms "https://github.com/hunvreus/devpush/tree/main/app/forms"
click node_github_service "https://github.com/hunvreus/devpush/blob/main/app/services/github.py"
click node_preset "https://github.com/hunvreus/devpush/blob/main/app/services/preset_detector.py"
click node_domain "https://github.com/hunvreus/devpush/blob/main/app/services/domain.py"
click node_storage "https://github.com/hunvreus/devpush/blob/main/app/utils/storage.py"
click node_deployment "https://github.com/hunvreus/devpush/blob/main/app/services/deployment.py"
click node_registry "https://github.com/hunvreus/devpush/blob/main/app/services/registry.py"
click node_jobs "https://github.com/hunvreus/devpush/blob/main/app/workers/jobs.py"
click node_deploy_task "https://github.com/hunvreus/devpush/blob/main/app/workers/tasks/deployment.py"
click node_project_task "https://github.com/hunvreus/devpush/blob/main/app/workers/tasks/project.py"
click node_registry_task "https://github.com/hunvreus/devpush/blob/main/app/workers/tasks/registry.py"
click node_monitor "https://github.com/hunvreus/devpush/blob/main/app/workers/monitor.py"
click node_logs "https://github.com/hunvreus/devpush/blob/main/app/services/loki.py"
click node_db "https://github.com/hunvreus/devpush/blob/main/app/db.py"
click node_models "https://github.com/hunvreus/devpush/blob/main/app/models.py"

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_app,node_auth,node_github_auth,node_google_auth,node_user_mgmt,node_user toneBlue
class node_project_routes,node_team_routes,node_admin,node_forms,node_github_service,node_preset,node_domain,node_storage toneAmber
class node_deployment,node_registry,node_jobs,node_deploy_task,node_project_task,node_registry_task,node_monitor,node_logs toneMint
class node_db,node_models,node_postgres,node_redis toneRose
class node_github,node_docker,node_loki_service toneIndigo
```

## Components

### Web and identity

- [Web application](https://github.com/hunvreus/devpush/blob/main/app/main.py): `app/main.py`
- [Authentication](https://github.com/hunvreus/devpush/blob/main/app/routers/auth.py): `app/routers/auth.py`
- [GitHub OAuth](https://github.com/hunvreus/devpush/blob/main/app/routers/github.py): `app/routers/github.py`
- [Google OAuth](https://github.com/hunvreus/devpush/blob/main/app/routers/google.py): `app/routers/google.py`
- [User management](https://github.com/hunvreus/devpush/blob/main/app/routers/user.py): `app/routers/user.py`

### Projects and teams

- [Project workflows](https://github.com/hunvreus/devpush/blob/main/app/routers/project.py): `app/routers/project.py`
- [Team collaboration](https://github.com/hunvreus/devpush/blob/main/app/routers/team.py): `app/routers/team.py`
- [Administration](https://github.com/hunvreus/devpush/blob/main/app/routers/admin.py): `app/routers/admin.py`
- [Project and team forms](https://github.com/hunvreus/devpush/tree/main/app/forms): `app/forms`
- [GitHub integration](https://github.com/hunvreus/devpush/blob/main/app/services/github.py): `app/services/github.py`
- [Preset detection](https://github.com/hunvreus/devpush/blob/main/app/services/preset_detector.py): `app/services/preset_detector.py`
- [Domain management](https://github.com/hunvreus/devpush/blob/main/app/services/domain.py): `app/services/domain.py`
- [Shared storage](https://github.com/hunvreus/devpush/blob/main/app/utils/storage.py): `app/utils/storage.py`

### Deploy and observe

- [Deployment engine](https://github.com/hunvreus/devpush/blob/main/app/services/deployment.py): `app/services/deployment.py`
- [Runner registry](https://github.com/hunvreus/devpush/blob/main/app/services/registry.py): `app/services/registry.py`
- [Background job registry](https://github.com/hunvreus/devpush/blob/main/app/workers/jobs.py): `app/workers/jobs.py`
- [Deployment worker](https://github.com/hunvreus/devpush/blob/main/app/workers/tasks/deployment.py): `app/workers/tasks/deployment.py`
- [Project worker](https://github.com/hunvreus/devpush/blob/main/app/workers/tasks/project.py): `app/workers/tasks/project.py`
- [Registry worker](https://github.com/hunvreus/devpush/blob/main/app/workers/tasks/registry.py): `app/workers/tasks/registry.py`
- [Deployment monitor](https://github.com/hunvreus/devpush/blob/main/app/workers/monitor.py): `app/workers/monitor.py`
- [Log service](https://github.com/hunvreus/devpush/blob/main/app/services/loki.py): `app/services/loki.py`

### Application foundation

- [Data access](https://github.com/hunvreus/devpush/blob/main/app/db.py): `app/db.py`
- [Domain models](https://github.com/hunvreus/devpush/blob/main/app/models.py): `app/models.py`
- **PostgreSQL**
- **Redis queue**

### Other components

- **Platform user**
- **GitHub**
- **Docker runtime**
- **Loki**

## Connections

- Platform user → Web application: uses (evidence: `README.md`)
- Web application → Authentication: routes to (evidence: `app/main.py`)
- Web application → Administration: routes to (evidence: `app/main.py`)
- Web application → User management: routes to (evidence: `app/main.py`)
- Web application → Project workflows: routes to (evidence: `app/main.py`)
- Web application → GitHub OAuth: routes to (evidence: `app/main.py`)
- Web application → Google OAuth: routes to (evidence: `app/main.py`)
- Web application → Team collaboration: routes to (evidence: `app/main.py`)
- Authentication → GitHub: authenticates with (evidence: `app/routers/auth.py`)
- GitHub OAuth → GitHub integration: uses (evidence: `app/routers/github.py`)
- Project workflows → GitHub integration: uses (evidence: `app/routers/project.py`)
- Project workflows → Deployment engine: requests deployment (evidence: `app/routers/project.py`)
- Project workflows → Domain management: manages domains (evidence: `app/routers/project.py`)
- Project workflows → Preset detection: detects presets (evidence: `app/routers/project.py`)
- Project workflows → Runner registry: reads runners (evidence: `app/routers/project.py`)
- Team collaboration → Shared storage: uses (evidence: `app/routers/team.py`)
- Project workflows → Project and team forms: validates input (evidence: `app/routers/project.py`)
- Team collaboration → Project and team forms: validates input (evidence: `app/routers/team.py`)
- GitHub integration → GitHub: calls API (evidence: `app/services/github.py`)
- Background job registry → Deployment worker: registers (evidence: `app/workers/jobs.py`)
- Background job registry → Project worker: registers (evidence: `app/workers/jobs.py`)
- Background job registry → Registry worker: registers (evidence: `app/workers/jobs.py`)
- Deployment worker → Deployment engine: executes (evidence: `app/workers/tasks/deployment.py`)
- Deployment worker → Runner registry: reads runners (evidence: `app/workers/tasks/deployment.py`)
- Deployment worker → Log service: writes logs (evidence: `app/workers/tasks/deployment.py`)
- Registry worker → Runner registry: updates (evidence: `app/workers/tasks/registry.py`)
- Deployment monitor → Deployment engine: monitors (evidence: `app/workers/monitor.py`)
- Log service → Loki: stores logs
- Deployment engine → Docker runtime: runs containers
- Deployment engine → Runner registry: loads runner config (evidence: `app/services/deployment.py`)
- Web application → Log service: initializes (evidence: `app/main.py`)
- Web application → Data access: configures sessions (evidence: `app/main.py`)
- Data access → PostgreSQL: connects (evidence: `app/db.py`)
- Domain models → Data access: uses base (evidence: `app/models.py`)
- Web application → Redis queue: creates job pool (evidence: `app/main.py`)
- Project workflows → Data access: queries data (evidence: `app/routers/project.py`)
- Team collaboration → Data access: queries data (evidence: `app/routers/team.py`)
- Authentication → Data access: queries data (evidence: `app/routers/auth.py`)
- Deployment worker → Data access: updates records (evidence: `app/workers/tasks/deployment.py`)
- Project workflows → Redis queue: queues work
- Platform user → GitHub: connects repository (evidence: `README.md`)
- Deployment engine → Platform user: deploys app (evidence: `README.md`)
- Deployment monitor → Platform user: streams status (evidence: `README.md`)
