# prism-universe/conquista architecture

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

- Interactive diagram: https://gitdiagram.com/prism-universe/conquista
- Repository: https://github.com/prism-universe/conquista

## Overview

Conquista is a local-first JEE revision planner. Users select syllabus topics, work through full-, half-, and quarter-duration review stages, record a rating to advance or freeze topics, and track weekly workload and calendar schedules. The app also provides focus timing with ambient audio, reminders, and local backup/restore. The excerpts establish the core app-to-engine/storage/UI integrations; some UI and syllabus wiring is unsampled, so uncertain links are omitted. Offline caching is handled separately by the service worker.

Main entry points: [`js/app.js`](https://github.com/prism-universe/conquista/blob/main/js/app.js) (App coordinator), [`js/ui.js`](https://github.com/prism-universe/conquista/blob/main/js/ui.js) (Dashboard and calendar), [`js/ambient.js`](https://github.com/prism-universe/conquista/blob/main/js/ambient.js) (Focus audio), [`js/notifications.js`](https://github.com/prism-universe/conquista/blob/main/js/notifications.js) (Smart alerts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_planning["Revision planning"]
  node_app["App coordinator<br/>[app.js]"]
  node_engine["Revision engine<br/>[engine.js]"]
  node_syllabus["JEE chapter bank<br/>[jeeSyllabus.js]"]
end

subgraph group_experience["Study experience"]
  node_dashboard["Dashboard and calendar<br/>[ui.js]"]
  node_focus["Focus audio<br/>[ambient.js]"]
  node_alerts["Smart alerts<br/>[notifications.js]"]
  node_splash["Startup splash<br/>[splash.js]"]
end

subgraph group_persistence["Local data"]
  node_state[("Revision state<br/>[storage.js]")]
end

subgraph group_platform["PWA platform"]
  node_serviceworker["Offline service worker<br/>[sw.js]"]
  node_manifest["Install metadata<br/>[manifest.json]"]
end

node_learner(("Learner"))
node_browser(("Browser APIs"))

node_learner -->|"uses"| node_app
node_app -->|"loads and saves"| node_state
node_app -->|"advances and rolls over"| node_engine
node_app -->|"renders dashboard"| node_dashboard
node_dashboard -->|"calculates durations"| node_engine
node_app -->|"toggles ambient audio"| node_focus
node_app -->|"checks alerts"| node_alerts
node_app -->|"creates splash"| node_splash
node_app -->|"runs timer and calendar"| node_browser
node_app -->|"imports and exports backups"| node_state
node_alerts -->|"requests and sends notifications"| node_browser
node_focus -->|"generates Web Audio"| node_browser
node_browser -->|"dispatches lifecycle and fetch"| node_serviceworker
node_serviceworker -->|"caches offline assets"| node_browser
node_browser -.->|"reads install metadata"| node_manifest

click node_app "https://github.com/prism-universe/conquista/blob/main/js/app.js"
click node_engine "https://github.com/prism-universe/conquista/blob/main/js/engine.js"
click node_syllabus "https://github.com/prism-universe/conquista/blob/main/js/jeeSyllabus.js"
click node_dashboard "https://github.com/prism-universe/conquista/blob/main/js/ui.js"
click node_focus "https://github.com/prism-universe/conquista/blob/main/js/ambient.js"
click node_alerts "https://github.com/prism-universe/conquista/blob/main/js/notifications.js"
click node_splash "https://github.com/prism-universe/conquista/blob/main/js/splash.js"
click node_state "https://github.com/prism-universe/conquista/blob/main/js/storage.js"
click node_serviceworker "https://github.com/prism-universe/conquista/blob/main/sw.js"
click node_manifest "https://github.com/prism-universe/conquista/blob/main/manifest.json"

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_app,node_engine,node_syllabus,node_browser toneBlue
class node_dashboard,node_focus,node_alerts,node_splash toneAmber
class node_state toneMint
class node_serviceworker,node_manifest toneRose
class node_learner toneIndigo
```

## Components

### Revision planning

- [App coordinator](https://github.com/prism-universe/conquista/blob/main/js/app.js): `js/app.js`
- [Revision engine](https://github.com/prism-universe/conquista/blob/main/js/engine.js): `js/engine.js`
- [JEE chapter bank](https://github.com/prism-universe/conquista/blob/main/js/jeeSyllabus.js): `js/jeeSyllabus.js`

### Study experience

- [Dashboard and calendar](https://github.com/prism-universe/conquista/blob/main/js/ui.js): `js/ui.js`
- [Focus audio](https://github.com/prism-universe/conquista/blob/main/js/ambient.js): `js/ambient.js`
- [Smart alerts](https://github.com/prism-universe/conquista/blob/main/js/notifications.js): `js/notifications.js`
- [Startup splash](https://github.com/prism-universe/conquista/blob/main/js/splash.js): `js/splash.js`

### Local data

- [Revision state](https://github.com/prism-universe/conquista/blob/main/js/storage.js): `js/storage.js`

### PWA platform

- [Offline service worker](https://github.com/prism-universe/conquista/blob/main/sw.js): `sw.js`
- [Install metadata](https://github.com/prism-universe/conquista/blob/main/manifest.json): `manifest.json`

### Other components

- **Learner**
- **Browser APIs**

## Connections

- Learner → App coordinator: uses
- App coordinator → Revision state: loads and saves
- App coordinator → Revision engine: advances and rolls over
- App coordinator → Dashboard and calendar: renders dashboard
- Dashboard and calendar → Revision engine: calculates durations
- App coordinator → Focus audio: toggles ambient audio
- App coordinator → Smart alerts: checks alerts
- App coordinator → Startup splash: creates splash
- App coordinator → Browser APIs: runs timer and calendar
- App coordinator → Revision state: imports and exports backups
- Smart alerts → Browser APIs: requests and sends notifications
- Focus audio → Browser APIs: generates Web Audio
- Browser APIs → Offline service worker: dispatches lifecycle and fetch
- Offline service worker → Browser APIs: caches offline assets
- Browser APIs → Install metadata: reads install metadata
