# c-kala/openvidhya architecture

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

- Interactive diagram: https://gitdiagram.com/c-kala/openvidhya
- Repository: https://github.com/c-kala/openvidhya

## Overview

OpenVidya is a browser-based academic research assistant. A researcher refines a topic through chat, searches scholarly sources, and receives curated papers and a reading roadmap; they can then summarize or read papers, save and annotate them, and explore research activity on a global atlas. The graph includes the documented news, notes, and knowledge-graph capabilities as separate branches. Backend source excerpts are partial, so omitted route internals and uncertain wiring are not inferred.

Main entry points: [`backend/main.py`](https://github.com/c-kala/openvidhya/blob/main/backend/main.py) (FastAPI routes), [`frontend/app.js`](https://github.com/c-kala/openvidhya/blob/main/frontend/app.js) (Web app), [`backend/gemini_service.py`](https://github.com/c-kala/openvidhya/blob/main/backend/gemini_service.py) (Concept extraction), [`backend/auth.py`](https://github.com/c-kala/openvidhya/blob/main/backend/auth.py) (Authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Browser experience"]
  node_frontend["Web app<br/>[app.js]"]
  node_api["FastAPI routes<br/>[main.py]"]
end

subgraph group_research["Research discovery"]
  node_search["Source search<br/>[search.py]"]
  node_ranking["Paper ranking<br/>[ranker.py]"]
  node_roadmap["Reading roadmap<br/>[roadmap.py]"]
  node_pdf["PDF proxy<br/>[main.py]"]
  node_news["Science news feed<br/>[main.py]"]
end

subgraph group_ai["AI assistance"]
  node_ai_routes["AI endpoints<br/>[main.py]"]
  node_summaries["Paper summaries<br/>[main.py]"]
end

subgraph group_account["Accounts and library"]
  node_auth["Authentication<br/>[auth.py]"]
  node_library["Library and notes<br/>[main.py]"]
  node_store[("Application database<br/>[database.py]")]
end

subgraph group_knowledge["Knowledge and atlas"]
  node_graph["Knowledge graph<br/>[main.py]"]
  node_extract["Concept extraction<br/>[gemini_service.py]"]
  node_atlas["Research atlas<br/>[app.js]"]
end

node_researcher(("Researcher"))
node_scholarly{{"Scholarly APIs"}}
node_groq{{"Groq LLM"}}
node_pdf_source{{"Paper publishers"}}
node_gemini{{"Gemini embeddings"}}
node_atlas_data{{"Publication statistics"}}
node_rss{{"Science RSS feeds"}}

node_researcher -->|"uses"| node_frontend
node_frontend -->|"calls REST"| node_api
node_api -->|"queries sources"| node_search
node_search -->|"fetches papers"| node_scholarly
node_api -->|"ranks papers"| node_ranking
node_api -->|"generates order"| node_roadmap
node_api -->|"dispatches AI"| node_ai_routes
node_ai_routes -->|"requests inference"| node_groq
node_api -->|"requests summaries"| node_summaries
node_summaries -->|"requests inference"| node_groq
node_frontend -->|"requests PDF"| node_pdf
node_pdf -->|"fetches document"| node_pdf_source
node_frontend -->|"authenticates"| node_auth
node_api -->|"verifies identity"| node_auth
node_api -->|"serves library"| node_library
node_auth -->|"reads and writes"| node_store
node_library -->|"reads and writes"| node_store
node_frontend -->|"requests graph"| node_graph
node_graph -->|"reads graph data"| node_store
node_graph -->|"extracts concepts"| node_extract
node_extract -->|"extracts concepts"| node_groq
node_extract -->|"creates embeddings"| node_gemini
node_frontend -->|"explores atlas"| node_atlas
node_atlas -->|"displays statistics"| node_atlas_data
node_frontend -->|"views feed"| node_news
node_news -->|"fetches headlines"| node_rss

click node_frontend "https://github.com/c-kala/openvidhya/blob/main/frontend/app.js"
click node_api "https://github.com/c-kala/openvidhya/blob/main/backend/main.py"
click node_search "https://github.com/c-kala/openvidhya/blob/main/backend/search.py"
click node_ranking "https://github.com/c-kala/openvidhya/blob/main/backend/ranker.py"
click node_roadmap "https://github.com/c-kala/openvidhya/blob/main/backend/roadmap.py"
click node_ai_routes "https://github.com/c-kala/openvidhya/blob/main/backend/main.py"
click node_summaries "https://github.com/c-kala/openvidhya/blob/main/backend/main.py"
click node_pdf "https://github.com/c-kala/openvidhya/blob/main/backend/main.py"
click node_auth "https://github.com/c-kala/openvidhya/blob/main/backend/auth.py"
click node_library "https://github.com/c-kala/openvidhya/blob/main/backend/main.py"
click node_store "https://github.com/c-kala/openvidhya/blob/main/backend/database.py"
click node_graph "https://github.com/c-kala/openvidhya/blob/main/backend/main.py"
click node_extract "https://github.com/c-kala/openvidhya/blob/main/backend/gemini_service.py"
click node_atlas "https://github.com/c-kala/openvidhya/blob/main/frontend/app.js"
click node_news "https://github.com/c-kala/openvidhya/blob/main/backend/main.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_frontend,node_api toneBlue
class node_search,node_ranking,node_roadmap,node_pdf,node_news toneAmber
class node_ai_routes,node_summaries,node_scholarly toneMint
class node_auth,node_library,node_store toneRose
class node_graph,node_extract,node_atlas,node_researcher,node_groq,node_pdf_source,node_gemini,node_atlas_data,node_rss toneIndigo
```

## Components

### Browser experience

- [Web app](https://github.com/c-kala/openvidhya/blob/main/frontend/app.js): `frontend/app.js`
- [FastAPI routes](https://github.com/c-kala/openvidhya/blob/main/backend/main.py): `backend/main.py`

### Research discovery

- [Source search](https://github.com/c-kala/openvidhya/blob/main/backend/search.py): `backend/search.py`
- [Paper ranking](https://github.com/c-kala/openvidhya/blob/main/backend/ranker.py): `backend/ranker.py`
- [Reading roadmap](https://github.com/c-kala/openvidhya/blob/main/backend/roadmap.py): `backend/roadmap.py`
- [PDF proxy](https://github.com/c-kala/openvidhya/blob/main/backend/main.py): `backend/main.py`
- [Science news feed](https://github.com/c-kala/openvidhya/blob/main/backend/main.py): `backend/main.py`

### AI assistance

- [AI endpoints](https://github.com/c-kala/openvidhya/blob/main/backend/main.py): `backend/main.py`
- [Paper summaries](https://github.com/c-kala/openvidhya/blob/main/backend/main.py): `backend/main.py`

### Accounts and library

- [Authentication](https://github.com/c-kala/openvidhya/blob/main/backend/auth.py): `backend/auth.py`
- [Library and notes](https://github.com/c-kala/openvidhya/blob/main/backend/main.py): `backend/main.py`
- [Application database](https://github.com/c-kala/openvidhya/blob/main/backend/database.py): `backend/database.py`

### Knowledge and atlas

- [Knowledge graph](https://github.com/c-kala/openvidhya/blob/main/backend/main.py): `backend/main.py`
- [Concept extraction](https://github.com/c-kala/openvidhya/blob/main/backend/gemini_service.py): `backend/gemini_service.py`
- [Research atlas](https://github.com/c-kala/openvidhya/blob/main/frontend/app.js): `frontend/app.js`

### Other components

- **Researcher**
- **Scholarly APIs**
- **Groq LLM**
- **Paper publishers**
- **Gemini embeddings**
- **Publication statistics**
- **Science RSS feeds**

## Connections

- Researcher → Web app: uses
- Web app → FastAPI routes: calls REST
- FastAPI routes → Source search: queries sources
- Source search → Scholarly APIs: fetches papers
- FastAPI routes → Paper ranking: ranks papers
- FastAPI routes → Reading roadmap: generates order
- FastAPI routes → AI endpoints: dispatches AI
- AI endpoints → Groq LLM: requests inference
- FastAPI routes → Paper summaries: requests summaries
- Paper summaries → Groq LLM: requests inference
- Web app → PDF proxy: requests PDF
- PDF proxy → Paper publishers: fetches document
- Web app → Authentication: authenticates
- FastAPI routes → Authentication: verifies identity
- FastAPI routes → Library and notes: serves library
- Authentication → Application database: reads and writes
- Library and notes → Application database: reads and writes
- Web app → Knowledge graph: requests graph
- Knowledge graph → Application database: reads graph data
- Knowledge graph → Concept extraction: extracts concepts
- Concept extraction → Groq LLM: extracts concepts
- Concept extraction → Gemini embeddings: creates embeddings
- Web app → Research atlas: explores atlas
- Research atlas → Publication statistics: displays statistics
- Web app → Science news feed: views feed
- Science news feed → Science RSS feeds: fetches headlines
