# venu-16/askmypdf architecture

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

- Interactive diagram: https://gitdiagram.com/venu-16/askmypdf
- Repository: https://github.com/venu-16/askmypdf

## Overview

AskMyPdf is a small Streamlit app for asking questions about an uploaded PDF. Its main workflow indexes the PDF, then retrieves and displays relevant passages for each question. The app coordinates loading, chunking, embedding, indexing, and retrieval. Source excerpts show these calls in app.py; the README names the product but documents no additional capabilities.

Main entry points: [`app.py`](https://github.com/venu-16/askmypdf/blob/main/app.py) (Streamlit app), [`utils/documentloader.py`](https://github.com/venu-16/askmypdf/blob/main/utils/documentloader.py) (PDF loader), [`utils/TextSplitter.py`](https://github.com/venu-16/askmypdf/blob/main/utils/TextSplitter.py) (Text splitter), [`utils/Embeddings.py`](https://github.com/venu-16/askmypdf/blob/main/utils/Embeddings.py) (Embedding model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_app["Streamlit app<br/>[app.py]"]
end

subgraph group_indexing["PDF indexing"]
  node_pdf_loader["PDF loader<br/>[documentloader.py]"]
  node_text_splitter["Text splitter<br/>[TextSplitter.py]"]
  node_embeddings["Embedding model<br/>[Embeddings.py]"]
  node_vector_store[("FAISS index<br/>[vectoreStore.py]")]
end

subgraph group_search["Question search"]
  node_retriever["Passage retriever<br/>[Retriver.py]"]
end

node_user(("User"))

node_user -->|"uploads PDF"| node_app
node_user -->|"asks question"| node_app
node_app -->|"loads PDF"| node_pdf_loader
node_app -->|"splits documents"| node_text_splitter
node_app -->|"gets embeddings"| node_embeddings
node_app -->|"creates index"| node_vector_store
node_app -->|"searches passages"| node_retriever
node_app -->|"displays results"| node_user

click node_app "https://github.com/venu-16/askmypdf/blob/main/app.py"
click node_pdf_loader "https://github.com/venu-16/askmypdf/blob/main/utils/documentloader.py"
click node_text_splitter "https://github.com/venu-16/askmypdf/blob/main/utils/TextSplitter.py"
click node_embeddings "https://github.com/venu-16/askmypdf/blob/main/utils/Embeddings.py"
click node_vector_store "https://github.com/venu-16/askmypdf/blob/main/utils/vectoreStore.py"
click node_retriever "https://github.com/venu-16/askmypdf/blob/main/utils/Retriver.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_app,node_user toneBlue
class node_pdf_loader,node_text_splitter,node_embeddings,node_vector_store toneAmber
class node_retriever toneMint
```

## Components

### User interface

- [Streamlit app](https://github.com/venu-16/askmypdf/blob/main/app.py): `app.py`

### PDF indexing

- [PDF loader](https://github.com/venu-16/askmypdf/blob/main/utils/documentloader.py): `utils/documentloader.py`
- [Text splitter](https://github.com/venu-16/askmypdf/blob/main/utils/TextSplitter.py): `utils/TextSplitter.py`
- [Embedding model](https://github.com/venu-16/askmypdf/blob/main/utils/Embeddings.py): `utils/Embeddings.py`
- [FAISS index](https://github.com/venu-16/askmypdf/blob/main/utils/vectoreStore.py): `utils/vectoreStore.py`

### Question search

- [Passage retriever](https://github.com/venu-16/askmypdf/blob/main/utils/Retriver.py): `utils/Retriver.py`

### Other components

- **User**

## Connections

- User → Streamlit app: uploads PDF (evidence: `app.py`)
- User → Streamlit app: asks question (evidence: `app.py`)
- Streamlit app → PDF loader: loads PDF (evidence: `app.py`)
- Streamlit app → Text splitter: splits documents (evidence: `app.py`)
- Streamlit app → Embedding model: gets embeddings (evidence: `app.py`)
- Streamlit app → FAISS index: creates index (evidence: `app.py`)
- Streamlit app → Passage retriever: searches passages (evidence: `app.py`)
- Streamlit app → User: displays results (evidence: `app.py`)
