# kratishatandon1/adobe-insight-app architecture

> Architecture diagram of the GitHub repository kratishatandon1/adobe-insight-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kratishatandon1/adobe-insight-app
- Repository: https://github.com/kratishatandon1/adobe-insight-app

## Overview

PDF Insight is a web application for managing PDFs and turning their contents into searchable, conversational, summarized, debated, and audio experiences. The principal workflow is: a user uploads documents, the backend stores them and records metadata, feature panels retrieve or analyze document text, and the frontend presents snippets, insights, answers, arguments, or audio. The graph reflects documented capabilities and sampled wiring; several feature-route internals were not provided, so those links rely on explicit module names and README capabilities.

Main entry points: [`backend/app.py`](https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app.py) (Backend App), [`backend/app/routes/pdf.py`](https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app/routes/pdf.py) (PDF API), [`backend/app/routes/recommend.py`](https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app/routes/recommend.py) (Recommendation API), [`backend/app/routes/tts.py`](https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app/routes/tts.py) (TTS API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client Experience"]
  node_web_app["Web App<br/>[App.jsx]"]
  node_pdf_viewer["PDF Viewer<br/>[PDFViewer.jsx]"]
  node_recommendation_panel["Recommendation Panel"]
  node_insights_panel["Insights Panel<br/>[InsightsPanel.jsx]"]
  node_chatbot["Chatbot<br/>[Chatbot.jsx]"]
  node_summarize_modal["Summarize Modal<br/>[SummarizeModal.jsx]"]
  node_debate_modal["Debate Modal<br/>[DebateModal.jsx]"]
  node_podcast_player["Podcast Player<br/>[PodcastPlayer.jsx]"]
end

subgraph group_api["API Features"]
  node_backend_app["Backend App<br/>[app.py]"]
  node_pdf_api["PDF API<br/>[pdf.py]"]
  node_recommend_api["Recommendation API<br/>[recommend.py]"]
  node_insights_api["Insights API<br/>[insights.py]"]
  node_chat_api["Chat API<br/>[chat.py]"]
  node_summarize_api["Summarize API<br/>[summarize.py]"]
  node_debate_api["Debate API<br/>[debate.py]"]
  node_podcast_api["Podcast API<br/>[podcast.py]"]
  node_selection_api["Selection Insight API"]
  node_tts_api["TTS API<br/>[tts.py]"]
end

subgraph group_analysis["Document Analysis"]
  node_pdf_extraction["PDF Text Extraction<br/>[embedding_utils.py]"]
  node_semantic_retrieval["Semantic Retrieval<br/>[embedding_utils.py]"]
  node_summarization["Summarization<br/>[summarizer.py]"]
  node_debate_generation["Debate Generation<br/>[debate_utils.py]"]
  node_podcast_generation["Podcast Generation<br/>[podcast_utils.py]"]
  node_gemini["Gemini LLM"]
end

subgraph group_storage["Storage Integrations"]
  node_database_layer["Database Layer<br/>[database.py]"]
  node_neon_db[("Neon Postgres")]
  node_vercel_blob[("Vercel Blob")]
  node_azure_tts["Azure TTS"]
  node_adobe_viewer["Adobe PDF Embed"]
end

node_user(("User"))

node_user -->|"uses"| node_web_app
node_web_app -->|"calls APIs"| node_backend_app
node_backend_app -->|"dispatches"| node_pdf_api
node_backend_app -->|"dispatches"| node_recommend_api
node_backend_app -->|"dispatches"| node_insights_api
node_backend_app -->|"dispatches"| node_chat_api
node_backend_app -->|"dispatches"| node_summarize_api
node_backend_app -->|"dispatches"| node_debate_api
node_backend_app -->|"dispatches"| node_podcast_api
node_backend_app -->|"dispatches"| node_selection_api
node_backend_app -->|"dispatches"| node_tts_api
node_web_app -->|"lists files"| node_pdf_api
node_pdf_api -->|"stores PDFs"| node_vercel_blob
node_pdf_api -->|"records files"| node_database_layer
node_database_layer -->|"persists metadata"| node_neon_db
node_recommendation_panel -->|"requests matches"| node_recommend_api
node_recommend_api -->|"extracts sections"| node_pdf_extraction
node_recommend_api -->|"ranks sections"| node_semantic_retrieval
node_pdf_extraction -->|"downloads PDFs"| node_vercel_blob
node_insights_panel -->|"requests insights"| node_insights_api
node_insights_api -->|"generates analysis"| node_gemini
node_chatbot -->|"asks questions"| node_chat_api
node_chat_api -->|"generates answers"| node_gemini
node_summarize_modal -->|"requests summaries"| node_summarize_api
node_summarize_api -->|"summarizes documents"| node_summarization
node_summarization -->|"generates summary"| node_gemini
node_debate_modal -->|"requests debate"| node_debate_api
node_debate_api -->|"builds arguments"| node_debate_generation
node_debate_generation -->|"generates arguments"| node_gemini
node_podcast_player -->|"requests podcast"| node_podcast_api
node_podcast_api -->|"creates audio"| node_podcast_generation
node_podcast_generation -->|"requests speech"| node_tts_api
node_tts_api -.->|"synthesizes speech"| node_azure_tts
node_pdf_viewer -->|"renders PDF"| node_adobe_viewer
node_pdf_viewer -->|"submits selection"| node_selection_api
node_selection_api -->|"analyzes selection"| node_gemini
node_pdf_viewer -->|"reads selection"| node_tts_api

click node_web_app "https://github.com/kratishatandon1/adobe-insight-app/blob/main/frontend/src/App.jsx"
click node_pdf_viewer "https://github.com/kratishatandon1/adobe-insight-app/blob/main/frontend/src/components/PDFViewer.jsx"
click node_recommendation_panel "https://github.com/kratishatandon1/adobe-insight-app/blob/main/frontend/src/components/RecommendationPanel.jsx"
click node_insights_panel "https://github.com/kratishatandon1/adobe-insight-app/blob/main/frontend/src/components/InsightsPanel.jsx"
click node_chatbot "https://github.com/kratishatandon1/adobe-insight-app/blob/main/frontend/src/components/Chatbot.jsx"
click node_summarize_modal "https://github.com/kratishatandon1/adobe-insight-app/blob/main/frontend/src/components/SummarizeModal.jsx"
click node_debate_modal "https://github.com/kratishatandon1/adobe-insight-app/blob/main/frontend/src/components/DebateModal.jsx"
click node_podcast_player "https://github.com/kratishatandon1/adobe-insight-app/blob/main/frontend/src/components/PodcastPlayer.jsx"
click node_backend_app "https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app.py"
click node_pdf_api "https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app/routes/pdf.py"
click node_recommend_api "https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app/routes/recommend.py"
click node_insights_api "https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app/routes/insights.py"
click node_chat_api "https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app/routes/chat.py"
click node_summarize_api "https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app/routes/summarize.py"
click node_debate_api "https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app/routes/debate.py"
click node_podcast_api "https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app/routes/podcast.py"
click node_selection_api "https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app/routes/selection_insight.py"
click node_tts_api "https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app/routes/tts.py"
click node_pdf_extraction "https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app/utils/embedding_utils.py"
click node_semantic_retrieval "https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app/utils/embedding_utils.py"
click node_summarization "https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app/utils/summarizer.py"
click node_debate_generation "https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app/utils/debate_utils.py"
click node_podcast_generation "https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app/utils/podcast_utils.py"
click node_database_layer "https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app/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_web_app,node_pdf_viewer,node_recommendation_panel,node_insights_panel,node_chatbot,node_summarize_modal,node_debate_modal,node_podcast_player,node_user toneBlue
class node_backend_app,node_pdf_api,node_recommend_api,node_insights_api,node_chat_api,node_summarize_api,node_debate_api,node_podcast_api,node_selection_api,node_tts_api toneAmber
class node_pdf_extraction,node_semantic_retrieval,node_summarization,node_debate_generation,node_podcast_generation,node_gemini toneMint
class node_database_layer,node_neon_db,node_vercel_blob,node_azure_tts,node_adobe_viewer toneRose
```

## Components

### Client Experience

- [Web App](https://github.com/kratishatandon1/adobe-insight-app/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [PDF Viewer](https://github.com/kratishatandon1/adobe-insight-app/blob/main/frontend/src/components/PDFViewer.jsx): `frontend/src/components/PDFViewer.jsx`
- [Recommendation Panel](https://github.com/kratishatandon1/adobe-insight-app/blob/main/frontend/src/components/RecommendationPanel.jsx): `frontend/src/components/RecommendationPanel.jsx`
- [Insights Panel](https://github.com/kratishatandon1/adobe-insight-app/blob/main/frontend/src/components/InsightsPanel.jsx): `frontend/src/components/InsightsPanel.jsx`
- [Chatbot](https://github.com/kratishatandon1/adobe-insight-app/blob/main/frontend/src/components/Chatbot.jsx): `frontend/src/components/Chatbot.jsx`
- [Summarize Modal](https://github.com/kratishatandon1/adobe-insight-app/blob/main/frontend/src/components/SummarizeModal.jsx): `frontend/src/components/SummarizeModal.jsx`
- [Debate Modal](https://github.com/kratishatandon1/adobe-insight-app/blob/main/frontend/src/components/DebateModal.jsx): `frontend/src/components/DebateModal.jsx`
- [Podcast Player](https://github.com/kratishatandon1/adobe-insight-app/blob/main/frontend/src/components/PodcastPlayer.jsx): `frontend/src/components/PodcastPlayer.jsx`

### API Features

- [Backend App](https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app.py): `backend/app.py`
- [PDF API](https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app/routes/pdf.py): `backend/app/routes/pdf.py`
- [Recommendation API](https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app/routes/recommend.py): `backend/app/routes/recommend.py`
- [Insights API](https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app/routes/insights.py): `backend/app/routes/insights.py`
- [Chat API](https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app/routes/chat.py): `backend/app/routes/chat.py`
- [Summarize API](https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app/routes/summarize.py): `backend/app/routes/summarize.py`
- [Debate API](https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app/routes/debate.py): `backend/app/routes/debate.py`
- [Podcast API](https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app/routes/podcast.py): `backend/app/routes/podcast.py`
- [Selection Insight API](https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app/routes/selection_insight.py): `backend/app/routes/selection_insight.py`
- [TTS API](https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app/routes/tts.py): `backend/app/routes/tts.py`

### Document Analysis

- [PDF Text Extraction](https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app/utils/embedding_utils.py): `backend/app/utils/embedding_utils.py`
- [Semantic Retrieval](https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app/utils/embedding_utils.py): `backend/app/utils/embedding_utils.py`
- [Summarization](https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app/utils/summarizer.py): `backend/app/utils/summarizer.py`
- [Debate Generation](https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app/utils/debate_utils.py): `backend/app/utils/debate_utils.py`
- [Podcast Generation](https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app/utils/podcast_utils.py): `backend/app/utils/podcast_utils.py`
- **Gemini LLM**

### Storage Integrations

- [Database Layer](https://github.com/kratishatandon1/adobe-insight-app/blob/main/backend/app/database.py): `backend/app/database.py`
- **Neon Postgres**
- **Vercel Blob**
- **Azure TTS**
- **Adobe PDF Embed**

### Other components

- **User**

## Connections

- User → Web App: uses
- Web App → Backend App: calls APIs
- Backend App → PDF API: dispatches
- Backend App → Recommendation API: dispatches
- Backend App → Insights API: dispatches
- Backend App → Chat API: dispatches
- Backend App → Summarize API: dispatches
- Backend App → Debate API: dispatches
- Backend App → Podcast API: dispatches
- Backend App → Selection Insight API: dispatches
- Backend App → TTS API: dispatches
- Web App → PDF API: lists files
- PDF API → Vercel Blob: stores PDFs
- PDF API → Database Layer: records files
- Database Layer → Neon Postgres: persists metadata
- Recommendation Panel → Recommendation API: requests matches
- Recommendation API → PDF Text Extraction: extracts sections
- Recommendation API → Semantic Retrieval: ranks sections
- PDF Text Extraction → Vercel Blob: downloads PDFs
- Insights Panel → Insights API: requests insights
- Insights API → Gemini LLM: generates analysis
- Chatbot → Chat API: asks questions
- Chat API → Gemini LLM: generates answers
- Summarize Modal → Summarize API: requests summaries
- Summarize API → Summarization: summarizes documents
- Summarization → Gemini LLM: generates summary
- Debate Modal → Debate API: requests debate
- Debate API → Debate Generation: builds arguments
- Debate Generation → Gemini LLM: generates arguments
- Podcast Player → Podcast API: requests podcast
- Podcast API → Podcast Generation: creates audio
- Podcast Generation → TTS API: requests speech
- TTS API → Azure TTS: synthesizes speech
- PDF Viewer → Adobe PDF Embed: renders PDF
- PDF Viewer → Selection Insight API: submits selection
- Selection Insight API → Gemini LLM: analyzes selection
- PDF Viewer → TTS API: reads selection
