# parth1609/vocaliz architecture

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

- Interactive diagram: https://gitdiagram.com/parth1609/vocaliz
- Repository: https://github.com/parth1609/vocaliz

## Overview

VocaliZ is a document-grounded conversational AI product, with an additional voice-call interface and a developing web frontend. Its main workflow is document upload and indexing, followed by retrieval-augmented question answering with persistent conversation history. The graph combines sampled calls and imports with explicitly documented capabilities; unsampled module internals and frontend-to-API wiring are not inferred.

Main entry points: [`app/modules/pipeline/pipeline.py`](https://github.com/parth1609/vocaliz/blob/main/app/modules/pipeline/pipeline.py) (RAG orchestration), [`app/modules/voice/service.py`](https://github.com/parth1609/vocaliz/blob/main/app/modules/voice/service.py) (Speech services), [`app/modules/voicebot/router.py`](https://github.com/parth1609/vocaliz/blob/main/app/modules/voicebot/router.py) (Voice call handler), [`streamlit_app.py`](https://github.com/parth1609/vocaliz/blob/main/streamlit_app.py) (Streamlit interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User interfaces"]
  node_api["FastAPI application<br/>[main.py]"]
  node_streamlit["Streamlit interface<br/>[streamlit_app.py]"]
  node_webapp["Web application<br/>[App.jsx]"]
  node_upload_ui["Document upload UI<br/>[DocumentUpload.jsx]"]
  node_call_logs["Call logs<br/>[CallLogs.jsx]"]
  node_settings["Settings page<br/>[Settings.jsx]"]
  node_voice_setup["Voice bot setup<br/>[VoiceBotSetup.jsx]"]
end

subgraph group_rag["RAG workflow"]
  node_pipeline_api["Pipeline routes<br/>[router.py]"]
  node_pipeline_service["Pipeline service<br/>[service.py]"]
  node_pipeline["RAG orchestration<br/>[pipeline.py]"]
end

subgraph group_services["Application services"]
  node_documents["Document processing<br/>[service.py]"]
  node_embeddings["Chunking and embeddings<br/>[service.py]"]
  node_vectorstore["Vector operations<br/>[service.py]"]
  node_retrieval["Search and reranking<br/>[service.py]"]
  node_llm["Answer generation<br/>[service.py]"]
  node_conversations["Conversation history<br/>[service.py]"]
  node_voicebot["Voice call handler<br/>[router.py]"]
  node_voice["Speech services<br/>[service.py]"]
end

subgraph group_state["Storage and providers"]
  node_supabase[("Supabase storage")]
  node_pinecone[("Pinecone vector database")]
  node_postgres[("PostgreSQL persistence")]
  node_groq["Groq language and speech APIs"]
  node_sarvam["Sarvam speech API"]
end

node_org_user(("Organization user"))
node_customer(("Question asker"))
node_exotel["Exotel AgentStream"]

node_api -->|"registers routes"| node_pipeline_api
node_org_user -.->|"uploads documents"| node_streamlit
node_customer -.->|"asks questions"| node_streamlit
node_streamlit -->|"invokes workflow"| node_pipeline
node_streamlit -->|"uses speech"| node_voice
node_webapp -->|"routes to"| node_upload_ui
node_webapp -->|"routes to"| node_call_logs
node_webapp -.->|"API integration"| node_pipeline_api
node_org_user -.->|"uploads documents"| node_upload_ui
node_pipeline_api -->|"calls"| node_pipeline_service
node_pipeline_service -->|"delegates to"| node_pipeline
node_pipeline -->|"loads documents"| node_documents
node_pipeline -->|"chunks and embeds"| node_embeddings
node_pipeline -->|"stores vectors"| node_vectorstore
node_pipeline -->|"retrieves context"| node_retrieval
node_pipeline -->|"generates answers"| node_llm
node_pipeline -->|"manages history"| node_conversations
node_documents -.->|"stores files"| node_supabase
node_vectorstore -.->|"stores vectors"| node_pinecone
node_retrieval -.->|"searches vectors"| node_pinecone
node_conversations -->|"persists history"| node_postgres
node_pipeline -->|"checkpoints threads"| node_postgres
node_llm -->|"requests completions"| node_groq
node_voicebot -->|"handles call stream"| node_exotel
node_voicebot -->|"synthesizes speech"| node_voice
node_voicebot -.->|"uses RAG workflow"| node_pipeline
node_voice -->|"transcribes audio"| node_groq
node_voice -.->|"optional speech service"| node_sarvam
node_voice -.->|"returns spoken response"| node_customer
node_call_logs -.->|"displays call data"| node_voicebot
node_voice_setup -.->|"configures voice bot"| node_voicebot
node_settings -.->|"configures account"| node_api

click node_api "https://github.com/parth1609/vocaliz/blob/main/app/main.py"
click node_streamlit "https://github.com/parth1609/vocaliz/blob/main/streamlit_app.py"
click node_webapp "https://github.com/parth1609/vocaliz/blob/main/frontend/src/App.jsx"
click node_upload_ui "https://github.com/parth1609/vocaliz/blob/main/frontend/src/components/DocumentUpload.jsx"
click node_call_logs "https://github.com/parth1609/vocaliz/blob/main/frontend/src/pages/CallLogs.jsx"
click node_settings "https://github.com/parth1609/vocaliz/blob/main/frontend/src/pages/Settings.jsx"
click node_voice_setup "https://github.com/parth1609/vocaliz/blob/main/frontend/src/pages/VoiceBotSetup.jsx"
click node_pipeline_api "https://github.com/parth1609/vocaliz/blob/main/app/modules/pipeline/router.py"
click node_pipeline_service "https://github.com/parth1609/vocaliz/blob/main/app/modules/pipeline/service.py"
click node_pipeline "https://github.com/parth1609/vocaliz/blob/main/app/modules/pipeline/pipeline.py"
click node_documents "https://github.com/parth1609/vocaliz/blob/main/app/modules/document/service.py"
click node_embeddings "https://github.com/parth1609/vocaliz/blob/main/app/modules/embedding/service.py"
click node_vectorstore "https://github.com/parth1609/vocaliz/blob/main/app/modules/vectorstore/service.py"
click node_retrieval "https://github.com/parth1609/vocaliz/blob/main/app/modules/retrieval/service.py"
click node_llm "https://github.com/parth1609/vocaliz/blob/main/app/modules/llm/service.py"
click node_conversations "https://github.com/parth1609/vocaliz/blob/main/app/modules/conversation/service.py"
click node_voicebot "https://github.com/parth1609/vocaliz/blob/main/app/modules/voicebot/router.py"
click node_voice "https://github.com/parth1609/vocaliz/blob/main/app/modules/voice/service.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_api,node_streamlit,node_webapp,node_upload_ui,node_call_logs,node_settings,node_voice_setup,node_org_user toneBlue
class node_pipeline_api,node_pipeline_service,node_pipeline toneAmber
class node_documents,node_embeddings,node_vectorstore,node_retrieval,node_llm,node_conversations,node_voicebot,node_voice toneMint
class node_supabase,node_pinecone,node_postgres,node_groq,node_sarvam toneRose
class node_customer,node_exotel toneIndigo
```

## Components

### User interfaces

- [FastAPI application](https://github.com/parth1609/vocaliz/blob/main/app/main.py): `app/main.py`
- [Streamlit interface](https://github.com/parth1609/vocaliz/blob/main/streamlit_app.py): `streamlit_app.py`
- [Web application](https://github.com/parth1609/vocaliz/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Document upload UI](https://github.com/parth1609/vocaliz/blob/main/frontend/src/components/DocumentUpload.jsx): `frontend/src/components/DocumentUpload.jsx`
- [Call logs](https://github.com/parth1609/vocaliz/blob/main/frontend/src/pages/CallLogs.jsx): `frontend/src/pages/CallLogs.jsx`
- [Settings page](https://github.com/parth1609/vocaliz/blob/main/frontend/src/pages/Settings.jsx): `frontend/src/pages/Settings.jsx`
- [Voice bot setup](https://github.com/parth1609/vocaliz/blob/main/frontend/src/pages/VoiceBotSetup.jsx): `frontend/src/pages/VoiceBotSetup.jsx`

### RAG workflow

- [Pipeline routes](https://github.com/parth1609/vocaliz/blob/main/app/modules/pipeline/router.py): `app/modules/pipeline/router.py`
- [Pipeline service](https://github.com/parth1609/vocaliz/blob/main/app/modules/pipeline/service.py): `app/modules/pipeline/service.py`
- [RAG orchestration](https://github.com/parth1609/vocaliz/blob/main/app/modules/pipeline/pipeline.py): `app/modules/pipeline/pipeline.py`

### Application services

- [Document processing](https://github.com/parth1609/vocaliz/blob/main/app/modules/document/service.py): `app/modules/document/service.py`
- [Chunking and embeddings](https://github.com/parth1609/vocaliz/blob/main/app/modules/embedding/service.py): `app/modules/embedding/service.py`
- [Vector operations](https://github.com/parth1609/vocaliz/blob/main/app/modules/vectorstore/service.py): `app/modules/vectorstore/service.py`
- [Search and reranking](https://github.com/parth1609/vocaliz/blob/main/app/modules/retrieval/service.py): `app/modules/retrieval/service.py`
- [Answer generation](https://github.com/parth1609/vocaliz/blob/main/app/modules/llm/service.py): `app/modules/llm/service.py`
- [Conversation history](https://github.com/parth1609/vocaliz/blob/main/app/modules/conversation/service.py): `app/modules/conversation/service.py`
- [Voice call handler](https://github.com/parth1609/vocaliz/blob/main/app/modules/voicebot/router.py): `app/modules/voicebot/router.py`
- [Speech services](https://github.com/parth1609/vocaliz/blob/main/app/modules/voice/service.py): `app/modules/voice/service.py`

### Storage and providers

- **Supabase storage**
- **Pinecone vector database**
- **PostgreSQL persistence**
- **Groq language and speech APIs**
- **Sarvam speech API**

### Other components

- **Organization user**
- **Question asker**
- **Exotel AgentStream**

## Connections

- FastAPI application → Pipeline routes: registers routes (evidence: `app/main.py`)
- Organization user → Streamlit interface: uploads documents (evidence: `README.md`)
- Question asker → Streamlit interface: asks questions (evidence: `README.md`)
- Streamlit interface → RAG orchestration: invokes workflow (evidence: `streamlit_app.py`)
- Streamlit interface → Speech services: uses speech (evidence: `streamlit_app.py`)
- Web application → Document upload UI: routes to (evidence: `frontend/src/App.jsx`)
- Web application → Call logs: routes to (evidence: `frontend/src/App.jsx`)
- Web application → Pipeline routes: API integration
- Organization user → Document upload UI: uploads documents (evidence: `README.md`)
- Pipeline routes → Pipeline service: calls (evidence: `app/modules/pipeline/router.py`)
- Pipeline service → RAG orchestration: delegates to (evidence: `app/modules/pipeline/service.py`)
- RAG orchestration → Document processing: loads documents (evidence: `app/modules/pipeline/pipeline.py`)
- RAG orchestration → Chunking and embeddings: chunks and embeds (evidence: `app/modules/pipeline/pipeline.py`)
- RAG orchestration → Vector operations: stores vectors (evidence: `app/modules/pipeline/pipeline.py`)
- RAG orchestration → Search and reranking: retrieves context (evidence: `app/modules/pipeline/pipeline.py`)
- RAG orchestration → Answer generation: generates answers (evidence: `app/modules/pipeline/pipeline.py`)
- RAG orchestration → Conversation history: manages history (evidence: `app/modules/pipeline/pipeline.py`)
- Document processing → Supabase storage: stores files (evidence: `README.md`)
- Vector operations → Pinecone vector database: stores vectors (evidence: `README.md`)
- Search and reranking → Pinecone vector database: searches vectors (evidence: `README.md`)
- Conversation history → PostgreSQL persistence: persists history (evidence: `app/modules/conversation/service.py`)
- RAG orchestration → PostgreSQL persistence: checkpoints threads (evidence: `app/modules/pipeline/pipeline.py`)
- Answer generation → Groq language and speech APIs: requests completions (evidence: `app/modules/llm/service.py`)
- Voice call handler → Exotel AgentStream: handles call stream (evidence: `app/modules/voicebot/router.py`)
- Voice call handler → Speech services: synthesizes speech (evidence: `app/modules/voicebot/router.py`)
- Voice call handler → RAG orchestration: uses RAG workflow (evidence: `app/modules/voicebot/router.py`)
- Speech services → Groq language and speech APIs: transcribes audio (evidence: `app/modules/voice/service.py`)
- Speech services → Sarvam speech API: optional speech service (evidence: `app/modules/voice/service.py`)
- Speech services → Question asker: returns spoken response
- Call logs → Voice call handler: displays call data
- Voice bot setup → Voice call handler: configures voice bot
- Settings page → FastAPI application: configures account
