# nikhilraman12/vaaniflow-ai-agentic-intelligence architecture

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

- Interactive diagram: https://gitdiagram.com/nikhilraman12/vaaniflow-ai-agentic-intelligence
- Repository: https://github.com/nikhilraman12/vaaniflow-ai-agentic-intelligence

## Overview

VaaniFlow AI is a demo-focused multilingual distributor order workflow: staff submit voice, text, sample, or manual orders; extraction produces a structured draft, deterministic catalogue/customer and inventory checks support review, and confirmation persists the order. The Streamlit app also exposes dashboard, catalogue/customer, order-management, and export capabilities. The README documents the main boundaries; source excerpts additionally show database seeding and validation details. Some UI-to-service calls and dashboard data paths are documented but not visible in the sampled call sites.

Main entry points: [`streamlit_app.py`](https://github.com/nikhilraman12/vaaniflow-ai-agentic-intelligence/blob/main/streamlit_app.py) (Order Review), [`app/database.py`](https://github.com/nikhilraman12/vaaniflow-ai-agentic-intelligence/blob/main/app/database.py) (Order & Catalogue Store), [`app/ai_service.py`](https://github.com/nikhilraman12/vaaniflow-ai-agentic-intelligence/blob/main/app/ai_service.py) (Voice & Text Extraction), [`app/models.py`](https://github.com/nikhilraman12/vaaniflow-ai-agentic-intelligence/blob/main/app/models.py) (Order Data Contracts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Streamlit Experience"]
  node_app["Streamlit App<br/>[streamlit_app.py]"]
  node_order_ui["Order Review<br/>[streamlit_app.py]"]
  node_ops_ui["Ops Dashboard<br/>[streamlit_app.py]"]
  node_catalog_ui["Catalogue &amp; Customers<br/>[streamlit_app.py]"]
  node_exports["Receipt &amp; CSV Export<br/>[ui_components.py]"]
end

subgraph group_orderflow["Order Processing"]
  node_ai["Voice &amp; Text Extraction<br/>[ai_service.py]"]
  node_contracts["Order Data Contracts<br/>[models.py]"]
  node_parser["Demo Order Parser<br/>[order_engine.py]"]
  node_validation["Draft Validation<br/>[order_engine.py]"]
  node_configuration["Runtime Configuration<br/>[config.py]"]
end

subgraph group_operations["Operations Data"]
  node_database[("Order &amp; Catalogue Store<br/>[database.py]")]
  node_seed_data["Demo Industry Data<br/>[seed_data.py]"]
end

subgraph group_integrations["External Integration"]
  node_gemini{{"Google Gemini"}}
end

node_staff(("Distributor Staff"))

node_staff -->|"uses"| node_app
node_app -->|"routes to"| node_order_ui
node_app -->|"routes to"| node_ops_ui
node_app -->|"routes to"| node_catalog_ui
node_order_ui -->|"requests extraction"| node_ai
node_order_ui -->|"uses demo parser"| node_parser
node_ai -->|"extracts with"| node_gemini
node_ai -->|"returns structured data"| node_contracts
node_parser -.->|"builds draft data"| node_contracts
node_order_ui -->|"validates draft"| node_validation
node_validation -.->|"uses draft model"| node_contracts
node_order_ui -->|"confirms order"| node_database
node_ops_ui -->|"reads metrics"| node_database
node_catalog_ui -.->|"reads catalogue"| node_database
node_database -->|"seeds from"| node_seed_data
node_configuration -.->|"configures access"| node_gemini
node_order_ui -->|"builds receipt"| node_exports
node_ops_ui -->|"exports orders"| node_exports

click node_app "https://github.com/nikhilraman12/vaaniflow-ai-agentic-intelligence/blob/main/streamlit_app.py"
click node_order_ui "https://github.com/nikhilraman12/vaaniflow-ai-agentic-intelligence/blob/main/streamlit_app.py"
click node_ops_ui "https://github.com/nikhilraman12/vaaniflow-ai-agentic-intelligence/blob/main/streamlit_app.py"
click node_catalog_ui "https://github.com/nikhilraman12/vaaniflow-ai-agentic-intelligence/blob/main/streamlit_app.py"
click node_exports "https://github.com/nikhilraman12/vaaniflow-ai-agentic-intelligence/blob/main/app/ui_components.py"
click node_ai "https://github.com/nikhilraman12/vaaniflow-ai-agentic-intelligence/blob/main/app/ai_service.py"
click node_contracts "https://github.com/nikhilraman12/vaaniflow-ai-agentic-intelligence/blob/main/app/models.py"
click node_parser "https://github.com/nikhilraman12/vaaniflow-ai-agentic-intelligence/blob/main/app/order_engine.py"
click node_validation "https://github.com/nikhilraman12/vaaniflow-ai-agentic-intelligence/blob/main/app/order_engine.py"
click node_configuration "https://github.com/nikhilraman12/vaaniflow-ai-agentic-intelligence/blob/main/app/config.py"
click node_database "https://github.com/nikhilraman12/vaaniflow-ai-agentic-intelligence/blob/main/app/database.py"
click node_seed_data "https://github.com/nikhilraman12/vaaniflow-ai-agentic-intelligence/blob/main/app/seed_data.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_order_ui,node_ops_ui,node_catalog_ui,node_exports toneBlue
class node_ai,node_contracts,node_parser,node_validation,node_configuration toneAmber
class node_database,node_seed_data toneMint
class node_gemini toneRose
class node_staff toneIndigo
```

## Components

### Streamlit Experience

- [Streamlit App](https://github.com/nikhilraman12/vaaniflow-ai-agentic-intelligence/blob/main/streamlit_app.py): `streamlit_app.py`
- [Order Review](https://github.com/nikhilraman12/vaaniflow-ai-agentic-intelligence/blob/main/streamlit_app.py): `streamlit_app.py`
- [Ops Dashboard](https://github.com/nikhilraman12/vaaniflow-ai-agentic-intelligence/blob/main/streamlit_app.py): `streamlit_app.py`
- [Catalogue & Customers](https://github.com/nikhilraman12/vaaniflow-ai-agentic-intelligence/blob/main/streamlit_app.py): `streamlit_app.py`
- [Receipt & CSV Export](https://github.com/nikhilraman12/vaaniflow-ai-agentic-intelligence/blob/main/app/ui_components.py): `app/ui_components.py`

### Order Processing

- [Voice & Text Extraction](https://github.com/nikhilraman12/vaaniflow-ai-agentic-intelligence/blob/main/app/ai_service.py): `app/ai_service.py`
- [Order Data Contracts](https://github.com/nikhilraman12/vaaniflow-ai-agentic-intelligence/blob/main/app/models.py): `app/models.py`
- [Demo Order Parser](https://github.com/nikhilraman12/vaaniflow-ai-agentic-intelligence/blob/main/app/order_engine.py): `app/order_engine.py`
- [Draft Validation](https://github.com/nikhilraman12/vaaniflow-ai-agentic-intelligence/blob/main/app/order_engine.py): `app/order_engine.py`
- [Runtime Configuration](https://github.com/nikhilraman12/vaaniflow-ai-agentic-intelligence/blob/main/app/config.py): `app/config.py`

### Operations Data

- [Order & Catalogue Store](https://github.com/nikhilraman12/vaaniflow-ai-agentic-intelligence/blob/main/app/database.py): `app/database.py`
- [Demo Industry Data](https://github.com/nikhilraman12/vaaniflow-ai-agentic-intelligence/blob/main/app/seed_data.py): `app/seed_data.py`

### External Integration

- **Google Gemini**

### Other components

- **Distributor Staff**

## Connections

- Distributor Staff → Streamlit App: uses (evidence: `README.md`)
- Streamlit App → Order Review: routes to (evidence: `README.md`)
- Streamlit App → Ops Dashboard: routes to (evidence: `README.md`)
- Streamlit App → Catalogue & Customers: routes to (evidence: `README.md`)
- Order Review → Voice & Text Extraction: requests extraction (evidence: `README.md`)
- Order Review → Demo Order Parser: uses demo parser (evidence: `README.md`)
- Voice & Text Extraction → Google Gemini: extracts with (evidence: `README.md`)
- Voice & Text Extraction → Order Data Contracts: returns structured data (evidence: `README.md`)
- Demo Order Parser → Order Data Contracts: builds draft data (evidence: `app/order_engine.py`)
- Order Review → Draft Validation: validates draft (evidence: `README.md`)
- Draft Validation → Order Data Contracts: uses draft model (evidence: `app/order_engine.py`)
- Order Review → Order & Catalogue Store: confirms order (evidence: `README.md`)
- Ops Dashboard → Order & Catalogue Store: reads metrics (evidence: `README.md`)
- Catalogue & Customers → Order & Catalogue Store: reads catalogue (evidence: `streamlit_app.py`)
- Order & Catalogue Store → Demo Industry Data: seeds from (evidence: `app/database.py`)
- Runtime Configuration → Google Gemini: configures access
- Order Review → Receipt & CSV Export: builds receipt (evidence: `README.md`)
- Ops Dashboard → Receipt & CSV Export: exports orders (evidence: `README.md`)
