# patrapraneet27-collab/jee_mains_pyqs_data_base architecture

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

- Interactive diagram: https://gitdiagram.com/patrapraneet27-collab/jee_mains_pyqs_data_base
- Repository: https://github.com/patrapraneet27-collab/jee_mains_pyqs_data_base

## Overview

This library gives JEE Main question-bank users a workflow from loading cached chapters and questions, through filtering and semantic clustering, to themed HTML or PDF study materials. The README also describes skim-mode rendering and chapter-by-topic exports; these fit the same rendering path. The GUI is an alternate interface for loading, filtering, clustering, and exporting. Several implementation excerpts are partial or absent, so the graph omits uncertain wiring, including how the database cache is initially populated.

Main entry points: [`jee_data_base/core/filter.py`](https://github.com/patrapraneet27-collab/jee_mains_pyqs_data_base/blob/main/jee_data_base/core/filter.py) (Chainable filters), [`jee_data_base/core/pdfy.py`](https://github.com/patrapraneet27-collab/jee_mains_pyqs_data_base/blob/main/jee_data_base/core/pdfy.py) (HTML rendering), [`jee_data_base/core/data_base.py`](https://github.com/patrapraneet27-collab/jee_mains_pyqs_data_base/blob/main/jee_data_base/core/data_base.py) (Question database), [`jee_data_base/core/ui3.py`](https://github.com/patrapraneet27-collab/jee_mains_pyqs_data_base/blob/main/jee_data_base/core/ui3.py) (Desktop explorer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Question data"]
  node_database["Question database<br/>[data_base.py]"]
  node_chapter["Chapter records<br/>[chapter.py]"]
  node_question["Question records<br/>[question.py]"]
  node_cache[("Persistent caches<br/>[cache.py]")]
end

subgraph group_analysis["Filter and cluster"]
  node_filter["Chainable filters<br/>[filter.py]"]
  node_embeddings["Question embeddings<br/>[filter.py]"]
  node_cluster["Semantic clustering<br/>[filter.py]"]
end

subgraph group_render["Study materials"]
  node_html["HTML rendering<br/>[pdfy.py]"]
  node_html_helpers["HTML helpers<br/>[html_helper.py]"]
  node_render_support["Question formatting<br/>[pdfy_support.py]"]
  node_styles["Theme styles<br/>[styles.py]"]
  node_pdf_engine["PDF conversion<br/>[pdf_engine.py]"]
  node_output["Study files"]
end

subgraph group_interface["User interfaces"]
  node_gui["Desktop explorer<br/>[ui3.py]"]
end

node_user(("Library user"))

node_user -->|"initializes"| node_database
node_database -->|"loads data"| node_cache
node_database -->|"provides chapters"| node_chapter
node_chapter -->|"contains questions"| node_question
node_user -->|"filters questions"| node_filter
node_database -->|"supplies chapters"| node_filter
node_filter -->|"loads embeddings"| node_cache
node_filter -->|"clusters current set"| node_cluster
node_filter -->|"renders selection"| node_html
node_cluster -->|"renders clusters"| node_html
node_html -->|"formats content"| node_render_support
node_html -->|"builds markup"| node_html_helpers
node_html -->|"applies theme"| node_styles
node_filter -->|"converts HTML"| node_pdf_engine
node_pdf_engine -->|"writes PDF"| node_output
node_filter -->|"writes HTML"| node_output
node_user -.->|"uses explorer"| node_gui
node_gui -.->|"loads database"| node_database
node_gui -.->|"filters and clusters"| node_filter
node_gui -.->|"exports HTML"| node_html

click node_database "https://github.com/patrapraneet27-collab/jee_mains_pyqs_data_base/blob/main/jee_data_base/core/data_base.py"
click node_chapter "https://github.com/patrapraneet27-collab/jee_mains_pyqs_data_base/blob/main/jee_data_base/core/chapter.py"
click node_question "https://github.com/patrapraneet27-collab/jee_mains_pyqs_data_base/blob/main/jee_data_base/core/question.py"
click node_cache "https://github.com/patrapraneet27-collab/jee_mains_pyqs_data_base/blob/main/jee_data_base/core/cache.py"
click node_filter "https://github.com/patrapraneet27-collab/jee_mains_pyqs_data_base/blob/main/jee_data_base/core/filter.py"
click node_embeddings "https://github.com/patrapraneet27-collab/jee_mains_pyqs_data_base/blob/main/jee_data_base/core/filter.py"
click node_cluster "https://github.com/patrapraneet27-collab/jee_mains_pyqs_data_base/blob/main/jee_data_base/core/filter.py"
click node_html "https://github.com/patrapraneet27-collab/jee_mains_pyqs_data_base/blob/main/jee_data_base/core/pdfy.py"
click node_html_helpers "https://github.com/patrapraneet27-collab/jee_mains_pyqs_data_base/blob/main/jee_data_base/core/html_helper.py"
click node_render_support "https://github.com/patrapraneet27-collab/jee_mains_pyqs_data_base/blob/main/jee_data_base/core/pdfy_support.py"
click node_styles "https://github.com/patrapraneet27-collab/jee_mains_pyqs_data_base/blob/main/jee_data_base/core/styles.py"
click node_pdf_engine "https://github.com/patrapraneet27-collab/jee_mains_pyqs_data_base/blob/main/jee_data_base/core/pdf_engine.py"
click node_gui "https://github.com/patrapraneet27-collab/jee_mains_pyqs_data_base/blob/main/jee_data_base/core/ui3.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_database,node_chapter,node_question,node_cache,node_user toneBlue
class node_filter,node_embeddings,node_cluster toneAmber
class node_html,node_html_helpers,node_render_support,node_styles,node_pdf_engine,node_output toneMint
class node_gui toneRose
```

## Components

### Question data

- [Question database](https://github.com/patrapraneet27-collab/jee_mains_pyqs_data_base/blob/main/jee_data_base/core/data_base.py): `jee_data_base/core/data_base.py`
- [Chapter records](https://github.com/patrapraneet27-collab/jee_mains_pyqs_data_base/blob/main/jee_data_base/core/chapter.py): `jee_data_base/core/chapter.py`
- [Question records](https://github.com/patrapraneet27-collab/jee_mains_pyqs_data_base/blob/main/jee_data_base/core/question.py): `jee_data_base/core/question.py`
- [Persistent caches](https://github.com/patrapraneet27-collab/jee_mains_pyqs_data_base/blob/main/jee_data_base/core/cache.py): `jee_data_base/core/cache.py`

### Filter and cluster

- [Chainable filters](https://github.com/patrapraneet27-collab/jee_mains_pyqs_data_base/blob/main/jee_data_base/core/filter.py): `jee_data_base/core/filter.py`
- [Question embeddings](https://github.com/patrapraneet27-collab/jee_mains_pyqs_data_base/blob/main/jee_data_base/core/filter.py): `jee_data_base/core/filter.py`
- [Semantic clustering](https://github.com/patrapraneet27-collab/jee_mains_pyqs_data_base/blob/main/jee_data_base/core/filter.py): `jee_data_base/core/filter.py`

### Study materials

- [HTML rendering](https://github.com/patrapraneet27-collab/jee_mains_pyqs_data_base/blob/main/jee_data_base/core/pdfy.py): `jee_data_base/core/pdfy.py`
- [HTML helpers](https://github.com/patrapraneet27-collab/jee_mains_pyqs_data_base/blob/main/jee_data_base/core/html_helper.py): `jee_data_base/core/html_helper.py`
- [Question formatting](https://github.com/patrapraneet27-collab/jee_mains_pyqs_data_base/blob/main/jee_data_base/core/pdfy_support.py): `jee_data_base/core/pdfy_support.py`
- [Theme styles](https://github.com/patrapraneet27-collab/jee_mains_pyqs_data_base/blob/main/jee_data_base/core/styles.py): `jee_data_base/core/styles.py`
- [PDF conversion](https://github.com/patrapraneet27-collab/jee_mains_pyqs_data_base/blob/main/jee_data_base/core/pdf_engine.py): `jee_data_base/core/pdf_engine.py`
- **Study files**

### User interfaces

- [Desktop explorer](https://github.com/patrapraneet27-collab/jee_mains_pyqs_data_base/blob/main/jee_data_base/core/ui3.py): `jee_data_base/core/ui3.py`

### Other components

- **Library user**

## Connections

- Library user → Question database: initializes
- Question database → Persistent caches: loads data
- Question database → Chapter records: provides chapters
- Chapter records → Question records: contains questions
- Library user → Chainable filters: filters questions
- Question database → Chainable filters: supplies chapters
- Chainable filters → Persistent caches: loads embeddings
- Chainable filters → Semantic clustering: clusters current set
- Chainable filters → HTML rendering: renders selection
- Semantic clustering → HTML rendering: renders clusters
- HTML rendering → Question formatting: formats content
- HTML rendering → HTML helpers: builds markup
- HTML rendering → Theme styles: applies theme
- Chainable filters → PDF conversion: converts HTML
- PDF conversion → Study files: writes PDF
- Chainable filters → Study files: writes HTML
- Library user → Desktop explorer: uses explorer
- Desktop explorer → Question database: loads database
- Desktop explorer → Chainable filters: filters and clusters
- Desktop explorer → HTML rendering: exports HTML
