# mathur-yash/devpulse architecture

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

- Interactive diagram: https://gitdiagram.com/mathur-yash/devpulse
- Repository: https://github.com/mathur-yash/devpulse

## Overview

DevPulse is a GitHub Actions and deployment monitoring dashboard. Users sign in, connect a repository, sync GitHub history, then inspect workflows, deployments, performance, and failure investigations; release readiness and test-stability analysis provide additional evidence-based views. The backend exposes the API, coordinates GitHub access, and persists account-scoped data, while browser code renders the dashboard and insight dialogs. The excerpts establish app routing, GitHub/JUnit requests, and selected UI requests; some subsystem connections are omitted where implementation was not shown.

Main entry points: [`backend/routers/api.py`](https://github.com/mathur-yash/devpulse/blob/main/backend/routers/api.py) (Account and repository API), [`backend/main.py`](https://github.com/mathur-yash/devpulse/blob/main/backend/main.py) (FastAPI application), [`frontend/script.js`](https://github.com/mathur-yash/devpulse/blob/main/frontend/script.js) (Workflow dashboard), [`backend/services/junit.py`](https://github.com/mathur-yash/devpulse/blob/main/backend/services/junit.py) (JUnit report reader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_browser["Dashboard"]
  node_dashboard["Workflow dashboard<br/>[script.js]"]
  node_insight_views["Insight views<br/>[insights.js]"]
end

subgraph group_api["Application API"]
  node_app["FastAPI application<br/>[main.py]"]
  node_api_routes["Account and repository API<br/>[api.py]"]
  node_auth["Authentication<br/>[auth.py]"]
  node_oauth["GitHub OAuth sessions<br/>[oauth.py]"]
end

subgraph group_integrations["GitHub services"]
  node_github_sync["Run and deployment sync<br/>[github.py]"]
  node_junit["JUnit report reader<br/>[junit.py]"]
  node_insights["Readiness and test signals<br/>[insights.py]"]
end

subgraph group_persistence["Persistence"]
  node_db_config["Database engines<br/>[database.py]"]
  node_schema["Domain schema<br/>[models.py]"]
end

node_user(("Repository user"))
node_github{{"GitHub API"}}
node_artifact_store{{"GitHub artifacts"}}
node_database[("SQLite or PostgreSQL")]

node_user -->|"uses"| node_dashboard
node_dashboard -->|"loads dashboard"| node_app
node_app -->|"mounts routes"| node_api_routes
node_dashboard -->|"requests sync"| node_api_routes
node_insight_views -->|"requests analysis"| node_api_routes
node_api_routes -->|"fetches GitHub data"| node_github_sync
node_github_sync -->|"requests runs"| node_github
node_api_routes -->|"reads reports"| node_junit
node_junit -->|"lists artifacts"| node_github
node_junit -->|"downloads report"| node_artifact_store
node_app -->|"creates sessions"| node_oauth
node_app -->|"creates engine"| node_db_config
node_app -->|"creates schema"| node_schema
node_db_config -->|"connects"| node_database
node_api_routes -.->|"uses authentication"| node_auth
node_api_routes -.->|"computes readiness"| node_insights
node_api_routes -.->|"reads and writes records"| node_schema

click node_dashboard "https://github.com/mathur-yash/devpulse/blob/main/frontend/script.js"
click node_insight_views "https://github.com/mathur-yash/devpulse/blob/main/frontend/insights.js"
click node_app "https://github.com/mathur-yash/devpulse/blob/main/backend/main.py"
click node_api_routes "https://github.com/mathur-yash/devpulse/blob/main/backend/routers/api.py"
click node_auth "https://github.com/mathur-yash/devpulse/blob/main/backend/auth.py"
click node_oauth "https://github.com/mathur-yash/devpulse/blob/main/backend/services/oauth.py"
click node_github_sync "https://github.com/mathur-yash/devpulse/blob/main/backend/services/github.py"
click node_junit "https://github.com/mathur-yash/devpulse/blob/main/backend/services/junit.py"
click node_insights "https://github.com/mathur-yash/devpulse/blob/main/backend/services/insights.py"
click node_db_config "https://github.com/mathur-yash/devpulse/blob/main/backend/database.py"
click node_schema "https://github.com/mathur-yash/devpulse/blob/main/backend/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_dashboard,node_insight_views,node_user toneBlue
class node_app,node_api_routes,node_auth,node_oauth,node_database toneAmber
class node_github_sync,node_junit,node_insights,node_github toneMint
class node_db_config,node_schema toneRose
class node_artifact_store toneIndigo
```

## Components

### Dashboard

- [Workflow dashboard](https://github.com/mathur-yash/devpulse/blob/main/frontend/script.js): `frontend/script.js`
- [Insight views](https://github.com/mathur-yash/devpulse/blob/main/frontend/insights.js): `frontend/insights.js`

### Application API

- [FastAPI application](https://github.com/mathur-yash/devpulse/blob/main/backend/main.py): `backend/main.py`
- [Account and repository API](https://github.com/mathur-yash/devpulse/blob/main/backend/routers/api.py): `backend/routers/api.py`
- [Authentication](https://github.com/mathur-yash/devpulse/blob/main/backend/auth.py): `backend/auth.py`
- [GitHub OAuth sessions](https://github.com/mathur-yash/devpulse/blob/main/backend/services/oauth.py): `backend/services/oauth.py`

### GitHub services

- [Run and deployment sync](https://github.com/mathur-yash/devpulse/blob/main/backend/services/github.py): `backend/services/github.py`
- [JUnit report reader](https://github.com/mathur-yash/devpulse/blob/main/backend/services/junit.py): `backend/services/junit.py`
- [Readiness and test signals](https://github.com/mathur-yash/devpulse/blob/main/backend/services/insights.py): `backend/services/insights.py`

### Persistence

- [Database engines](https://github.com/mathur-yash/devpulse/blob/main/backend/database.py): `backend/database.py`
- [Domain schema](https://github.com/mathur-yash/devpulse/blob/main/backend/models.py): `backend/models.py`

### Other components

- **Repository user**
- **GitHub API**
- **GitHub artifacts**
- **SQLite or PostgreSQL**

## Connections

- Repository user → Workflow dashboard: uses (evidence: `README.md`)
- Workflow dashboard → FastAPI application: loads dashboard (evidence: `backend/main.py`)
- FastAPI application → Account and repository API: mounts routes (evidence: `backend/main.py`)
- Workflow dashboard → Account and repository API: requests sync (evidence: `frontend/script.js`)
- Insight views → Account and repository API: requests analysis (evidence: `frontend/insights.js`)
- Account and repository API → Run and deployment sync: fetches GitHub data (evidence: `backend/routers/api.py`)
- Run and deployment sync → GitHub API: requests runs (evidence: `backend/services/github.py`)
- Account and repository API → JUnit report reader: reads reports (evidence: `backend/routers/api.py`)
- JUnit report reader → GitHub API: lists artifacts (evidence: `backend/services/junit.py`)
- JUnit report reader → GitHub artifacts: downloads report (evidence: `backend/services/junit.py`)
- FastAPI application → GitHub OAuth sessions: creates sessions (evidence: `backend/main.py`)
- FastAPI application → Database engines: creates engine (evidence: `backend/main.py`)
- FastAPI application → Domain schema: creates schema (evidence: `backend/main.py`)
- Database engines → SQLite or PostgreSQL: connects (evidence: `backend/database.py`)
- Account and repository API → Authentication: uses authentication (evidence: `backend/routers/api.py`)
- Account and repository API → Readiness and test signals: computes readiness (evidence: `backend/routers/api.py`)
- Account and repository API → Domain schema: reads and writes records (evidence: `backend/routers/api.py`)
