# arya-manohar-16/echomind architecture

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

- Interactive diagram: https://gitdiagram.com/arya-manohar-16/echomind
- Repository: https://github.com/arya-manohar-16/echomind

## Overview

EchoMind turns YouTube links or local recordings into transcripts, titles, summaries, action items, decisions, open questions, and a transcript-grounded chat. The CLI and web app both orchestrate audio preparation, transcription, analysis, and indexing; the web app additionally tracks jobs and exposes chat over HTTP and progress over WebSockets. The source excerpts show these calls directly. The optional Sarvam path is documented and implemented; other unsampled integrations and frontend wiring are represented only where shown.

Main entry points: [`backend/pipeline_runner.py`](https://github.com/arya-manohar-16/echomind/blob/main/backend/pipeline_runner.py) (Pipeline runner), [`main.py`](https://github.com/arya-manohar-16/echomind/blob/main/main.py) (CLI workflow), [`core/rag.py`](https://github.com/arya-manohar-16/echomind/blob/main/core/rag.py) (RAG chain), [`backend/app.py`](https://github.com/arya-manohar-16/echomind/blob/main/backend/app.py) (FastAPI service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["User interfaces"]
  node_cli["CLI workflow<br/>[main.py]"]
  node_webui["Web interface<br/>[app.js]"]
end

subgraph group_web["Web job service"]
  node_api["FastAPI service<br/>[app.py]"]
  node_jobstate[("In-memory jobs<br/>[app.py]")]
  node_runner["Pipeline runner<br/>[pipeline_runner.py]"]
end

subgraph group_processing["Recording processing"]
  node_audio["Audio preparation<br/>[audio_processor.py]"]
  node_transcription["Transcription<br/>[transcriber.py]"]
  node_analysis["Title and summary<br/>[summarize.py]"]
  node_extraction["Meeting extraction<br/>[extractor.py]"]
end

subgraph group_knowledge["Knowledge and chat"]
  node_rag["RAG chain<br/>[rag.py]"]
  node_vector[("Transcript index<br/>[vector_store.py]")]
end

subgraph group_integrations["External integrations"]
  node_mistral{{"Mistral AI"}}
  node_sarvam{{"Sarvam speech API"}}
  node_youtube{{"YouTube"}}
end

node_user(("User"))

node_user -->|"runs"| node_cli
node_user -->|"uses"| node_webui
node_webui -->|"submits jobs and questions"| node_api
node_api -->|"serves interface"| node_webui
node_api -->|"starts pipeline; runs chat"| node_runner
node_api -->|"updates job state"| node_jobstate
node_runner -->|"reports progress"| node_jobstate
node_cli -->|"prepares audio"| node_audio
node_cli -->|"transcribes chunks"| node_transcription
node_cli -->|"generates title and summary"| node_analysis
node_cli -->|"extracts meeting details"| node_extraction
node_cli -->|"builds and queries"| node_rag
node_runner -->|"prepares audio"| node_audio
node_runner -->|"transcribes chunks"| node_transcription
node_runner -->|"generates title and summary"| node_analysis
node_runner -->|"extracts meeting details"| node_extraction
node_runner -->|"builds chat chain"| node_rag
node_rag -->|"builds retrieval index"| node_vector
node_rag -->|"retrieves context"| node_vector
node_analysis -.->|"generates text"| node_mistral
node_extraction -.->|"extracts details"| node_mistral
node_rag -.->|"generates answers"| node_mistral
node_transcription -->|"transcribes Hinglish"| node_sarvam
node_audio -->|"downloads audio"| node_youtube

click node_cli "https://github.com/arya-manohar-16/echomind/blob/main/main.py"
click node_webui "https://github.com/arya-manohar-16/echomind/blob/main/frontend/static/app.js"
click node_api "https://github.com/arya-manohar-16/echomind/blob/main/backend/app.py"
click node_jobstate "https://github.com/arya-manohar-16/echomind/blob/main/backend/app.py"
click node_runner "https://github.com/arya-manohar-16/echomind/blob/main/backend/pipeline_runner.py"
click node_audio "https://github.com/arya-manohar-16/echomind/blob/main/utils/audio_processor.py"
click node_transcription "https://github.com/arya-manohar-16/echomind/blob/main/core/transcriber.py"
click node_analysis "https://github.com/arya-manohar-16/echomind/blob/main/core/summarize.py"
click node_extraction "https://github.com/arya-manohar-16/echomind/blob/main/core/extractor.py"
click node_rag "https://github.com/arya-manohar-16/echomind/blob/main/core/rag.py"
click node_vector "https://github.com/arya-manohar-16/echomind/blob/main/core/vector_store.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_cli,node_webui,node_user toneBlue
class node_api,node_jobstate,node_runner toneAmber
class node_audio,node_transcription,node_analysis,node_extraction toneMint
class node_rag,node_vector toneRose
class node_mistral,node_sarvam,node_youtube toneIndigo
```

## Components

### User interfaces

- [CLI workflow](https://github.com/arya-manohar-16/echomind/blob/main/main.py): `main.py`
- [Web interface](https://github.com/arya-manohar-16/echomind/blob/main/frontend/static/app.js): `frontend/static/app.js`

### Web job service

- [FastAPI service](https://github.com/arya-manohar-16/echomind/blob/main/backend/app.py): `backend/app.py`
- [In-memory jobs](https://github.com/arya-manohar-16/echomind/blob/main/backend/app.py): `backend/app.py`
- [Pipeline runner](https://github.com/arya-manohar-16/echomind/blob/main/backend/pipeline_runner.py): `backend/pipeline_runner.py`

### Recording processing

- [Audio preparation](https://github.com/arya-manohar-16/echomind/blob/main/utils/audio_processor.py): `utils/audio_processor.py`
- [Transcription](https://github.com/arya-manohar-16/echomind/blob/main/core/transcriber.py): `core/transcriber.py`
- [Title and summary](https://github.com/arya-manohar-16/echomind/blob/main/core/summarize.py): `core/summarize.py`
- [Meeting extraction](https://github.com/arya-manohar-16/echomind/blob/main/core/extractor.py): `core/extractor.py`

### Knowledge and chat

- [RAG chain](https://github.com/arya-manohar-16/echomind/blob/main/core/rag.py): `core/rag.py`
- [Transcript index](https://github.com/arya-manohar-16/echomind/blob/main/core/vector_store.py): `core/vector_store.py`

### External integrations

- **Mistral AI**
- **Sarvam speech API**
- **YouTube**

### Other components

- **User**

## Connections

- User → CLI workflow: runs (evidence: `README.md`)
- User → Web interface: uses (evidence: `README.md`)
- Web interface → FastAPI service: submits jobs and questions (evidence: `frontend/static/app.js`)
- FastAPI service → Web interface: serves interface (evidence: `backend/app.py`)
- FastAPI service → Pipeline runner: starts pipeline; runs chat (evidence: `backend/app.py`)
- FastAPI service → In-memory jobs: updates job state (evidence: `backend/app.py`)
- Pipeline runner → In-memory jobs: reports progress (evidence: `backend/app.py`)
- CLI workflow → Audio preparation: prepares audio (evidence: `main.py`)
- CLI workflow → Transcription: transcribes chunks (evidence: `main.py`)
- CLI workflow → Title and summary: generates title and summary (evidence: `main.py`)
- CLI workflow → Meeting extraction: extracts meeting details (evidence: `main.py`)
- CLI workflow → RAG chain: builds and queries (evidence: `main.py`)
- Pipeline runner → Audio preparation: prepares audio (evidence: `backend/pipeline_runner.py`)
- Pipeline runner → Transcription: transcribes chunks (evidence: `backend/pipeline_runner.py`)
- Pipeline runner → Title and summary: generates title and summary (evidence: `backend/pipeline_runner.py`)
- Pipeline runner → Meeting extraction: extracts meeting details (evidence: `backend/pipeline_runner.py`)
- Pipeline runner → RAG chain: builds chat chain (evidence: `backend/pipeline_runner.py`)
- RAG chain → Transcript index: builds retrieval index (evidence: `core/rag.py`)
- RAG chain → Transcript index: retrieves context (evidence: `core/rag.py`)
- Title and summary → Mistral AI: generates text
- Meeting extraction → Mistral AI: extracts details
- RAG chain → Mistral AI: generates answers
- Transcription → Sarvam speech API: transcribes Hinglish (evidence: `core/transcriber.py`)
- Audio preparation → YouTube: downloads audio (evidence: `README.md`)
