# yakoob-md/ripple_graph architecture

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

- Interactive diagram: https://gitdiagram.com/yakoob-md/ripple_graph
- Repository: https://github.com/yakoob-md/ripple_graph

## Overview

RippleGraph predicts pre-merge Python change impact: users import or open a repository, index its symbols and dependencies, submit a diff, and receive blast-radius, risk, and gate results. The graph preserves the documented dashboard, CLI, AI, approvals, notifications, background jobs, and mobile gate. Some subsystem paths and links come from README descriptions or the source index; unsampled implementations are not treated as inspected, so uncertain call edges are omitted.

Main entry points: [`backend/app/impact/change_impact_service.py`](https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/impact/change_impact_service.py) (Change Impact Analysis), [`frontend/src/services/api.ts`](https://github.com/yakoob-md/ripple_graph/blob/main/frontend/src/services/api.ts) (Typed API Client), [`backend/app/api`](https://github.com/yakoob-md/ripple_graph/tree/main/backend/app/api) (FastAPI Routers), [`backend/app/indexing/indexing_service.py`](https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/indexing/indexing_service.py) (AST Indexing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web and Mobile UI"]
  node_dashboard["Dashboard<br/>[App.tsx]"]
  node_workspace["Project Explorer"]
  node_change_ui["Change Analysis UI<br/>[ChangeAnalysis.tsx]"]
  node_graph_ui["Dependency Graph UI"]
  node_workflow_ui["DevOps Workflow<br/>[DevOpsWorkflow.tsx]"]
  node_mobile_ui["Mobile Gate<br/>[MobileApp.tsx]"]
  node_client["Typed API Client<br/>[api.ts]"]
end

subgraph group_ingestion["Repository and Indexing"]
  node_ingest["Repository Import<br/>[project_service.py]"]
  node_working_copy["Git Working Copy<br/>[working_copy.py]"]
  node_file_discovery["File Discovery<br/>[file_discovery.py]"]
  node_indexing["AST Indexing"]
  node_engine_index["Symbol Index Engine<br/>[indexer.py]"]
  node_revision["Revision Indexing<br/>[revision_engine.py]"]
end

subgraph group_analysis["Impact Analysis"]
  node_graph_builder["Dependency Graph Builder<br/>[graph_builder.py]"]
  node_graph_service["Graph Persistence<br/>[graph_service.py]"]
  node_impact_api["Change Impact Analysis"]
  node_diff_parser["Diff Parser<br/>[diff_parser.py]"]
  node_impact_traversal["Impact and Risk Engine<br/>[impact_analyzer.py]"]
end

subgraph group_platform["Jobs and Integrations"]
  node_retrieval["AI Context Retrieval"]
  node_ai["AI Advisor<br/>[ai_advisor.py]"]
  node_reporting["Impact Reporting"]
  node_cli["CLI Gate<br/>[cli.py]"]
  node_jobs["Background Jobs<br/>[jobs.py]"]
  node_job_handlers["Job Handlers<br/>[job_handlers.py]"]
  node_approvals["Approval Workflow"]
  node_notifications["Notifications"]
end

subgraph group_persistence["API and Persistence"]
  node_api["FastAPI Routers"]
  node_database[("Database<br/>[database.py]")]
  node_storage[("Artifact Storage<br/>[layout.py]")]
end

node_user(("Engineer"))
node_backend_actor(("CLI or CI"))
node_llm_service{{"LLM Provider"}}
node_alert_services{{"Alert Destinations"}}

node_user -->|"imports project"| node_dashboard
node_dashboard -->|"requests projects"| node_client
node_client -->|"calls HTTP API"| node_api
node_api -.->|"imports repository"| node_ingest
node_ingest -->|"creates working copy"| node_working_copy
node_working_copy -->|"enumerates files"| node_file_discovery
node_indexing -->|"discovers source files"| node_file_discovery
node_indexing -->|"indexes revisions"| node_engine_index
node_revision -->|"indexes sources"| node_engine_index
node_revision -->|"reads Git revisions"| node_working_copy
node_revision -->|"finds working files"| node_file_discovery
node_indexing -->|"saves index"| node_storage
node_revision -->|"stores revision index"| node_storage
node_indexing -.->|"builds graph"| node_graph_service
node_graph_service -->|"builds graph"| node_graph_builder
node_graph_service -->|"loads and saves graph"| node_storage
node_impact_api -->|"parses diff"| node_diff_parser
node_impact_api -.->|"computes impact"| node_impact_traversal
node_impact_api -->|"loads graph"| node_graph_service
node_impact_api -->|"indexes revisions"| node_engine_index
node_client -.->|"serves analysis requests"| node_change_ui
node_client -.->|"serves graph requests"| node_graph_ui
node_client -.->|"serves project requests"| node_workspace
node_client -.->|"serves workflow requests"| node_workflow_ui
node_client -.->|"serves gate requests"| node_mobile_ui
node_backend_actor -->|"runs analysis"| node_cli
node_cli -.->|"analyzes diff"| node_impact_api
node_api -.->|"submits job"| node_jobs
node_jobs -->|"dispatches work"| node_job_handlers
node_job_handlers -->|"runs indexing"| node_indexing
node_job_handlers -->|"builds graph"| node_graph_service
node_api -.->|"requests analysis"| node_impact_api
node_api -.->|"manages approvals"| node_approvals
node_api -.->|"dispatches alerts"| node_notifications
node_impact_api -.->|"provides analysis context"| node_ai
node_ai -.->|"retrieves code context"| node_retrieval
node_ai -.->|"requests AI output"| node_llm_service
node_impact_api -.->|"produces impact report"| node_reporting
node_notifications -.->|"sends alerts"| node_alert_services
node_api -.->|"persists application state"| node_database
node_ingest -.->|"registers project"| node_database

click node_dashboard "https://github.com/yakoob-md/ripple_graph/blob/main/frontend/src/App.tsx"
click node_workspace "https://github.com/yakoob-md/ripple_graph/blob/main/frontend/src/pages/ProjectExplorer.tsx"
click node_change_ui "https://github.com/yakoob-md/ripple_graph/blob/main/frontend/src/pages/ChangeAnalysis.tsx"
click node_graph_ui "https://github.com/yakoob-md/ripple_graph/blob/main/frontend/src/pages/DependencyGraph.tsx"
click node_workflow_ui "https://github.com/yakoob-md/ripple_graph/blob/main/frontend/src/pages/DevOpsWorkflow.tsx"
click node_mobile_ui "https://github.com/yakoob-md/ripple_graph/blob/main/frontend/src/pages/MobileApp.tsx"
click node_client "https://github.com/yakoob-md/ripple_graph/blob/main/frontend/src/services/api.ts"
click node_ingest "https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/services/project_service.py"
click node_working_copy "https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/services/working_copy.py"
click node_file_discovery "https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/ingestion/file_discovery.py"
click node_indexing "https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/indexing/indexing_service.py"
click node_engine_index "https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/engine/indexer.py"
click node_revision "https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/services/revision_engine.py"
click node_graph_builder "https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/graph/graph_builder.py"
click node_graph_service "https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/graph/graph_service.py"
click node_impact_api "https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/impact/change_impact_service.py"
click node_diff_parser "https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/impact/diff_parser.py"
click node_impact_traversal "https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/impact/impact_analyzer.py"
click node_retrieval "https://github.com/yakoob-md/ripple_graph/tree/main/backend/app/retrieval"
click node_ai "https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/services/ai_advisor.py"
click node_reporting "https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/reporting/report_generator.py"
click node_cli "https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/cli.py"
click node_jobs "https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/services/jobs.py"
click node_job_handlers "https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/services/job_handlers.py"
click node_approvals "https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/services/approval_service.py"
click node_notifications "https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/services/notification_service.py"
click node_api "https://github.com/yakoob-md/ripple_graph/tree/main/backend/app/api"
click node_database "https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/database/database.py"
click node_storage "https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/storage/layout.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_workspace,node_change_ui,node_graph_ui,node_workflow_ui,node_mobile_ui,node_client toneBlue
class node_ingest,node_working_copy,node_file_discovery,node_indexing,node_engine_index,node_revision toneAmber
class node_graph_builder,node_graph_service,node_impact_api,node_diff_parser,node_impact_traversal toneMint
class node_retrieval,node_ai,node_reporting,node_cli,node_jobs,node_job_handlers,node_approvals,node_notifications toneRose
class node_api,node_database,node_storage,node_user,node_backend_actor,node_llm_service,node_alert_services toneIndigo
```

## Components

### Web and Mobile UI

- [Dashboard](https://github.com/yakoob-md/ripple_graph/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Project Explorer](https://github.com/yakoob-md/ripple_graph/blob/main/frontend/src/pages/ProjectExplorer.tsx): `frontend/src/pages/ProjectExplorer.tsx`
- [Change Analysis UI](https://github.com/yakoob-md/ripple_graph/blob/main/frontend/src/pages/ChangeAnalysis.tsx): `frontend/src/pages/ChangeAnalysis.tsx`
- [Dependency Graph UI](https://github.com/yakoob-md/ripple_graph/blob/main/frontend/src/pages/DependencyGraph.tsx): `frontend/src/pages/DependencyGraph.tsx`
- [DevOps Workflow](https://github.com/yakoob-md/ripple_graph/blob/main/frontend/src/pages/DevOpsWorkflow.tsx): `frontend/src/pages/DevOpsWorkflow.tsx`
- [Mobile Gate](https://github.com/yakoob-md/ripple_graph/blob/main/frontend/src/pages/MobileApp.tsx): `frontend/src/pages/MobileApp.tsx`
- [Typed API Client](https://github.com/yakoob-md/ripple_graph/blob/main/frontend/src/services/api.ts): `frontend/src/services/api.ts`

### Repository and Indexing

- [Repository Import](https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/services/project_service.py): `backend/app/services/project_service.py`
- [Git Working Copy](https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/services/working_copy.py): `backend/app/services/working_copy.py`
- [File Discovery](https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/ingestion/file_discovery.py): `backend/app/ingestion/file_discovery.py`
- [AST Indexing](https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/indexing/indexing_service.py): `backend/app/indexing/indexing_service.py`
- [Symbol Index Engine](https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/engine/indexer.py): `backend/app/engine/indexer.py`
- [Revision Indexing](https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/services/revision_engine.py): `backend/app/services/revision_engine.py`

### Impact Analysis

- [Dependency Graph Builder](https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/graph/graph_builder.py): `backend/app/graph/graph_builder.py`
- [Graph Persistence](https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/graph/graph_service.py): `backend/app/graph/graph_service.py`
- [Change Impact Analysis](https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/impact/change_impact_service.py): `backend/app/impact/change_impact_service.py`
- [Diff Parser](https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/impact/diff_parser.py): `backend/app/impact/diff_parser.py`
- [Impact and Risk Engine](https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/impact/impact_analyzer.py): `backend/app/impact/impact_analyzer.py`

### Jobs and Integrations

- [AI Context Retrieval](https://github.com/yakoob-md/ripple_graph/tree/main/backend/app/retrieval): `backend/app/retrieval`
- [AI Advisor](https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/services/ai_advisor.py): `backend/app/services/ai_advisor.py`
- [Impact Reporting](https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/reporting/report_generator.py): `backend/app/reporting/report_generator.py`
- [CLI Gate](https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/cli.py): `backend/app/cli.py`
- [Background Jobs](https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/services/jobs.py): `backend/app/services/jobs.py`
- [Job Handlers](https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/services/job_handlers.py): `backend/app/services/job_handlers.py`
- [Approval Workflow](https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/services/approval_service.py): `backend/app/services/approval_service.py`
- [Notifications](https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/services/notification_service.py): `backend/app/services/notification_service.py`

### API and Persistence

- [FastAPI Routers](https://github.com/yakoob-md/ripple_graph/tree/main/backend/app/api): `backend/app/api`
- [Database](https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/database/database.py): `backend/app/database/database.py`
- [Artifact Storage](https://github.com/yakoob-md/ripple_graph/blob/main/backend/app/storage/layout.py): `backend/app/storage/layout.py`

### Other components

- **Engineer**
- **CLI or CI**
- **LLM Provider**
- **Alert Destinations**

## Connections

- Engineer → Dashboard: imports project (evidence: `frontend/src/App.tsx`)
- Dashboard → Typed API Client: requests projects (evidence: `frontend/src/App.tsx`)
- Typed API Client → FastAPI Routers: calls HTTP API (evidence: `frontend/src/services/api.ts`)
- FastAPI Routers → Repository Import: imports repository
- Repository Import → Git Working Copy: creates working copy (evidence: `backend/app/services/project_service.py`)
- Git Working Copy → File Discovery: enumerates files (evidence: `backend/app/services/revision_engine.py`)
- AST Indexing → File Discovery: discovers source files (evidence: `backend/app/indexing/indexing_service.py`)
- AST Indexing → Symbol Index Engine: indexes revisions (evidence: `backend/app/indexing/indexing_service.py`)
- Revision Indexing → Symbol Index Engine: indexes sources (evidence: `backend/app/services/revision_engine.py`)
- Revision Indexing → Git Working Copy: reads Git revisions (evidence: `backend/app/services/revision_engine.py`)
- Revision Indexing → File Discovery: finds working files (evidence: `backend/app/services/revision_engine.py`)
- AST Indexing → Artifact Storage: saves index (evidence: `backend/app/indexing/indexing_service.py`)
- Revision Indexing → Artifact Storage: stores revision index (evidence: `backend/app/services/revision_engine.py`)
- AST Indexing → Graph Persistence: builds graph
- Graph Persistence → Dependency Graph Builder: builds graph (evidence: `backend/app/graph/graph_service.py`)
- Graph Persistence → Artifact Storage: loads and saves graph (evidence: `backend/app/graph/graph_service.py`)
- Change Impact Analysis → Diff Parser: parses diff (evidence: `backend/app/impact/change_impact_service.py`)
- Change Impact Analysis → Impact and Risk Engine: computes impact (evidence: `backend/app/impact/change_impact_service.py`)
- Change Impact Analysis → Graph Persistence: loads graph (evidence: `backend/app/impact/change_impact_service.py`)
- Change Impact Analysis → Symbol Index Engine: indexes revisions (evidence: `backend/app/impact/change_impact_service.py`)
- Typed API Client → Change Analysis UI: serves analysis requests (evidence: `frontend/src/pages/ChangeAnalysis.tsx`)
- Typed API Client → Dependency Graph UI: serves graph requests (evidence: `frontend/src/pages/DependencyGraph.tsx`)
- Typed API Client → Project Explorer: serves project requests (evidence: `frontend/src/pages/ProjectExplorer.tsx`)
- Typed API Client → DevOps Workflow: serves workflow requests
- Typed API Client → Mobile Gate: serves gate requests (evidence: `frontend/src/pages/MobileApp.tsx`)
- CLI or CI → CLI Gate: runs analysis
- CLI Gate → Change Impact Analysis: analyzes diff
- FastAPI Routers → Background Jobs: submits job
- Background Jobs → Job Handlers: dispatches work (evidence: `backend/app/services/job_handlers.py`)
- Job Handlers → AST Indexing: runs indexing (evidence: `backend/app/services/job_handlers.py`)
- Job Handlers → Graph Persistence: builds graph (evidence: `backend/app/services/job_handlers.py`)
- FastAPI Routers → Change Impact Analysis: requests analysis
- FastAPI Routers → Approval Workflow: manages approvals
- FastAPI Routers → Notifications: dispatches alerts
- Change Impact Analysis → AI Advisor: provides analysis context
- AI Advisor → AI Context Retrieval: retrieves code context
- AI Advisor → LLM Provider: requests AI output
- Change Impact Analysis → Impact Reporting: produces impact report
- Notifications → Alert Destinations: sends alerts
- FastAPI Routers → Database: persists application state
- Repository Import → Database: registers project (evidence: `backend/app/services/project_service.py`)
