# pawarprakash-devops/deployment-tracker architecture

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

- Interactive diagram: https://gitdiagram.com/pawarprakash-devops/deployment-tracker
- Repository: https://github.com/pawarprakash-devops/deployment-tracker

## Overview

VidAI Deployment Tracker ingests CI deployment events, records deployment and environment history, and presents operational dashboards for promotion drift, health, fleet telemetry, and Jira delivery metrics. The principal workflow is CI webhook → normalized deployment/environment record → dashboard or analytics view; users can also manage records and query Jira. The graph preserves the documented Jira, health, and promotion capabilities. Arrows are limited to relationships shown in excerpts, the SOURCE INDEX, or README; several route-to-page relationships are documented rather than source-inspected.

Main entry points: [`lib/db.ts`](https://github.com/pawarprakash-devops/deployment-tracker/blob/main/lib/db.ts) (Deployment store), [`app/page.tsx`](https://github.com/pawarprakash-devops/deployment-tracker/blob/main/app/page.tsx) (Deployment dashboard), [`app/api/webhook/route.ts`](https://github.com/pawarprakash-devops/deployment-tracker/blob/main/app/api/webhook/route.ts) (CI webhook), [`app/api/jira`](https://github.com/pawarprakash-devops/deployment-tracker/tree/main/app/api/jira) (Jira metrics and insights)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Deployment ingestion"]
  node_webhook["CI webhook<br/>[route.ts]"]
  node_database[("Deployment store<br/>[db.ts]")]
  node_alerts["Production alerts<br/>[alerts.ts]"]
end

subgraph group_operations["Deployment operations"]
  node_main["Deployment dashboard<br/>[page.tsx]"]
  node_deployapi["Deployment records API<br/>[route.ts]"]
  node_deploymentitem["Deployment item API<br/>[route.ts]"]
  node_environmentapi["Environment API<br/>[route.ts]"]
  node_environmentitem["Environment item API<br/>[route.ts]"]
end

subgraph group_delivery["Delivery insights"]
  node_driftui["Promotion radar<br/>[DriftRibbon.tsx]"]
  node_driftapi["Promotion comparison API<br/>[route.ts]"]
  node_commitsapi["Commit details API<br/>[route.ts]"]
  node_compareapi["Repository compare API<br/>[route.ts]"]
  node_healthpage["Environment health page<br/>[page.tsx]"]
  node_healthapi["Latest deploy health API<br/>[route.ts]"]
  node_clusterapi["Live cluster probes<br/>[route.ts]"]
  node_adminpage["Fleet telemetry<br/>[page.tsx]"]
  node_statsapi["DORA statistics API<br/>[route.ts]"]
end

subgraph group_jira["Jira analytics"]
  node_jirapage["Jira dashboard<br/>[page.tsx]"]
  node_jiraapi["Jira metrics and insights"]
  node_jirautil["Jira client and metrics<br/>[jira.ts]"]
end

node_ci(("CI system"))
node_operator(("Dashboard user"))
node_jira(("Jira Cloud"))

node_ci -->|"submits events"| node_webhook
node_webhook -->|"writes deployments"| node_database
node_webhook -->|"notifies"| node_alerts
node_operator -->|"views dashboard"| node_main
node_main -.->|"loads history"| node_deployapi
node_deployapi -->|"reads and writes"| node_database
node_deploymentitem -->|"updates records"| node_database
node_environmentapi -->|"manages environments"| node_database
node_environmentitem -->|"deletes environment"| node_database
node_main -->|"renders"| node_driftui
node_driftui -->|"fetches comparisons"| node_driftapi
node_operator -->|"checks health"| node_healthpage
node_healthpage -->|"loads latest success"| node_healthapi
node_healthapi -->|"reads deployments"| node_database
node_main -.->|"probes clusters"| node_clusterapi
node_operator -->|"reviews telemetry"| node_adminpage
node_adminpage -.->|"loads DORA metrics"| node_statsapi
node_statsapi -->|"reads deployments"| node_database
node_operator -->|"explores delivery"| node_jirapage
node_jirapage -.->|"requests Jira insights"| node_jiraapi
node_jiraapi -->|"uses metrics client"| node_jirautil
node_jiraapi -->|"reads deployment links"| node_database
node_jirautil -.->|"queries issues"| node_jira

click node_webhook "https://github.com/pawarprakash-devops/deployment-tracker/blob/main/app/api/webhook/route.ts"
click node_database "https://github.com/pawarprakash-devops/deployment-tracker/blob/main/lib/db.ts"
click node_alerts "https://github.com/pawarprakash-devops/deployment-tracker/blob/main/lib/alerts.ts"
click node_main "https://github.com/pawarprakash-devops/deployment-tracker/blob/main/app/page.tsx"
click node_deployapi "https://github.com/pawarprakash-devops/deployment-tracker/blob/main/app/api/deployments/route.ts"
click node_deploymentitem "https://github.com/pawarprakash-devops/deployment-tracker/blob/main/app/api/deployments/%5Bid%5D/route.ts"
click node_environmentapi "https://github.com/pawarprakash-devops/deployment-tracker/blob/main/app/api/environments/route.ts"
click node_environmentitem "https://github.com/pawarprakash-devops/deployment-tracker/blob/main/app/api/environments/%5Bid%5D/route.ts"
click node_driftui "https://github.com/pawarprakash-devops/deployment-tracker/blob/main/app/DriftRibbon.tsx"
click node_driftapi "https://github.com/pawarprakash-devops/deployment-tracker/blob/main/app/api/drift/route.ts"
click node_commitsapi "https://github.com/pawarprakash-devops/deployment-tracker/blob/main/app/api/drift/commits/route.ts"
click node_compareapi "https://github.com/pawarprakash-devops/deployment-tracker/blob/main/app/api/compare/route.ts"
click node_healthpage "https://github.com/pawarprakash-devops/deployment-tracker/blob/main/app/health/page.tsx"
click node_healthapi "https://github.com/pawarprakash-devops/deployment-tracker/blob/main/app/api/health/route.ts"
click node_clusterapi "https://github.com/pawarprakash-devops/deployment-tracker/blob/main/app/api/cluster-health/route.ts"
click node_adminpage "https://github.com/pawarprakash-devops/deployment-tracker/blob/main/app/admin/page.tsx"
click node_statsapi "https://github.com/pawarprakash-devops/deployment-tracker/blob/main/app/api/admin/stats/route.ts"
click node_jirapage "https://github.com/pawarprakash-devops/deployment-tracker/blob/main/app/jira/page.tsx"
click node_jiraapi "https://github.com/pawarprakash-devops/deployment-tracker/tree/main/app/api/jira"
click node_jirautil "https://github.com/pawarprakash-devops/deployment-tracker/blob/main/lib/jira.ts"

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_webhook,node_database,node_alerts,node_operator toneBlue
class node_main,node_deployapi,node_deploymentitem,node_environmentapi,node_environmentitem toneAmber
class node_driftui,node_driftapi,node_commitsapi,node_compareapi,node_healthpage,node_healthapi,node_clusterapi,node_adminpage,node_statsapi toneMint
class node_jirapage,node_jiraapi,node_jirautil toneRose
class node_ci,node_jira toneIndigo
```

## Components

### Deployment ingestion

- [CI webhook](https://github.com/pawarprakash-devops/deployment-tracker/blob/main/app/api/webhook/route.ts): `app/api/webhook/route.ts`
- [Deployment store](https://github.com/pawarprakash-devops/deployment-tracker/blob/main/lib/db.ts): `lib/db.ts`
- [Production alerts](https://github.com/pawarprakash-devops/deployment-tracker/blob/main/lib/alerts.ts): `lib/alerts.ts`

### Deployment operations

- [Deployment dashboard](https://github.com/pawarprakash-devops/deployment-tracker/blob/main/app/page.tsx): `app/page.tsx`
- [Deployment records API](https://github.com/pawarprakash-devops/deployment-tracker/blob/main/app/api/deployments/route.ts): `app/api/deployments/route.ts`
- [Deployment item API](https://github.com/pawarprakash-devops/deployment-tracker/blob/main/app/api/deployments/%5Bid%5D/route.ts): `app/api/deployments/[id]/route.ts`
- [Environment API](https://github.com/pawarprakash-devops/deployment-tracker/blob/main/app/api/environments/route.ts): `app/api/environments/route.ts`
- [Environment item API](https://github.com/pawarprakash-devops/deployment-tracker/blob/main/app/api/environments/%5Bid%5D/route.ts): `app/api/environments/[id]/route.ts`

### Delivery insights

- [Promotion radar](https://github.com/pawarprakash-devops/deployment-tracker/blob/main/app/DriftRibbon.tsx): `app/DriftRibbon.tsx`
- [Promotion comparison API](https://github.com/pawarprakash-devops/deployment-tracker/blob/main/app/api/drift/route.ts): `app/api/drift/route.ts`
- [Commit details API](https://github.com/pawarprakash-devops/deployment-tracker/blob/main/app/api/drift/commits/route.ts): `app/api/drift/commits/route.ts`
- [Repository compare API](https://github.com/pawarprakash-devops/deployment-tracker/blob/main/app/api/compare/route.ts): `app/api/compare/route.ts`
- [Environment health page](https://github.com/pawarprakash-devops/deployment-tracker/blob/main/app/health/page.tsx): `app/health/page.tsx`
- [Latest deploy health API](https://github.com/pawarprakash-devops/deployment-tracker/blob/main/app/api/health/route.ts): `app/api/health/route.ts`
- [Live cluster probes](https://github.com/pawarprakash-devops/deployment-tracker/blob/main/app/api/cluster-health/route.ts): `app/api/cluster-health/route.ts`
- [Fleet telemetry](https://github.com/pawarprakash-devops/deployment-tracker/blob/main/app/admin/page.tsx): `app/admin/page.tsx`
- [DORA statistics API](https://github.com/pawarprakash-devops/deployment-tracker/blob/main/app/api/admin/stats/route.ts): `app/api/admin/stats/route.ts`

### Jira analytics

- [Jira dashboard](https://github.com/pawarprakash-devops/deployment-tracker/blob/main/app/jira/page.tsx): `app/jira/page.tsx`
- [Jira metrics and insights](https://github.com/pawarprakash-devops/deployment-tracker/tree/main/app/api/jira): `app/api/jira`
- [Jira client and metrics](https://github.com/pawarprakash-devops/deployment-tracker/blob/main/lib/jira.ts): `lib/jira.ts`

### Other components

- **CI system**
- **Dashboard user**
- **Jira Cloud**

## Connections

- CI system → CI webhook: submits events
- CI webhook → Deployment store: writes deployments (evidence: `app/api/webhook/route.ts`)
- CI webhook → Production alerts: notifies (evidence: `app/api/webhook/route.ts`)
- Dashboard user → Deployment dashboard: views dashboard
- Deployment dashboard → Deployment records API: loads history
- Deployment records API → Deployment store: reads and writes (evidence: `app/api/deployments/route.ts`)
- Deployment item API → Deployment store: updates records (evidence: `app/api/deployments/[id]/route.ts`)
- Environment API → Deployment store: manages environments (evidence: `app/api/environments/route.ts`)
- Environment item API → Deployment store: deletes environment (evidence: `app/api/environments/[id]/route.ts`)
- Deployment dashboard → Promotion radar: renders (evidence: `app/page.tsx`)
- Promotion radar → Promotion comparison API: fetches comparisons (evidence: `app/DriftRibbon.tsx`)
- Dashboard user → Environment health page: checks health
- Environment health page → Latest deploy health API: loads latest success
- Latest deploy health API → Deployment store: reads deployments (evidence: `app/api/health/route.ts`)
- Deployment dashboard → Live cluster probes: probes clusters
- Dashboard user → Fleet telemetry: reviews telemetry
- Fleet telemetry → DORA statistics API: loads DORA metrics
- DORA statistics API → Deployment store: reads deployments (evidence: `app/api/admin/stats/route.ts`)
- Dashboard user → Jira dashboard: explores delivery
- Jira dashboard → Jira metrics and insights: requests Jira insights
- Jira metrics and insights → Jira client and metrics: uses metrics client (evidence: `app/api/jira/insights/route.ts`)
- Jira metrics and insights → Deployment store: reads deployment links (evidence: `app/api/jira/insights/route.ts`)
- Jira client and metrics → Jira Cloud: queries issues
