# gowthamn-sp/devpilot architecture

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

- Interactive diagram: https://gitdiagram.com/gowthamn-sp/devpilot
- Repository: https://github.com/gowthamn-sp/devpilot

## Overview

DevPilot is a freelancer-focused monitoring and recovery workspace. A user signs in, creates a project and services to monitor, then reviews health, incidents and dashboard summaries; for the bundled demo, recovery is restricted to an allowlisted local action. GitHub/Vercel integrations and deployment history add provider resources and release context. The README also lists audit events and AI investigation, with external AI still an extension point. Sampled code supports the monitoring, service, integration and deployment links; some route and UI details are documented but unsampled.

Main entry points: [`frontend/src/App.jsx`](https://github.com/gowthamn-sp/devpilot/blob/main/frontend/src/App.jsx) (Workspace shell), [`backend/app/main.py`](https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/main.py) (FastAPI application), [`backend/app/database.py`](https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/database.py) (Relational database), [`backend/app/monitor.py`](https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/monitor.py) (Polling monitor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Workspace UI"]
  node_app_ui["Workspace shell<br/>[App.jsx]"]
  node_api_client["HTTP API client<br/>[api.js]"]
  node_overview["Overview dashboard<br/>[OverviewPage.jsx]"]
  node_service_table["Service controls<br/>[ServiceTable.jsx]"]
  node_incident_ui["Incident views<br/>[IncidentsPage.jsx]"]
  node_service_map_ui["Service map<br/>[ServiceMapPage.jsx]"]
  node_recovery_ui["Recovery workspace<br/>[RecoveryPage.jsx]"]
  node_audit_ui["Audit log view<br/>[AuditLogPage.jsx]"]
  node_ai_ui["AI investigation"]
  node_integrations_ui["Integration management"]
  node_deployments_ui["Deployment history"]
end

subgraph group_api["Application API"]
  node_api_entry["FastAPI application<br/>[main.py]"]
  node_auth_routes["Authentication routes<br/>[auth.py]"]
  node_service_routes["Project and service routes<br/>[services.py]"]
  node_other_routes["Workspace routes"]
  node_integration_routes["Integration routes<br/>[integrations.py]"]
  node_deployment_routes["Deployment routes<br/>[deployments.py]"]
end

subgraph group_monitoring["Health and Incidents"]
  node_monitor_worker["Polling monitor<br/>[monitor.py]"]
  node_url_validation["URL safety checks<br/>[url_safety.py]"]
end

subgraph group_providers["Provider Intelligence"]
  node_release_correlator["Release correlation"]
  node_deployment_sync["Deployment sync<br/>[deployment_sync.py]"]
  node_provider_clients["Provider API clients<br/>[providers.py]"]
  node_github_client["GitHub commits<br/>[commit_client.py]"]
  node_vercel_client["Vercel client<br/>[client.py]"]
end

subgraph group_state["Persistence and Security"]
  node_credential_crypto["Credential encryption<br/>[crypto.py]"]
  node_auth_security["JWT and passwords<br/>[security.py]"]
  node_data_models["Domain records<br/>[models.py]"]
  node_database[("Relational database<br/>[database.py]")]
end

node_user(("Workspace user"))
node_demo_service["Bundled demo app<br/>[app.py]"]
node_provider_services["GitHub and Vercel"]

node_user -->|"uses"| node_app_ui
node_app_ui -->|"requests through"| node_api_client
node_app_ui -->|"renders"| node_overview
node_overview -->|"renders"| node_service_table
node_app_ui -->|"routes to"| node_incident_ui
node_app_ui -->|"routes to"| node_service_map_ui
node_app_ui -->|"routes to"| node_recovery_ui
node_app_ui -->|"routes to"| node_audit_ui
node_app_ui -->|"routes to"| node_ai_ui
node_app_ui -->|"routes to"| node_integrations_ui
node_app_ui -->|"routes to"| node_deployments_ui
node_api_client -.->|"calls"| node_api_entry
node_api_entry -->|"mounts"| node_auth_routes
node_api_entry -->|"mounts"| node_integration_routes
node_api_entry -->|"mounts"| node_deployment_routes
node_api_entry -->|"mounts"| node_other_routes
node_api_entry -->|"starts"| node_monitor_worker
node_auth_routes -->|"authenticates with"| node_auth_security
node_service_routes -->|"runs checks"| node_monitor_worker
node_service_routes -->|"validates URLs"| node_url_validation
node_monitor_worker -->|"validates targets"| node_url_validation
node_monitor_worker -.->|"checks health"| node_demo_service
node_integration_routes -->|"encrypts credentials"| node_credential_crypto
node_integration_routes -->|"uses"| node_provider_clients
node_deployment_routes -->|"invokes"| node_deployment_sync
node_deployment_sync -->|"fetches deployments"| node_vercel_client
node_deployment_sync -->|"fetches commits"| node_github_client
node_github_client -->|"requests through"| node_provider_clients
node_vercel_client -->|"requests through"| node_provider_clients
node_provider_clients -->|"calls APIs"| node_provider_services
node_deployment_routes -->|"uses"| node_release_correlator
node_auth_routes -->|"queries"| node_database
node_service_routes -->|"queries"| node_database
node_integration_routes -->|"queries"| node_database
node_deployment_routes -->|"queries"| node_database
node_monitor_worker -->|"reads and writes"| node_database
node_database -->|"maps records"| node_data_models
node_recovery_ui -.->|"requests local recovery"| node_demo_service
node_ai_ui -.->|"investigates via AI"| node_provider_services

click node_app_ui "https://github.com/gowthamn-sp/devpilot/blob/main/frontend/src/App.jsx"
click node_api_client "https://github.com/gowthamn-sp/devpilot/blob/main/frontend/src/api.js"
click node_overview "https://github.com/gowthamn-sp/devpilot/blob/main/frontend/src/features/pages/OverviewPage.jsx"
click node_service_table "https://github.com/gowthamn-sp/devpilot/blob/main/frontend/src/components/common/ServiceTable.jsx"
click node_incident_ui "https://github.com/gowthamn-sp/devpilot/blob/main/frontend/src/features/pages/IncidentsPage.jsx"
click node_service_map_ui "https://github.com/gowthamn-sp/devpilot/blob/main/frontend/src/features/pages/ServiceMapPage.jsx"
click node_recovery_ui "https://github.com/gowthamn-sp/devpilot/blob/main/frontend/src/features/pages/RecoveryPage.jsx"
click node_audit_ui "https://github.com/gowthamn-sp/devpilot/blob/main/frontend/src/features/pages/AuditLogPage.jsx"
click node_ai_ui "https://github.com/gowthamn-sp/devpilot/blob/main/frontend/src/features/pages/AIInvestigationPage.jsx"
click node_integrations_ui "https://github.com/gowthamn-sp/devpilot/blob/main/frontend/src/features/integrations/IntegrationsPage.jsx"
click node_deployments_ui "https://github.com/gowthamn-sp/devpilot/blob/main/frontend/src/features/deployments/pages/DeploymentsPage.jsx"
click node_api_entry "https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/main.py"
click node_auth_routes "https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/api/routes/auth.py"
click node_service_routes "https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/api/routes/services.py"
click node_other_routes "https://github.com/gowthamn-sp/devpilot/tree/main/backend/app/api/routes"
click node_integration_routes "https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/api/integrations.py"
click node_deployment_routes "https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/api/deployments.py"
click node_monitor_worker "https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/monitor.py"
click node_url_validation "https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/url_safety.py"
click node_release_correlator "https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/monitoring/release_correlator.py"
click node_deployment_sync "https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/services/deployment_sync.py"
click node_provider_clients "https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/integrations/providers.py"
click node_github_client "https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/integrations/github/commit_client.py"
click node_vercel_client "https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/integrations/vercel/client.py"
click node_credential_crypto "https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/integrations/crypto.py"
click node_auth_security "https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/security.py"
click node_data_models "https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/models.py"
click node_database "https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/database.py"
click node_demo_service "https://github.com/gowthamn-sp/devpilot/blob/main/demo-app/app.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_ui,node_api_client,node_overview,node_service_table,node_incident_ui,node_service_map_ui,node_recovery_ui,node_audit_ui,node_ai_ui,node_integrations_ui,node_deployments_ui,node_user toneBlue
class node_api_entry,node_auth_routes,node_service_routes,node_other_routes,node_integration_routes,node_deployment_routes toneAmber
class node_monitor_worker,node_url_validation toneMint
class node_release_correlator,node_deployment_sync,node_provider_clients,node_github_client,node_vercel_client toneRose
class node_credential_crypto,node_auth_security,node_data_models,node_database,node_provider_services toneIndigo
class node_demo_service toneTeal
```

## Components

### Workspace UI

- [Workspace shell](https://github.com/gowthamn-sp/devpilot/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [HTTP API client](https://github.com/gowthamn-sp/devpilot/blob/main/frontend/src/api.js): `frontend/src/api.js`
- [Overview dashboard](https://github.com/gowthamn-sp/devpilot/blob/main/frontend/src/features/pages/OverviewPage.jsx): `frontend/src/features/pages/OverviewPage.jsx`
- [Service controls](https://github.com/gowthamn-sp/devpilot/blob/main/frontend/src/components/common/ServiceTable.jsx): `frontend/src/components/common/ServiceTable.jsx`
- [Incident views](https://github.com/gowthamn-sp/devpilot/blob/main/frontend/src/features/pages/IncidentsPage.jsx): `frontend/src/features/pages/IncidentsPage.jsx`
- [Service map](https://github.com/gowthamn-sp/devpilot/blob/main/frontend/src/features/pages/ServiceMapPage.jsx): `frontend/src/features/pages/ServiceMapPage.jsx`
- [Recovery workspace](https://github.com/gowthamn-sp/devpilot/blob/main/frontend/src/features/pages/RecoveryPage.jsx): `frontend/src/features/pages/RecoveryPage.jsx`
- [Audit log view](https://github.com/gowthamn-sp/devpilot/blob/main/frontend/src/features/pages/AuditLogPage.jsx): `frontend/src/features/pages/AuditLogPage.jsx`
- [AI investigation](https://github.com/gowthamn-sp/devpilot/blob/main/frontend/src/features/pages/AIInvestigationPage.jsx): `frontend/src/features/pages/AIInvestigationPage.jsx`
- [Integration management](https://github.com/gowthamn-sp/devpilot/blob/main/frontend/src/features/integrations/IntegrationsPage.jsx): `frontend/src/features/integrations/IntegrationsPage.jsx`
- [Deployment history](https://github.com/gowthamn-sp/devpilot/blob/main/frontend/src/features/deployments/pages/DeploymentsPage.jsx): `frontend/src/features/deployments/pages/DeploymentsPage.jsx`

### Application API

- [FastAPI application](https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/main.py): `backend/app/main.py`
- [Authentication routes](https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/api/routes/auth.py): `backend/app/api/routes/auth.py`
- [Project and service routes](https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/api/routes/services.py): `backend/app/api/routes/services.py`
- [Workspace routes](https://github.com/gowthamn-sp/devpilot/tree/main/backend/app/api/routes): `backend/app/api/routes`
- [Integration routes](https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/api/integrations.py): `backend/app/api/integrations.py`
- [Deployment routes](https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/api/deployments.py): `backend/app/api/deployments.py`

### Health and Incidents

- [Polling monitor](https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/monitor.py): `backend/app/monitor.py`
- [URL safety checks](https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/url_safety.py): `backend/app/url_safety.py`

### Provider Intelligence

- [Release correlation](https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/monitoring/release_correlator.py): `backend/app/monitoring/release_correlator.py`
- [Deployment sync](https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/services/deployment_sync.py): `backend/app/services/deployment_sync.py`
- [Provider API clients](https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/integrations/providers.py): `backend/app/integrations/providers.py`
- [GitHub commits](https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/integrations/github/commit_client.py): `backend/app/integrations/github/commit_client.py`
- [Vercel client](https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/integrations/vercel/client.py): `backend/app/integrations/vercel/client.py`

### Persistence and Security

- [Credential encryption](https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/integrations/crypto.py): `backend/app/integrations/crypto.py`
- [JWT and passwords](https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/security.py): `backend/app/security.py`
- [Domain records](https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/models.py): `backend/app/models.py`
- [Relational database](https://github.com/gowthamn-sp/devpilot/blob/main/backend/app/database.py): `backend/app/database.py`

### Other components

- **Workspace user**
- [Bundled demo app](https://github.com/gowthamn-sp/devpilot/blob/main/demo-app/app.py): `demo-app/app.py`
- **GitHub and Vercel**

## Connections

- Workspace user → Workspace shell: uses
- Workspace shell → HTTP API client: requests through (evidence: `frontend/src/App.jsx`)
- Workspace shell → Overview dashboard: renders (evidence: `frontend/src/App.jsx`)
- Overview dashboard → Service controls: renders (evidence: `frontend/src/features/pages/OverviewPage.jsx`)
- Workspace shell → Incident views: routes to (evidence: `frontend/src/App.jsx`)
- Workspace shell → Service map: routes to (evidence: `frontend/src/App.jsx`)
- Workspace shell → Recovery workspace: routes to (evidence: `frontend/src/App.jsx`)
- Workspace shell → Audit log view: routes to (evidence: `frontend/src/App.jsx`)
- Workspace shell → AI investigation: routes to (evidence: `frontend/src/App.jsx`)
- Workspace shell → Integration management: routes to (evidence: `frontend/src/App.jsx`)
- Workspace shell → Deployment history: routes to (evidence: `frontend/src/App.jsx`)
- HTTP API client → FastAPI application: calls
- FastAPI application → Authentication routes: mounts (evidence: `backend/app/main.py`)
- FastAPI application → Integration routes: mounts (evidence: `backend/app/main.py`)
- FastAPI application → Deployment routes: mounts (evidence: `backend/app/main.py`)
- FastAPI application → Workspace routes: mounts (evidence: `backend/app/main.py`)
- FastAPI application → Polling monitor: starts (evidence: `backend/app/main.py`)
- Authentication routes → JWT and passwords: authenticates with (evidence: `backend/app/api/routes/auth.py`)
- Project and service routes → Polling monitor: runs checks (evidence: `backend/app/api/routes/services.py`)
- Project and service routes → URL safety checks: validates URLs (evidence: `backend/app/api/routes/services.py`)
- Polling monitor → URL safety checks: validates targets (evidence: `backend/app/monitor.py`)
- Polling monitor → Bundled demo app: checks health
- Integration routes → Credential encryption: encrypts credentials (evidence: `backend/app/api/integrations.py`)
- Integration routes → Provider API clients: uses (evidence: `backend/app/api/integrations.py`)
- Deployment routes → Deployment sync: invokes (evidence: `backend/app/api/deployments.py`)
- Deployment sync → Vercel client: fetches deployments (evidence: `backend/app/services/deployment_sync.py`)
- Deployment sync → GitHub commits: fetches commits (evidence: `backend/app/services/deployment_sync.py`)
- GitHub commits → Provider API clients: requests through (evidence: `backend/app/integrations/github/commit_client.py`)
- Vercel client → Provider API clients: requests through (evidence: `backend/app/integrations/vercel/client.py`)
- Provider API clients → GitHub and Vercel: calls APIs (evidence: `backend/app/integrations/providers.py`)
- Deployment routes → Release correlation: uses (evidence: `backend/app/api/deployments.py`)
- Authentication routes → Relational database: queries (evidence: `backend/app/api/routes/auth.py`)
- Project and service routes → Relational database: queries (evidence: `backend/app/api/routes/services.py`)
- Integration routes → Relational database: queries (evidence: `backend/app/api/integrations.py`)
- Deployment routes → Relational database: queries (evidence: `backend/app/api/deployments.py`)
- Polling monitor → Relational database: reads and writes (evidence: `backend/app/monitor.py`)
- Relational database → Domain records: maps records (evidence: `backend/app/models.py`)
- Recovery workspace → Bundled demo app: requests local recovery
- AI investigation → GitHub and Vercel: investigates via AI
