# nandinii26/docpilot architecture

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

- Interactive diagram: https://gitdiagram.com/nandinii26/docpilot
- Repository: https://github.com/nandinii26/docpilot

## Overview

DocPilot is a conversational document assistant with web/desktop-facing UI and a Python API. Users sign in, submit a request or document, and receive chat answers, document summaries, file-search results, generated presentations, or email drafts; the UI also exposes voice interaction. The visible backend workflow routes API requests through intent parsing and, where relevant, search, PDF extraction, and presentation generation. The API also owns authentication, voice, and persisted chat/session functionality. The README is empty, so capability coverage comes from sampled source and the source index; unsampled API routes are represented within the API node rather than inferred as separate services.

Main entry points: [`backend/api.py`](https://github.com/nandinii26/docpilot/blob/main/backend/api.py) (HTTP API), [`backend/orchestrator.py`](https://github.com/nandinii26/docpilot/blob/main/backend/orchestrator.py) (Request orchestration), [`ui/Conversational os/src/App.tsx`](https://github.com/nandinii26/docpilot/blob/main/ui/Conversational%20os/src/App.tsx) (Conversation UI), [`ui/Conversational os/src/AuthPage.tsx`](https://github.com/nandinii26/docpilot/blob/main/ui/Conversational%20os/src/AuthPage.tsx) (Sign-in UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client"]
  node_app["Conversation UI<br/>[App.tsx]"]
  node_authpage["Sign-in UI<br/>[AuthPage.tsx]"]
  node_uiconfig["API configuration<br/>[config.ts]"]
end

subgraph group_api["API and orchestration"]
  node_api["HTTP API<br/>[api.py]"]
  node_orchestrator["Request orchestration<br/>[orchestrator.py]"]
  node_parser["Intent parser<br/>[parser.py]"]
  node_services["LLM summary service<br/>[services.py]"]
end

subgraph group_documents["Document workflows"]
  node_search["File search<br/>[search.py]"]
  node_pipeline["PDF processing<br/>[pdfpipeline.py]"]
  node_pdfreader["PDF text reader<br/>[pdfreader.py]"]
  node_pptgen["Presentation generator<br/>[ppt_gen.py]"]
end

subgraph group_state["Identity and state"]
  node_database[("PostgreSQL access<br/>[database.py]")]
end

node_user(("User"))
node_google(("Google OAuth"))
node_gemini(("Gemini API"))

node_user -->|"submits requests"| node_app
node_app -->|"renders sign-in"| node_authpage
node_app -->|"fetches history"| node_api
node_authpage -->|"posts credentials"| node_api
node_app -->|"reads API base"| node_uiconfig
node_authpage -->|"reads API base"| node_uiconfig
node_authpage -->|"starts Google sign-in"| node_google
node_api -->|"routes requests"| node_orchestrator
node_api -->|"reads and writes"| node_database
node_api -->|"generates presentations"| node_pptgen
node_api -->|"requests summaries"| node_services
node_api -->|"registers OAuth"| node_google
node_api -->|"transcribes audio"| node_gemini
node_services -->|"generates summaries"| node_gemini
node_orchestrator -->|"classifies requests"| node_parser
node_orchestrator -->|"searches files"| node_search
node_orchestrator -->|"processes PDFs"| node_pipeline
node_pipeline -->|"extracts page text"| node_pdfreader
node_orchestrator -->|"builds slides"| node_pptgen
node_orchestrator -->|"summarizes content"| node_services

click node_app "https://github.com/nandinii26/docpilot/blob/main/ui/Conversational%20os/src/App.tsx"
click node_authpage "https://github.com/nandinii26/docpilot/blob/main/ui/Conversational%20os/src/AuthPage.tsx"
click node_uiconfig "https://github.com/nandinii26/docpilot/blob/main/ui/Conversational%20os/src/config.ts"
click node_api "https://github.com/nandinii26/docpilot/blob/main/backend/api.py"
click node_orchestrator "https://github.com/nandinii26/docpilot/blob/main/backend/orchestrator.py"
click node_parser "https://github.com/nandinii26/docpilot/blob/main/backend/prompts/parser.py"
click node_search "https://github.com/nandinii26/docpilot/blob/main/backend/file_searcher/search.py"
click node_pipeline "https://github.com/nandinii26/docpilot/blob/main/backend/automation/pdfpipeline.py"
click node_pdfreader "https://github.com/nandinii26/docpilot/blob/main/backend/automation/pdfreader.py"
click node_pptgen "https://github.com/nandinii26/docpilot/blob/main/backend/ppt_gen.py"
click node_services "https://github.com/nandinii26/docpilot/blob/main/backend/services.py"
click node_database "https://github.com/nandinii26/docpilot/blob/main/backend/database.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_authpage,node_uiconfig,node_user toneBlue
class node_api,node_orchestrator,node_parser,node_services toneAmber
class node_search,node_pipeline,node_pdfreader,node_pptgen,node_gemini toneMint
class node_database toneRose
class node_google toneIndigo
```

## Components

### Client

- [Conversation UI](https://github.com/nandinii26/docpilot/blob/main/ui/Conversational%20os/src/App.tsx): `ui/Conversational os/src/App.tsx`
- [Sign-in UI](https://github.com/nandinii26/docpilot/blob/main/ui/Conversational%20os/src/AuthPage.tsx): `ui/Conversational os/src/AuthPage.tsx`
- [API configuration](https://github.com/nandinii26/docpilot/blob/main/ui/Conversational%20os/src/config.ts): `ui/Conversational os/src/config.ts`

### API and orchestration

- [HTTP API](https://github.com/nandinii26/docpilot/blob/main/backend/api.py): `backend/api.py`
- [Request orchestration](https://github.com/nandinii26/docpilot/blob/main/backend/orchestrator.py): `backend/orchestrator.py`
- [Intent parser](https://github.com/nandinii26/docpilot/blob/main/backend/prompts/parser.py): `backend/prompts/parser.py`
- [LLM summary service](https://github.com/nandinii26/docpilot/blob/main/backend/services.py): `backend/services.py`

### Document workflows

- [File search](https://github.com/nandinii26/docpilot/blob/main/backend/file_searcher/search.py): `backend/file_searcher/search.py`
- [PDF processing](https://github.com/nandinii26/docpilot/blob/main/backend/automation/pdfpipeline.py): `backend/automation/pdfpipeline.py`
- [PDF text reader](https://github.com/nandinii26/docpilot/blob/main/backend/automation/pdfreader.py): `backend/automation/pdfreader.py`
- [Presentation generator](https://github.com/nandinii26/docpilot/blob/main/backend/ppt_gen.py): `backend/ppt_gen.py`

### Identity and state

- [PostgreSQL access](https://github.com/nandinii26/docpilot/blob/main/backend/database.py): `backend/database.py`

### Other components

- **User**
- **Google OAuth**
- **Gemini API**

## Connections

- User → Conversation UI: submits requests (evidence: `ui/Conversational os/src/App.tsx`)
- Conversation UI → Sign-in UI: renders sign-in (evidence: `ui/Conversational os/src/App.tsx`)
- Conversation UI → HTTP API: fetches history (evidence: `ui/Conversational os/src/App.tsx`)
- Sign-in UI → HTTP API: posts credentials (evidence: `ui/Conversational os/src/AuthPage.tsx`)
- Conversation UI → API configuration: reads API base (evidence: `ui/Conversational os/src/App.tsx`)
- Sign-in UI → API configuration: reads API base (evidence: `ui/Conversational os/src/AuthPage.tsx`)
- Sign-in UI → Google OAuth: starts Google sign-in (evidence: `ui/Conversational os/src/AuthPage.tsx`)
- HTTP API → Request orchestration: routes requests (evidence: `backend/api.py`)
- HTTP API → PostgreSQL access: reads and writes (evidence: `backend/api.py`)
- HTTP API → Presentation generator: generates presentations (evidence: `backend/api.py`)
- HTTP API → LLM summary service: requests summaries (evidence: `backend/api.py`)
- HTTP API → Google OAuth: registers OAuth (evidence: `backend/api.py`)
- HTTP API → Gemini API: transcribes audio (evidence: `backend/api.py`)
- LLM summary service → Gemini API: generates summaries (evidence: `backend/services.py`)
- Request orchestration → Intent parser: classifies requests (evidence: `backend/orchestrator.py`)
- Request orchestration → File search: searches files (evidence: `backend/orchestrator.py`)
- Request orchestration → PDF processing: processes PDFs (evidence: `backend/orchestrator.py`)
- PDF processing → PDF text reader: extracts page text (evidence: `backend/automation/pdfpipeline.py`)
- Request orchestration → Presentation generator: builds slides (evidence: `backend/orchestrator.py`)
- Request orchestration → LLM summary service: summarizes content (evidence: `backend/orchestrator.py`)
