# pabitra27706-oss/diploma-2nd-sem architecture

> Architecture diagram of the GitHub repository pabitra27706-oss/diploma-2nd-sem, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-07-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pabitra27706-oss/diploma-2nd-sem
- Repository: https://github.com/pabitra27706-oss/diploma-2nd-sem

## Overview

#### Purpose and Runtime
This is a static, mobile-oriented second-semester study hub delivered as a vanilla HTML/CSS/JavaScript Progressive Web App. It centralizes five subjects’ unit notes, formula sheets, previous-year questions (PYQs), and answer resources; no backend, database, or third-party service is indicated. Primary launch entry is `index.html`, with PWA metadata in `manifest.json`.

#### App Shell and Navigation
The dashboard UI and client-side navigation state are implemented by `index.html`, `js/app.js`, and `js/data.js`. `data.js` is the central content registry: it maps subjects, content types, and items to static resource paths. `app.js` renders the three-level flow—subject → resource type → item—plus dashboard widgets and persisted “continue learning” state via browser `localStorage`.

#### Subject Content Boundary
Each subject is an independently maintained static-content subtree, linked from centralized metadata rather than generated dynamically. Representative paths are `Mathematics-II/Mathematics-II-Unit-1.html`, `Applied-Physics-II/Formula-Sheet.html`, and `IT-Systems-Theory/IT-Systems-Unit-4-Cybersecurity.html`. The five domains are Mathematics II, Applied Physics II, IT Systems Theory, FEEE, and Engineering Mechanics.

#### Exam Resource Model
PYQs are year-specific HTML pages in each subject’s `all_questions` directory, while answer viewers are separate pages backed by annual JSON data. For example: `Engineering-Mechanics/all_questions/25.html`, `FEEE/all_answers/index.html`, and `FEEE/all_answers/data/2025.json`. Shared PYQ presentation/interaction assets live under `pyq-assets/js/pyq-app.js`, `pyq-assets/js/pyq-render.js`, and `pyq-assets/js/pyq-storage.js`; this is the main reusable subsystem outside the dashboard.

#### Practice Feature
Practice questions form a separate mini-application with its own page, rendering logic, and day-based JSON datasets. Its entry point is `Practice_question/questions/index.html`; behavior is split across `Practice_question/js/app.js` and `Practice_question/js/renderer.js`; content is loaded from files such as `Practice_question/questions/data/day1.json`. `Practice_question/roadmap.html` provides the related revision-roadmap destination.

#### PWA and Offline Delivery
`sw.js` provides service-worker caching and offline behavior, with `offline.html` as the fallback document. The browser runtime is therefore responsible for routing between static pages, fetching JSON datasets, caching assets, and retaining lightweight user progress. Deployment requires only a static HTTP host; service worker features need a secure context or localhost.

#### Supplemental Static Sections
App informational and support destinations are standalone HTML fragments/pages under `app-resorses/sections/`, such as `app-resorses/sections/usage-guide.html` and `app-resorses/sections/professional-hub.html`, with navigation behavior in `app-resorses/scripts/navigation.js`. Subject-specific study suggestions are similarly static resources rooted at `suggestions/index.html`.

Main entry points: [`js/data.js`](https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/js/data.js) (Content registry), [`index.html`](https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/index.html) (Dashboard entry), [`js/app.js`](https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/js/app.js) (Navigation & dashboard), [`pyq-assets/js/pyq-app.js`](https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/pyq-assets/js/pyq-app.js) (PYQ interaction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["App Shell"]
  node_index["Dashboard entry<br/>HTML page<br/>[index.html]"]
  node_app["Navigation &amp; dashboard<br/>client controller<br/>[app.js]"]
  node_registry["Content registry<br/>metadata module<br/>[data.js]"]
  node_localstorage[("Learning progress<br/>browser storage")]
end

subgraph group_study["Study Content"]
  node_math["Mathematics II notes<br/>subject content"]
  node_physics["Applied Physics II resources<br/>subject content<br/>[Formula-Sheet.html]"]
  node_it["IT Systems Theory notes<br/>subject content"]
  node_subjects["Other subject subtrees<br/>static content"]
  node_support["Support sections<br/>static pages<br/>[usage-guide.html]"]
  node_supportnav["Section navigation<br/>client module<br/>[navigation.js]"]
  node_suggestions["Study suggestions<br/>static page<br/>[index.html]"]
end

subgraph group_exam["Exam Resources"]
  node_pyq["Year-specific PYQs<br/>static question pages<br/>[25.html]"]
  node_answers["Answer viewer<br/>static answer page<br/>[index.html]"]
  node_answerdata[("Annual answer data<br/>JSON dataset<br/>[2025.json]")]
  node_pyqapp["PYQ interaction<br/>shared client module<br/>[pyq-app.js]"]
  node_pyqrender["PYQ renderer<br/>shared client module<br/>[pyq-render.js]"]
  node_pyqstorage["PYQ storage<br/>shared client module<br/>[pyq-storage.js]"]
end

subgraph group_practice["Practice"]
  node_practicepage["Practice questions<br/>mini-app entry<br/>[index.html]"]
  node_practiceapp["Practice controller<br/>client module<br/>[app.js]"]
  node_practicerender["Practice renderer<br/>client module<br/>[renderer.js]"]
  node_practicedata[("Daily practice data<br/>JSON dataset<br/>[day1.json]")]
  node_roadmap["Revision roadmap<br/>static page<br/>[roadmap.html]"]
end

subgraph group_offline["PWA Delivery"]
  node_serviceworker{{"Service worker<br/>offline cache<br/>[sw.js]"}}
  node_offlinepage["Offline fallback<br/>HTML page<br/>[offline.html]"]
  node_manifest["PWA manifest<br/>PWA metadata<br/>[manifest.json]"]
end

node_index -->|"loads"| node_app
node_index -->|"loads"| node_registry
node_app -->|"reads routes"| node_registry
node_app -->|"persists progress"| node_localstorage
node_registry -->|"links"| node_math
node_registry -->|"links"| node_physics
node_registry -->|"links"| node_it
node_registry -->|"links"| node_subjects
node_registry -->|"links"| node_pyq
node_registry -->|"links"| node_answers
node_registry -->|"links"| node_practicepage
node_pyq -->|"uses"| node_pyqapp
node_pyqapp -->|"renders with"| node_pyqrender
node_pyqapp -->|"stores state"| node_pyqstorage
node_answers -->|"loads"| node_answerdata
node_practicepage -->|"loads"| node_practiceapp
node_practiceapp -->|"renders with"| node_practicerender
node_practiceapp -->|"fetches"| node_practicedata
node_practicepage -->|"navigates to"| node_roadmap
node_index -->|"navigates to"| node_support
node_support -->|"uses"| node_supportnav
node_index -->|"navigates to"| node_suggestions
node_index -->|"declares"| node_manifest
node_index -->|"registers"| node_serviceworker
node_serviceworker -.->|"serves on failure"| node_offlinepage

click node_index "https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/index.html"
click node_app "https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/js/app.js"
click node_registry "https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/js/data.js"
click node_math "https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/Mathematics-II/Mathematics-II-Unit-1.html"
click node_physics "https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/Applied-Physics-II/Formula-Sheet.html"
click node_it "https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/IT-Systems-Theory/IT-Systems-Unit-4-Cybersecurity.html"
click node_pyq "https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/Engineering-Mechanics/all_questions/25.html"
click node_answers "https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/FEEE/all_answers/index.html"
click node_answerdata "https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/FEEE/all_answers/data/2025.json"
click node_pyqapp "https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/pyq-assets/js/pyq-app.js"
click node_pyqrender "https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/pyq-assets/js/pyq-render.js"
click node_pyqstorage "https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/pyq-assets/js/pyq-storage.js"
click node_practicepage "https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/Practice_question/questions/index.html"
click node_practiceapp "https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/Practice_question/js/app.js"
click node_practicerender "https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/Practice_question/js/renderer.js"
click node_practicedata "https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/Practice_question/questions/data/day1.json"
click node_roadmap "https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/Practice_question/roadmap.html"
click node_serviceworker "https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/sw.js"
click node_offlinepage "https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/offline.html"
click node_manifest "https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/manifest.json"
click node_support "https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/app-resorses/sections/usage-guide.html"
click node_supportnav "https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/app-resorses/scripts/navigation.js"
click node_suggestions "https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/suggestions/index.html"

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_index,node_app,node_registry,node_localstorage toneBlue
class node_math,node_physics,node_it,node_subjects,node_support,node_supportnav,node_suggestions toneAmber
class node_pyq,node_answers,node_answerdata,node_pyqapp,node_pyqrender,node_pyqstorage toneMint
class node_practicepage,node_practiceapp,node_practicerender,node_practicedata,node_roadmap toneRose
class node_serviceworker,node_offlinepage,node_manifest toneIndigo
```

## Components

### App Shell

- [Dashboard entry](https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/index.html): HTML page · Primary mobile-oriented study hub. · `index.html`
- [Navigation & dashboard](https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/js/app.js): client controller · Renders subject-to-item navigation and continue-learning state. · `js/app.js`
- [Content registry](https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/js/data.js): metadata module · Maps subjects and resource items to static paths. · `js/data.js`
- **Learning progress**: browser storage

### Study Content

- [Mathematics II notes](https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/Mathematics-II/Mathematics-II-Unit-1.html): subject content · `Mathematics-II/Mathematics-II-Unit-1.html`
- [Applied Physics II resources](https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/Applied-Physics-II/Formula-Sheet.html): subject content · `Applied-Physics-II/Formula-Sheet.html`
- [IT Systems Theory notes](https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/IT-Systems-Theory/IT-Systems-Unit-4-Cybersecurity.html): subject content · `IT-Systems-Theory/IT-Systems-Unit-4-Cybersecurity.html`
- **Other subject subtrees**: static content · Also includes FEEE and Engineering Mechanics.
- [Support sections](https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/app-resorses/sections/usage-guide.html): static pages · Informational destinations with standalone navigation. · `app-resorses/sections/usage-guide.html`
- [Section navigation](https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/app-resorses/scripts/navigation.js): client module · `app-resorses/scripts/navigation.js`
- [Study suggestions](https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/suggestions/index.html): static page · `suggestions/index.html`

### Exam Resources

- [Year-specific PYQs](https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/Engineering-Mechanics/all_questions/25.html): static question pages · Each subject exposes annual question pages. · `Engineering-Mechanics/all_questions/25.html`
- [Answer viewer](https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/FEEE/all_answers/index.html): static answer page · `FEEE/all_answers/index.html`
- [Annual answer data](https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/FEEE/all_answers/data/2025.json): JSON dataset · `FEEE/all_answers/data/2025.json`
- [PYQ interaction](https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/pyq-assets/js/pyq-app.js): shared client module · Reusable PYQ presentation and state subsystem. · `pyq-assets/js/pyq-app.js`
- [PYQ renderer](https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/pyq-assets/js/pyq-render.js): shared client module · `pyq-assets/js/pyq-render.js`
- [PYQ storage](https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/pyq-assets/js/pyq-storage.js): shared client module · `pyq-assets/js/pyq-storage.js`

### Practice

- [Practice questions](https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/Practice_question/questions/index.html): mini-app entry · `Practice_question/questions/index.html`
- [Practice controller](https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/Practice_question/js/app.js): client module · `Practice_question/js/app.js`
- [Practice renderer](https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/Practice_question/js/renderer.js): client module · `Practice_question/js/renderer.js`
- [Daily practice data](https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/Practice_question/questions/data/day1.json): JSON dataset · `Practice_question/questions/data/day1.json`
- [Revision roadmap](https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/Practice_question/roadmap.html): static page · `Practice_question/roadmap.html`

### PWA Delivery

- [Service worker](https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/sw.js): offline cache · Caches assets and serves the offline fallback. · `sw.js`
- [Offline fallback](https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/offline.html): HTML page · `offline.html`
- [PWA manifest](https://github.com/pabitra27706-oss/diploma-2nd-sem/blob/main/manifest.json): PWA metadata · `manifest.json`

## Connections

- Dashboard entry → Navigation & dashboard: loads
- Dashboard entry → Content registry: loads
- Navigation & dashboard → Content registry: reads routes
- Navigation & dashboard → Learning progress: persists progress
- Content registry → Mathematics II notes: links
- Content registry → Applied Physics II resources: links
- Content registry → IT Systems Theory notes: links
- Content registry → Other subject subtrees: links
- Content registry → Year-specific PYQs: links
- Content registry → Answer viewer: links
- Content registry → Practice questions: links
- Year-specific PYQs → PYQ interaction: uses
- PYQ interaction → PYQ renderer: renders with
- PYQ interaction → PYQ storage: stores state
- Answer viewer → Annual answer data: loads
- Practice questions → Practice controller: loads
- Practice controller → Practice renderer: renders with
- Practice controller → Daily practice data: fetches
- Practice questions → Revision roadmap: navigates to
- Dashboard entry → Support sections: navigates to
- Support sections → Section navigation: uses
- Dashboard entry → Study suggestions: navigates to
- Dashboard entry → PWA manifest: declares
- Dashboard entry → Service worker: registers
- Service worker → Offline fallback: serves on failure
