# sreeramrishitha/coralmind-lite architecture

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

- Interactive diagram: https://gitdiagram.com/sreeramrishitha/coralmind-lite
- Repository: https://github.com/sreeramrishitha/coralmind-lite

## Overview

CoralMind Lite is an AI engineering-intelligence assistant: users ask repository or incident questions, the backend classifies and routes them, queries GitHub/Sentry through Coral SQL, correlates operational incidents, and returns summaries and dashboard data. The React frontend also supports on-click PR explanations. Backend excerpts show incident and deployment helpers; README documents the broader cross-source and presentation capabilities. Some backend orchestration is omitted, so only documented or excerpt-supported relationships are shown.

Main entry points: [`backend/main.py`](https://github.com/sreeramrishitha/coralmind-lite/blob/master/backend/main.py) (FastAPI endpoints), [`frontend/src/pages/Home.jsx`](https://github.com/sreeramrishitha/coralmind-lite/blob/master/frontend/src/pages/Home.jsx) (Workspace UI), [`frontend/src/components/ChatBot.jsx`](https://github.com/sreeramrishitha/coralmind-lite/blob/master/frontend/src/components/ChatBot.jsx) (Chat UI), [`backend/incidents.py`](https://github.com/sreeramrishitha/coralmind-lite/blob/master/backend/incidents.py) (Incident repository)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["User experience"]
  node_home["Workspace UI<br/>[Home.jsx]"]
  node_chat["Chat UI<br/>[ChatBot.jsx]"]
  node_message["Result renderer<br/>[Message.jsx]"]
end

subgraph group_api["Question intelligence"]
  node_api["FastAPI endpoints<br/>[main.py]"]
  node_classifier["Question classifier<br/>[main.py]"]
  node_router["Semantic routing<br/>[semantic_router.py]"]
  node_sqlgen["SQL generation<br/>[main.py]"]
  node_summarizer["AI summaries<br/>[main.py]"]
  node_pr_explainer["PR explanation<br/>[main.py]"]
end

subgraph group_sources["Engineering data"]
  node_coral["Coral SQL runtime"]
  node_github[("GitHub tables")]
  node_sentry[("Sentry issues")]
end

subgraph group_correlation["Incident and release analysis"]
  node_incident_logic["Incident correlation<br/>[main.py]"]
  node_incident_service["Incident repository<br/>[incidents.py]"]
  node_incident_db[("Incident history<br/>[incidents.db]")]
  node_deployments["Deployment tracking<br/>[deployments.py]"]
end

node_engineer(("Engineer"))

node_engineer -->|"asks question"| node_home
node_engineer -->|"asks question"| node_chat
node_home -->|"posts question"| node_api
node_chat -->|"posts question"| node_api
node_api -->|"classifies"| node_classifier
node_api -->|"routes question"| node_router
node_api -->|"generates queries"| node_sqlgen
node_sqlgen -->|"executes SQL"| node_coral
node_coral -->|"queries tables"| node_github
node_coral -->|"queries issues"| node_sentry
node_api -->|"correlates results"| node_incident_logic
node_api -->|"loads incidents"| node_incident_service
node_incident_service -->|"reads records"| node_incident_db
node_api -->|"builds deployment logs"| node_deployments
node_api -->|"summarizes data"| node_summarizer
node_api -->|"explains PR"| node_pr_explainer
node_home -->|"requests PR explanation"| node_api
node_api -.->|"returns chat result"| node_message
node_api -->|"returns dashboard data"| node_home

click node_home "https://github.com/sreeramrishitha/coralmind-lite/blob/master/frontend/src/pages/Home.jsx"
click node_chat "https://github.com/sreeramrishitha/coralmind-lite/blob/master/frontend/src/components/ChatBot.jsx"
click node_message "https://github.com/sreeramrishitha/coralmind-lite/blob/master/frontend/src/components/Message.jsx"
click node_api "https://github.com/sreeramrishitha/coralmind-lite/blob/master/backend/main.py"
click node_classifier "https://github.com/sreeramrishitha/coralmind-lite/blob/master/backend/main.py"
click node_router "https://github.com/sreeramrishitha/coralmind-lite/blob/master/backend/semantic_router.py"
click node_sqlgen "https://github.com/sreeramrishitha/coralmind-lite/blob/master/backend/main.py"
click node_summarizer "https://github.com/sreeramrishitha/coralmind-lite/blob/master/backend/main.py"
click node_pr_explainer "https://github.com/sreeramrishitha/coralmind-lite/blob/master/backend/main.py"
click node_incident_logic "https://github.com/sreeramrishitha/coralmind-lite/blob/master/backend/main.py"
click node_incident_service "https://github.com/sreeramrishitha/coralmind-lite/blob/master/backend/incidents.py"
click node_incident_db "https://github.com/sreeramrishitha/coralmind-lite/blob/master/backend/incidents.db"
click node_deployments "https://github.com/sreeramrishitha/coralmind-lite/blob/master/backend/deployments.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_home,node_chat,node_message toneBlue
class node_api,node_classifier,node_router,node_sqlgen,node_summarizer,node_pr_explainer toneAmber
class node_coral,node_github,node_sentry toneMint
class node_incident_logic,node_incident_service,node_incident_db,node_deployments toneRose
class node_engineer toneIndigo
```

## Components

### User experience

- [Workspace UI](https://github.com/sreeramrishitha/coralmind-lite/blob/master/frontend/src/pages/Home.jsx): `frontend/src/pages/Home.jsx`
- [Chat UI](https://github.com/sreeramrishitha/coralmind-lite/blob/master/frontend/src/components/ChatBot.jsx): `frontend/src/components/ChatBot.jsx`
- [Result renderer](https://github.com/sreeramrishitha/coralmind-lite/blob/master/frontend/src/components/Message.jsx): `frontend/src/components/Message.jsx`

### Question intelligence

- [FastAPI endpoints](https://github.com/sreeramrishitha/coralmind-lite/blob/master/backend/main.py): `backend/main.py`
- [Question classifier](https://github.com/sreeramrishitha/coralmind-lite/blob/master/backend/main.py): `backend/main.py`
- [Semantic routing](https://github.com/sreeramrishitha/coralmind-lite/blob/master/backend/semantic_router.py): `backend/semantic_router.py`
- [SQL generation](https://github.com/sreeramrishitha/coralmind-lite/blob/master/backend/main.py): `backend/main.py`
- [AI summaries](https://github.com/sreeramrishitha/coralmind-lite/blob/master/backend/main.py): `backend/main.py`
- [PR explanation](https://github.com/sreeramrishitha/coralmind-lite/blob/master/backend/main.py): `backend/main.py`

### Engineering data

- **Coral SQL runtime**
- **GitHub tables**
- **Sentry issues**

### Incident and release analysis

- [Incident correlation](https://github.com/sreeramrishitha/coralmind-lite/blob/master/backend/main.py): `backend/main.py`
- [Incident repository](https://github.com/sreeramrishitha/coralmind-lite/blob/master/backend/incidents.py): `backend/incidents.py`
- [Incident history](https://github.com/sreeramrishitha/coralmind-lite/blob/master/backend/incidents.db): `backend/incidents.db`
- [Deployment tracking](https://github.com/sreeramrishitha/coralmind-lite/blob/master/backend/deployments.py): `backend/deployments.py`

### Other components

- **Engineer**

## Connections

- Engineer → Workspace UI: asks question (evidence: `frontend/src/pages/Home.jsx`)
- Engineer → Chat UI: asks question (evidence: `frontend/src/components/ChatBot.jsx`)
- Workspace UI → FastAPI endpoints: posts question (evidence: `frontend/src/pages/Home.jsx`)
- Chat UI → FastAPI endpoints: posts question (evidence: `frontend/src/components/ChatBot.jsx`)
- FastAPI endpoints → Question classifier: classifies (evidence: `README.md`)
- FastAPI endpoints → Semantic routing: routes question (evidence: `backend/main.py`)
- FastAPI endpoints → SQL generation: generates queries (evidence: `README.md`)
- SQL generation → Coral SQL runtime: executes SQL (evidence: `backend/main.py`)
- Coral SQL runtime → GitHub tables: queries tables (evidence: `README.md`)
- Coral SQL runtime → Sentry issues: queries issues (evidence: `README.md`)
- FastAPI endpoints → Incident correlation: correlates results (evidence: `README.md`)
- FastAPI endpoints → Incident repository: loads incidents (evidence: `backend/main.py`)
- Incident repository → Incident history: reads records (evidence: `backend/incidents.py`)
- FastAPI endpoints → Deployment tracking: builds deployment logs (evidence: `backend/main.py`)
- FastAPI endpoints → AI summaries: summarizes data (evidence: `README.md`)
- FastAPI endpoints → PR explanation: explains PR (evidence: `README.md`)
- Workspace UI → FastAPI endpoints: requests PR explanation (evidence: `frontend/src/pages/Home.jsx`)
- FastAPI endpoints → Result renderer: returns chat result
- FastAPI endpoints → Workspace UI: returns dashboard data (evidence: `frontend/src/pages/Home.jsx`)
