# daivahealth/sprintiq architecture

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

- Interactive diagram: https://gitdiagram.com/daivahealth/sprintiq
- Repository: https://github.com/daivahealth/sprintiq

## Overview

SprintIQ is an engineering-intelligence platform that collects activity from source tools, correlates it into delivery context, derives metrics and risk insights, and presents them in dashboards and notifications. Its principal flow is documented from webhook and polling collection through ingestion, correlation, metrics, rules, analytics, and AI agents. The graph also includes identity/tenancy, integrations, and the frontend. Relationships for unsampled subsystems follow the README’s architecture overview; implementation-level details are not inferred.

Main entry points: [`backend/src/common/events/event-bus.ts`](https://github.com/daivahealth/sprintiq/blob/main/backend/src/common/events/event-bus.ts) (Domain Event Bus), [`backend/src/correlation/correlation.service.ts`](https://github.com/daivahealth/sprintiq/blob/main/backend/src/correlation/correlation.service.ts) (Delivery Correlation), [`backend/src/collectors/ingestion/ingestion.service.ts`](https://github.com/daivahealth/sprintiq/blob/main/backend/src/collectors/ingestion/ingestion.service.ts) (Event Ingestion), [`backend/src/modules/dashboards/dashboards.controller.ts`](https://github.com/daivahealth/sprintiq/blob/main/backend/src/modules/dashboards/dashboards.controller.ts) (Dashboards)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access &amp; Integrations"]
  node_identity["Identity &amp; RBAC"]
  node_tenancy["Tenant Context"]
  node_connections["Connections"]
  node_audit["Audit &amp; Lineage<br/>[audit.service.ts]"]
end

subgraph group_collection["Collection &amp; Events"]
  node_collectors["Native Collectors"]
  node_webhooks["Webhook Receivers"]
  node_ingestion["Event Ingestion"]
  node_event_bus["Domain Event Bus<br/>[event-bus.ts]"]
  node_raw_events[("Raw Event Store<br/>[prisma.service.ts]")]
end

subgraph group_domain["Domain &amp; Correlation"]
  node_planning["Planning Context"]
  node_code["Code Context<br/>[code.service.ts]"]
  node_ci_quality["CI &amp; Quality<br/>[ci.service.ts]"]
  node_correlation["Delivery Correlation"]
end

subgraph group_insight["Intelligence"]
  node_metrics["Engineering Metrics<br/>[metrics.service.ts]"]
  node_rules["Rules &amp; Risk<br/>[rules.service.ts]"]
  node_analytics["Analytics"]
  node_ai_agents["AI Agents"]
end

subgraph group_experience["Product Experience"]
  node_dashboards["Dashboards"]
  node_frontend["Web Dashboard<br/>[router.tsx]"]
  node_api_client["API Client<br/>[client.ts]"]
  node_notifications["Notifications"]
end

node_source_tools(("Source Tools"))
node_users(("Engineering Users"))

node_users -->|"use dashboards"| node_frontend
node_frontend -.->|"requests data"| node_api_client
node_api_client -.->|"calls API"| node_dashboards
node_users -->|"authenticate"| node_identity
node_identity -->|"establishes tenant"| node_tenancy
node_source_tools -->|"supply activity"| node_collectors
node_source_tools -->|"send webhooks"| node_webhooks
node_collectors -->|"submit events"| node_ingestion
node_webhooks -->|"submit events"| node_ingestion
node_ingestion -->|"persists raw events"| node_raw_events
node_ingestion -->|"publishes events"| node_event_bus
node_event_bus -->|"dispatches events"| node_planning
node_event_bus -->|"dispatches events"| node_code
node_event_bus -->|"dispatches events"| node_correlation
node_event_bus -->|"dispatches events"| node_ci_quality
node_correlation -->|"links work items"| node_planning
node_correlation -->|"links pull requests"| node_code
node_correlation -->|"provides context"| node_metrics
node_metrics -->|"feeds metrics"| node_rules
node_rules -->|"feeds risk"| node_analytics
node_analytics -->|"informs agents"| node_ai_agents
node_metrics -->|"serves insights"| node_dashboards
node_analytics -->|"serves insights"| node_dashboards
node_ai_agents -->|"supports recommendations"| node_dashboards
node_rules -->|"drives notifications"| node_notifications
node_connections -->|"configures collection"| node_collectors
node_audit -->|"records activity"| node_identity
node_source_tools -.->|"receives updates"| node_notifications

click node_identity "https://github.com/daivahealth/sprintiq/blob/main/backend/src/modules/identity/identity.service.ts"
click node_tenancy "https://github.com/daivahealth/sprintiq/blob/main/backend/src/common/tenancy/tenant-context.service.ts"
click node_connections "https://github.com/daivahealth/sprintiq/blob/main/backend/src/modules/connections/connections.service.ts"
click node_collectors "https://github.com/daivahealth/sprintiq/blob/main/backend/src/collectors/sources/github/github.collector.ts"
click node_webhooks "https://github.com/daivahealth/sprintiq/blob/main/backend/src/collectors/webhooks/webhooks.controller.ts"
click node_ingestion "https://github.com/daivahealth/sprintiq/blob/main/backend/src/collectors/ingestion/ingestion.service.ts"
click node_event_bus "https://github.com/daivahealth/sprintiq/blob/main/backend/src/common/events/event-bus.ts"
click node_raw_events "https://github.com/daivahealth/sprintiq/blob/main/backend/src/database/prisma.service.ts"
click node_planning "https://github.com/daivahealth/sprintiq/blob/main/backend/src/modules/planning/planning.service.ts"
click node_code "https://github.com/daivahealth/sprintiq/blob/main/backend/src/modules/code/code.service.ts"
click node_ci_quality "https://github.com/daivahealth/sprintiq/blob/main/backend/src/modules/ci/ci.service.ts"
click node_correlation "https://github.com/daivahealth/sprintiq/blob/main/backend/src/correlation/correlation.service.ts"
click node_metrics "https://github.com/daivahealth/sprintiq/blob/main/backend/src/metrics/metrics.service.ts"
click node_rules "https://github.com/daivahealth/sprintiq/blob/main/backend/src/rules/rules.service.ts"
click node_analytics "https://github.com/daivahealth/sprintiq/blob/main/backend/src/analytics/analytics.service.ts"
click node_ai_agents "https://github.com/daivahealth/sprintiq/blob/main/backend/src/ai-agents/ai-agents.service.ts"
click node_dashboards "https://github.com/daivahealth/sprintiq/blob/main/backend/src/modules/dashboards/dashboards.controller.ts"
click node_frontend "https://github.com/daivahealth/sprintiq/blob/main/frontend/src/app/router.tsx"
click node_api_client "https://github.com/daivahealth/sprintiq/blob/main/frontend/src/lib/api/client.ts"
click node_notifications "https://github.com/daivahealth/sprintiq/blob/main/backend/src/modules/notifications/notifications.service.ts"
click node_audit "https://github.com/daivahealth/sprintiq/blob/main/backend/src/modules/audit/audit.service.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_identity,node_tenancy,node_connections,node_audit,node_users toneBlue
class node_collectors,node_webhooks,node_ingestion,node_event_bus,node_raw_events toneAmber
class node_planning,node_code,node_ci_quality,node_correlation toneMint
class node_metrics,node_rules,node_analytics,node_ai_agents toneRose
class node_dashboards,node_frontend,node_api_client,node_notifications,node_source_tools toneIndigo
```

## Components

### Access & Integrations

- [Identity & RBAC](https://github.com/daivahealth/sprintiq/blob/main/backend/src/modules/identity/identity.service.ts): `backend/src/modules/identity/identity.service.ts`
- [Tenant Context](https://github.com/daivahealth/sprintiq/blob/main/backend/src/common/tenancy/tenant-context.service.ts): `backend/src/common/tenancy/tenant-context.service.ts`
- [Connections](https://github.com/daivahealth/sprintiq/blob/main/backend/src/modules/connections/connections.service.ts): `backend/src/modules/connections/connections.service.ts`
- [Audit & Lineage](https://github.com/daivahealth/sprintiq/blob/main/backend/src/modules/audit/audit.service.ts): `backend/src/modules/audit/audit.service.ts`

### Collection & Events

- [Native Collectors](https://github.com/daivahealth/sprintiq/blob/main/backend/src/collectors/sources/github/github.collector.ts): `backend/src/collectors/sources/github/github.collector.ts`
- [Webhook Receivers](https://github.com/daivahealth/sprintiq/blob/main/backend/src/collectors/webhooks/webhooks.controller.ts): `backend/src/collectors/webhooks/webhooks.controller.ts`
- [Event Ingestion](https://github.com/daivahealth/sprintiq/blob/main/backend/src/collectors/ingestion/ingestion.service.ts): `backend/src/collectors/ingestion/ingestion.service.ts`
- [Domain Event Bus](https://github.com/daivahealth/sprintiq/blob/main/backend/src/common/events/event-bus.ts): `backend/src/common/events/event-bus.ts`
- [Raw Event Store](https://github.com/daivahealth/sprintiq/blob/main/backend/src/database/prisma.service.ts): `backend/src/database/prisma.service.ts`

### Domain & Correlation

- [Planning Context](https://github.com/daivahealth/sprintiq/blob/main/backend/src/modules/planning/planning.service.ts): `backend/src/modules/planning/planning.service.ts`
- [Code Context](https://github.com/daivahealth/sprintiq/blob/main/backend/src/modules/code/code.service.ts): `backend/src/modules/code/code.service.ts`
- [CI & Quality](https://github.com/daivahealth/sprintiq/blob/main/backend/src/modules/ci/ci.service.ts): `backend/src/modules/ci/ci.service.ts`
- [Delivery Correlation](https://github.com/daivahealth/sprintiq/blob/main/backend/src/correlation/correlation.service.ts): `backend/src/correlation/correlation.service.ts`

### Intelligence

- [Engineering Metrics](https://github.com/daivahealth/sprintiq/blob/main/backend/src/metrics/metrics.service.ts): `backend/src/metrics/metrics.service.ts`
- [Rules & Risk](https://github.com/daivahealth/sprintiq/blob/main/backend/src/rules/rules.service.ts): `backend/src/rules/rules.service.ts`
- [Analytics](https://github.com/daivahealth/sprintiq/blob/main/backend/src/analytics/analytics.service.ts): `backend/src/analytics/analytics.service.ts`
- [AI Agents](https://github.com/daivahealth/sprintiq/blob/main/backend/src/ai-agents/ai-agents.service.ts): `backend/src/ai-agents/ai-agents.service.ts`

### Product Experience

- [Dashboards](https://github.com/daivahealth/sprintiq/blob/main/backend/src/modules/dashboards/dashboards.controller.ts): `backend/src/modules/dashboards/dashboards.controller.ts`
- [Web Dashboard](https://github.com/daivahealth/sprintiq/blob/main/frontend/src/app/router.tsx): `frontend/src/app/router.tsx`
- [API Client](https://github.com/daivahealth/sprintiq/blob/main/frontend/src/lib/api/client.ts): `frontend/src/lib/api/client.ts`
- [Notifications](https://github.com/daivahealth/sprintiq/blob/main/backend/src/modules/notifications/notifications.service.ts): `backend/src/modules/notifications/notifications.service.ts`

### Other components

- **Source Tools**
- **Engineering Users**

## Connections

- Engineering Users → Web Dashboard: use dashboards (evidence: `frontend/src/app/router.tsx`)
- Web Dashboard → API Client: requests data
- API Client → Dashboards: calls API
- Engineering Users → Identity & RBAC: authenticate
- Identity & RBAC → Tenant Context: establishes tenant (evidence: `backend/src/common/tenancy/tenant-context.service.ts`)
- Source Tools → Native Collectors: supply activity
- Source Tools → Webhook Receivers: send webhooks
- Native Collectors → Event Ingestion: submit events (evidence: `backend/src/collectors/ingestion/ingestion.service.ts`)
- Webhook Receivers → Event Ingestion: submit events (evidence: `backend/src/collectors/webhooks/webhooks.controller.ts`)
- Event Ingestion → Raw Event Store: persists raw events (evidence: `backend/src/collectors/ingestion/ingestion.service.ts`)
- Event Ingestion → Domain Event Bus: publishes events (evidence: `backend/src/collectors/ingestion/ingestion.service.ts`)
- Domain Event Bus → Planning Context: dispatches events (evidence: `backend/src/modules/planning/planning.service.ts`)
- Domain Event Bus → Code Context: dispatches events (evidence: `backend/src/modules/code/code.service.ts`)
- Domain Event Bus → Delivery Correlation: dispatches events (evidence: `backend/src/correlation/correlation.service.ts`)
- Domain Event Bus → CI & Quality: dispatches events
- Delivery Correlation → Planning Context: links work items (evidence: `backend/src/correlation/correlation.service.ts`)
- Delivery Correlation → Code Context: links pull requests (evidence: `backend/src/correlation/correlation.service.ts`)
- Delivery Correlation → Engineering Metrics: provides context
- Engineering Metrics → Rules & Risk: feeds metrics
- Rules & Risk → Analytics: feeds risk
- Analytics → AI Agents: informs agents
- Engineering Metrics → Dashboards: serves insights (evidence: `backend/src/modules/dashboards/dashboards.controller.ts`)
- Analytics → Dashboards: serves insights
- AI Agents → Dashboards: supports recommendations
- Rules & Risk → Notifications: drives notifications
- Connections → Native Collectors: configures collection
- Audit & Lineage → Identity & RBAC: records activity
- Source Tools → Notifications: receives updates
