# manas-shukla-101/visionnova-ai architecture

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

- Interactive diagram: https://gitdiagram.com/manas-shukla-101/visionnova-ai
- Repository: https://github.com/manas-shukla-101/visionnova-ai

## Overview

VisionNova AI is a Flask-based local image-analysis assistant. The main workflow is image upload, multimodel analysis, saved session results, then follow-up visual Q&A and report export. The graph also preserves the documented translation, voice, live-camera, analytics, and history features. Some relationships come from README statements or the SOURCE INDEX because several source excerpts are partial; uncertain frontend wiring is omitted.

Main entry points: [`routes/api.py`](https://github.com/manas-shukla-101/visionnova-ai/blob/main/routes/api.py) (Vision API), [`app.py`](https://github.com/manas-shukla-101/visionnova-ai/blob/main/app.py) (Flask application), [`routes/reports.py`](https://github.com/manas-shukla-101/visionnova-ai/blob/main/routes/reports.py) (History exports), [`database/db.py`](https://github.com/manas-shukla-101/visionnova-ai/blob/main/database/db.py) (Session database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_pages["Page routes<br/>[home.py]"]
  node_templates["Web pages"]
end

subgraph group_analysis["Image analysis"]
  node_api["Vision API<br/>[api.py]"]
  node_live["Live camera analysis<br/>[live.py]"]
  node_imageutils["Image utilities<br/>[image_utils.py]"]
  node_florence["Captioning and VQA<br/>[florence.py]"]
  node_yolo["Object detection<br/>[yolo.py]"]
  node_ocr["Text extraction<br/>[ocr.py]"]
  node_translation["Text translation<br/>[translator.py]"]
  node_speech["Speech recognition<br/>[speech.py]"]
  node_tts["Speech synthesis<br/>[tts.py]"]
end

subgraph group_records["Sessions and reports"]
  node_analytics["Usage analytics<br/>[analytics.py]"]
  node_reports["History exports<br/>[reports.py]"]
  node_pdf["PDF generation<br/>[pdf_export.py]"]
  node_database[("Session database<br/>[db.py]")]
end

subgraph group_runtime["Application runtime"]
  node_app["Flask application<br/>[app.py]"]
  node_config["Runtime configuration<br/>[config.py]"]
  node_helpers["Upload and response helpers<br/>[helpers.py]"]
end

node_user(("User"))

node_user -->|"opens pages"| node_pages
node_pages -->|"renders"| node_templates
node_user -->|"uploads image"| node_api
node_api -->|"requests captions and VQA"| node_florence
node_api -->|"requests detection"| node_yolo
node_api -->|"requests OCR"| node_ocr
node_api -->|"requests translation"| node_translation
node_api -->|"requests recognition"| node_speech
node_api -->|"requests synthesis"| node_tts
node_api -->|"uses image utilities"| node_imageutils
node_api -->|"saves uploads"| node_helpers
node_api -->|"stores analysis and Q&amp;A"| node_database
node_live -->|"runs detection"| node_yolo
node_live -->|"reads settings"| node_config
node_app -->|"loads settings"| node_config
node_app -->|"initializes"| node_database
node_app -->|"registers routes"| node_pages
node_app -->|"registers routes"| node_api
node_app -->|"registers routes"| node_live
node_app -->|"registers routes"| node_analytics
node_app -->|"registers routes"| node_reports
node_analytics -->|"reads session history"| node_database
node_analytics -->|"uses response helpers"| node_helpers
node_reports -->|"reads session records"| node_database
node_reports -->|"generates PDFs"| node_pdf
node_reports -->|"uses response helpers"| node_helpers

click node_app "https://github.com/manas-shukla-101/visionnova-ai/blob/main/app.py"
click node_config "https://github.com/manas-shukla-101/visionnova-ai/blob/main/config.py"
click node_pages "https://github.com/manas-shukla-101/visionnova-ai/blob/main/routes/home.py"
click node_templates "https://github.com/manas-shukla-101/visionnova-ai/tree/main/templates"
click node_api "https://github.com/manas-shukla-101/visionnova-ai/blob/main/routes/api.py"
click node_live "https://github.com/manas-shukla-101/visionnova-ai/blob/main/routes/live.py"
click node_imageutils "https://github.com/manas-shukla-101/visionnova-ai/blob/main/utils/image_utils.py"
click node_florence "https://github.com/manas-shukla-101/visionnova-ai/blob/main/models/florence.py"
click node_yolo "https://github.com/manas-shukla-101/visionnova-ai/blob/main/models/yolo.py"
click node_ocr "https://github.com/manas-shukla-101/visionnova-ai/blob/main/models/ocr.py"
click node_translation "https://github.com/manas-shukla-101/visionnova-ai/blob/main/models/translator.py"
click node_speech "https://github.com/manas-shukla-101/visionnova-ai/blob/main/models/speech.py"
click node_tts "https://github.com/manas-shukla-101/visionnova-ai/blob/main/models/tts.py"
click node_analytics "https://github.com/manas-shukla-101/visionnova-ai/blob/main/routes/analytics.py"
click node_reports "https://github.com/manas-shukla-101/visionnova-ai/blob/main/routes/reports.py"
click node_pdf "https://github.com/manas-shukla-101/visionnova-ai/blob/main/utils/pdf_export.py"
click node_database "https://github.com/manas-shukla-101/visionnova-ai/blob/main/database/db.py"
click node_helpers "https://github.com/manas-shukla-101/visionnova-ai/blob/main/utils/helpers.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_pages,node_templates,node_user toneBlue
class node_api,node_live,node_imageutils,node_florence,node_yolo,node_ocr,node_translation,node_speech,node_tts toneAmber
class node_analytics,node_reports,node_pdf,node_database toneMint
class node_app,node_config,node_helpers toneRose
```

## Components

### Web experience

- [Page routes](https://github.com/manas-shukla-101/visionnova-ai/blob/main/routes/home.py): `routes/home.py`
- [Web pages](https://github.com/manas-shukla-101/visionnova-ai/tree/main/templates): `templates`

### Image analysis

- [Vision API](https://github.com/manas-shukla-101/visionnova-ai/blob/main/routes/api.py): `routes/api.py`
- [Live camera analysis](https://github.com/manas-shukla-101/visionnova-ai/blob/main/routes/live.py): `routes/live.py`
- [Image utilities](https://github.com/manas-shukla-101/visionnova-ai/blob/main/utils/image_utils.py): `utils/image_utils.py`
- [Captioning and VQA](https://github.com/manas-shukla-101/visionnova-ai/blob/main/models/florence.py): `models/florence.py`
- [Object detection](https://github.com/manas-shukla-101/visionnova-ai/blob/main/models/yolo.py): `models/yolo.py`
- [Text extraction](https://github.com/manas-shukla-101/visionnova-ai/blob/main/models/ocr.py): `models/ocr.py`
- [Text translation](https://github.com/manas-shukla-101/visionnova-ai/blob/main/models/translator.py): `models/translator.py`
- [Speech recognition](https://github.com/manas-shukla-101/visionnova-ai/blob/main/models/speech.py): `models/speech.py`
- [Speech synthesis](https://github.com/manas-shukla-101/visionnova-ai/blob/main/models/tts.py): `models/tts.py`

### Sessions and reports

- [Usage analytics](https://github.com/manas-shukla-101/visionnova-ai/blob/main/routes/analytics.py): `routes/analytics.py`
- [History exports](https://github.com/manas-shukla-101/visionnova-ai/blob/main/routes/reports.py): `routes/reports.py`
- [PDF generation](https://github.com/manas-shukla-101/visionnova-ai/blob/main/utils/pdf_export.py): `utils/pdf_export.py`
- [Session database](https://github.com/manas-shukla-101/visionnova-ai/blob/main/database/db.py): `database/db.py`

### Application runtime

- [Flask application](https://github.com/manas-shukla-101/visionnova-ai/blob/main/app.py): `app.py`
- [Runtime configuration](https://github.com/manas-shukla-101/visionnova-ai/blob/main/config.py): `config.py`
- [Upload and response helpers](https://github.com/manas-shukla-101/visionnova-ai/blob/main/utils/helpers.py): `utils/helpers.py`

### Other components

- **User**

## Connections

- User → Page routes: opens pages (evidence: `routes/home.py`)
- Page routes → Web pages: renders (evidence: `routes/home.py`)
- User → Vision API: uploads image (evidence: `README.md`)
- Vision API → Captioning and VQA: requests captions and VQA (evidence: `routes/api.py`)
- Vision API → Object detection: requests detection (evidence: `routes/api.py`)
- Vision API → Text extraction: requests OCR (evidence: `routes/api.py`)
- Vision API → Text translation: requests translation (evidence: `routes/api.py`)
- Vision API → Speech recognition: requests recognition (evidence: `routes/api.py`)
- Vision API → Speech synthesis: requests synthesis (evidence: `routes/api.py`)
- Vision API → Image utilities: uses image utilities (evidence: `routes/api.py`)
- Vision API → Upload and response helpers: saves uploads (evidence: `routes/api.py`)
- Vision API → Session database: stores analysis and Q&A (evidence: `routes/api.py`)
- Live camera analysis → Object detection: runs detection (evidence: `routes/live.py`)
- Live camera analysis → Runtime configuration: reads settings (evidence: `routes/live.py`)
- Flask application → Runtime configuration: loads settings (evidence: `app.py`)
- Flask application → Session database: initializes (evidence: `app.py`)
- Flask application → Page routes: registers routes (evidence: `app.py`)
- Flask application → Vision API: registers routes (evidence: `app.py`)
- Flask application → Live camera analysis: registers routes (evidence: `app.py`)
- Flask application → Usage analytics: registers routes (evidence: `app.py`)
- Flask application → History exports: registers routes (evidence: `app.py`)
- Usage analytics → Session database: reads session history (evidence: `routes/analytics.py`)
- Usage analytics → Upload and response helpers: uses response helpers (evidence: `routes/analytics.py`)
- History exports → Session database: reads session records (evidence: `routes/reports.py`)
- History exports → PDF generation: generates PDFs (evidence: `routes/reports.py`)
- History exports → Upload and response helpers: uses response helpers (evidence: `routes/reports.py`)
