# manasanarayana174/mindrepo architecture

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

- Interactive diagram: https://gitdiagram.com/manasanarayana174/mindrepo
- Repository: https://github.com/manasanarayana174/mindrepo

## Overview

RepoMind is a local CLI for cloning and indexing repositories, then answering repository-scoped questions with RAG. The principal workflow runs from CLI commands through clone/index or ask/retrieve/generate; management commands also list, inspect, and delete repositories. The README documents Phoenix tracing and the local Ollama and Chroma integrations. Core control-flow links are supported by excerpts and the README; some capabilities are represented by their README-supported subsystem even where implementation detail was not sampled.

Main entry points: [`src/repomind/indexing/indexer.py`](https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/indexing/indexer.py) (Indexer), [`src/repomind/rag/rag_pipeline.py`](https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/rag/rag_pipeline.py) (RAG Pipeline), [`src/repomind/retrieval/retriever.py`](https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/retrieval/retriever.py) (Retriever), [`src/repomind/cli/app.py`](https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/cli/app.py) (Typer CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI and Management"]
  node_cli["Typer CLI<br/>[app.py]"]
  node_manager["Repository Manager"]
end

subgraph group_ingest["Repository Indexing"]
  node_indexer["Indexer<br/>[indexer.py]"]
  node_reader["Repository Reader"]
  node_parser["Document Parser<br/>[document_parser.py]"]
  node_chunker["Text Chunker<br/>[text_chunker.py]"]
  node_document["Document Model<br/>[document.py]"]
  node_chunk["Chunk Model<br/>[chunk.py]"]
end

subgraph group_rag["Question Answering"]
  node_rag["RAG Pipeline<br/>[rag_pipeline.py]"]
  node_retriever["Retriever<br/>[retriever.py]"]
  node_retrieved["Retrieved Chunk<br/>[retrieved_chunk.py]"]
  node_prompt["Prompt Builder<br/>[prompt_builder.py]"]
end

subgraph group_infra["Local Services"]
  node_embed["Embedding Generator"]
  node_store[("Chroma Vector Store<br/>[chroma_store.py]")]
  node_llm["Ollama Client<br/>[ollama_client.py]"]
  node_phoenix["Phoenix Tracing<br/>[phoenix.py]"]
end

node_user(("User"))
node_ollama{{"Ollama"}}
node_chroma[("ChromaDB")]
node_phoenix_service{{"Phoenix Service"}}

node_user -->|"runs commands"| node_cli
node_cli -->|"dispatches management"| node_manager
node_cli -->|"asks questions"| node_rag
node_manager -->|"indexes clone"| node_indexer
node_indexer -->|"reads files"| node_reader
node_indexer -->|"parses files"| node_parser
node_indexer -->|"chunks documents"| node_chunker
node_indexer -->|"embeds chunks"| node_embed
node_indexer -->|"stores vectors"| node_store
node_parser -->|"creates documents"| node_document
node_chunker -->|"consumes documents"| node_document
node_chunker -->|"creates chunks"| node_chunk
node_embed -->|"requests embeddings"| node_ollama
node_store -->|"persists and queries"| node_chroma
node_rag -->|"retrieves context"| node_retriever
node_rag -->|"builds prompt"| node_prompt
node_rag -->|"generates answer"| node_llm
node_rag -->|"records traces"| node_phoenix
node_retriever -->|"embeds question"| node_embed
node_retriever -->|"searches vectors"| node_store
node_retriever -->|"maps results"| node_retrieved
node_llm -->|"sends chat prompt"| node_ollama
node_phoenix -->|"exports traces"| node_phoenix_service

click node_cli "https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/cli/app.py"
click node_manager "https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/git/repository_manager.py"
click node_indexer "https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/indexing/indexer.py"
click node_reader "https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/reader/repository_reader.py"
click node_parser "https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/parser/document_parser.py"
click node_chunker "https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/chunker/text_chunker.py"
click node_document "https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/models/document.py"
click node_chunk "https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/models/chunk.py"
click node_embed "https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/embeddings/embedding_generator.py"
click node_store "https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/vectorstore/chroma_store.py"
click node_rag "https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/rag/rag_pipeline.py"
click node_retriever "https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/retrieval/retriever.py"
click node_retrieved "https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/models/retrieved_chunk.py"
click node_prompt "https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/prompt/prompt_builder.py"
click node_llm "https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/llm/ollama_client.py"
click node_phoenix "https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/observability/phoenix.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_manager,node_user toneBlue
class node_indexer,node_reader,node_parser,node_chunker,node_document,node_chunk,node_chroma toneAmber
class node_rag,node_retriever,node_retrieved,node_prompt toneMint
class node_embed,node_store,node_llm,node_phoenix toneRose
class node_ollama,node_phoenix_service toneIndigo
```

## Components

### CLI and Management

- [Typer CLI](https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/cli/app.py): `src/repomind/cli/app.py`
- [Repository Manager](https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/git/repository_manager.py): `src/repomind/git/repository_manager.py`

### Repository Indexing

- [Indexer](https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/indexing/indexer.py): `src/repomind/indexing/indexer.py`
- [Repository Reader](https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/reader/repository_reader.py): `src/repomind/reader/repository_reader.py`
- [Document Parser](https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/parser/document_parser.py): `src/repomind/parser/document_parser.py`
- [Text Chunker](https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/chunker/text_chunker.py): `src/repomind/chunker/text_chunker.py`
- [Document Model](https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/models/document.py): `src/repomind/models/document.py`
- [Chunk Model](https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/models/chunk.py): `src/repomind/models/chunk.py`

### Question Answering

- [RAG Pipeline](https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/rag/rag_pipeline.py): `src/repomind/rag/rag_pipeline.py`
- [Retriever](https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/retrieval/retriever.py): `src/repomind/retrieval/retriever.py`
- [Retrieved Chunk](https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/models/retrieved_chunk.py): `src/repomind/models/retrieved_chunk.py`
- [Prompt Builder](https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/prompt/prompt_builder.py): `src/repomind/prompt/prompt_builder.py`

### Local Services

- [Embedding Generator](https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/embeddings/embedding_generator.py): `src/repomind/embeddings/embedding_generator.py`
- [Chroma Vector Store](https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/vectorstore/chroma_store.py): `src/repomind/vectorstore/chroma_store.py`
- [Ollama Client](https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/llm/ollama_client.py): `src/repomind/llm/ollama_client.py`
- [Phoenix Tracing](https://github.com/manasanarayana174/mindrepo/blob/main/src/repomind/observability/phoenix.py): `src/repomind/observability/phoenix.py`

### Other components

- **User**
- **Ollama**
- **ChromaDB**
- **Phoenix Service**

## Connections

- User → Typer CLI: runs commands (evidence: `readme.md`)
- Typer CLI → Repository Manager: dispatches management (evidence: `src/repomind/cli/app.py`)
- Typer CLI → RAG Pipeline: asks questions (evidence: `src/repomind/cli/app.py`)
- Repository Manager → Indexer: indexes clone (evidence: `src/repomind/git/repository_manager.py`)
- Indexer → Repository Reader: reads files (evidence: `src/repomind/indexing/indexer.py`)
- Indexer → Document Parser: parses files (evidence: `src/repomind/indexing/indexer.py`)
- Indexer → Text Chunker: chunks documents (evidence: `src/repomind/indexing/indexer.py`)
- Indexer → Embedding Generator: embeds chunks (evidence: `src/repomind/indexing/indexer.py`)
- Indexer → Chroma Vector Store: stores vectors (evidence: `src/repomind/indexing/indexer.py`)
- Document Parser → Document Model: creates documents (evidence: `src/repomind/parser/document_parser.py`)
- Text Chunker → Document Model: consumes documents (evidence: `src/repomind/chunker/text_chunker.py`)
- Text Chunker → Chunk Model: creates chunks (evidence: `src/repomind/chunker/text_chunker.py`)
- Embedding Generator → Ollama: requests embeddings (evidence: `readme.md`)
- Chroma Vector Store → ChromaDB: persists and queries (evidence: `src/repomind/vectorstore/chroma_store.py`)
- RAG Pipeline → Retriever: retrieves context (evidence: `src/repomind/rag/rag_pipeline.py`)
- RAG Pipeline → Prompt Builder: builds prompt (evidence: `src/repomind/rag/rag_pipeline.py`)
- RAG Pipeline → Ollama Client: generates answer (evidence: `src/repomind/rag/rag_pipeline.py`)
- RAG Pipeline → Phoenix Tracing: records traces (evidence: `src/repomind/rag/rag_pipeline.py`)
- Retriever → Embedding Generator: embeds question (evidence: `src/repomind/retrieval/retriever.py`)
- Retriever → Chroma Vector Store: searches vectors (evidence: `src/repomind/retrieval/retriever.py`)
- Retriever → Retrieved Chunk: maps results (evidence: `src/repomind/retrieval/retriever.py`)
- Ollama Client → Ollama: sends chat prompt (evidence: `readme.md`)
- Phoenix Tracing → Phoenix Service: exports traces (evidence: `src/repomind/observability/phoenix.py`)
