# nishadislamutso/prohor architecture

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

- Interactive diagram: https://gitdiagram.com/nishadislamutso/prohor
- Repository: https://github.com/nishadislamutso/prohor

## Overview

Prohor is a static BRACU routine-planning website. Students choose courses and constraints, generate and compare clash-free routines, then view, adjust, save, or share results. The browser app also offers seat monitoring and historical semester views; a separate repository collector maintains that history. The README documents the main browser workflow, while the worker excerpt confirms its core-engine dependency and separate seat-fetch protocol. The page’s internal wiring is not sampled, so its documented connections cite the README.

Main entry points: [`index.html`](https://github.com/nishadislamutso/prohor/blob/main/index.html) (Planner interface), [`tools/collect-semesters.py`](https://github.com/nishadislamutso/prohor/blob/main/tools/collect-semesters.py) (Semester collector), [`worker.js`](https://github.com/nishadislamutso/prohor/blob/main/worker.js) (Routine search), [`core.js`](https://github.com/nishadislamutso/prohor/blob/main/core.js) (Grid and day views)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_planning["Routine planning"]
  node_app["Planner interface<br/>[index.html]"]
  node_selection["Course selection<br/>[index.html]"]
  node_preferences["Constraints and preferences<br/>[index.html]"]
  node_search["Routine search<br/>[worker.js]"]
  node_results["Routine results<br/>[index.html]"]
  node_views["Grid and day views<br/>[core.js]"]
  node_exports["Print and PNG export<br/>[core.js]"]
  node_sharing["Share links<br/>[index.html]"]
  node_storage[("Browser persistence<br/>[index.html]")]
end

subgraph group_data["Catalogue and history"]
  node_feed["Live course feed"]
  node_snapshot["Bundled snapshot<br/>[snapshot.json]"]
  node_semesterdata["Collected semester data"]
end

subgraph group_seats["Seat monitoring"]
  node_seatpanel["Seats panel and page<br/>[index.html]"]
  node_seatworker["Seat polling worker<br/>[worker.js]"]
end

subgraph group_collection["Semester collection"]
  node_collector["Semester collector"]
end

subgraph group_engine["Planning engine"]
  node_normalization["Feed normalization<br/>[core.js]"]
  node_enumeration["Conflict-aware enumeration<br/>[core.js]"]
  node_viewmodel["Routine view model<br/>[core.js]"]
end

node_student(("Student"))
node_connect["BRACU Connect feed"]

node_student -->|"uses"| node_app
node_app -->|"selects courses"| node_selection
node_app -->|"sets constraints"| node_preferences
node_app -->|"dispatches search"| node_search
node_search -->|"enumerates routines"| node_enumeration
node_enumeration -.->|"uses candidates"| node_normalization
node_app -->|"shows results"| node_results
node_results -->|"builds views"| node_views
node_views -->|"uses view model"| node_viewmodel
node_results -->|"exports routines"| node_exports
node_student -->|"shares routine"| node_sharing
node_app -->|"persists preferences"| node_storage
node_app -->|"loads catalogue"| node_feed
node_app -->|"falls back to"| node_snapshot
node_connect -->|"provides data"| node_feed
node_student -->|"checks seats"| node_seatpanel
node_seatpanel -->|"requests polling"| node_seatworker
node_seatworker -->|"fetches seat data"| node_connect
node_seatpanel -->|"reads semesters"| node_semesterdata
node_collector -->|"updates collection"| node_semesterdata
node_collector -->|"collects observations"| node_connect

click node_app "https://github.com/nishadislamutso/prohor/blob/main/index.html"
click node_selection "https://github.com/nishadislamutso/prohor/blob/main/index.html"
click node_preferences "https://github.com/nishadislamutso/prohor/blob/main/index.html"
click node_search "https://github.com/nishadislamutso/prohor/blob/main/worker.js"
click node_results "https://github.com/nishadislamutso/prohor/blob/main/index.html"
click node_views "https://github.com/nishadislamutso/prohor/blob/main/core.js"
click node_exports "https://github.com/nishadislamutso/prohor/blob/main/core.js"
click node_sharing "https://github.com/nishadislamutso/prohor/blob/main/index.html"
click node_snapshot "https://github.com/nishadislamutso/prohor/blob/main/snapshot.json"
click node_normalization "https://github.com/nishadislamutso/prohor/blob/main/core.js"
click node_enumeration "https://github.com/nishadislamutso/prohor/blob/main/core.js"
click node_viewmodel "https://github.com/nishadislamutso/prohor/blob/main/core.js"
click node_storage "https://github.com/nishadislamutso/prohor/blob/main/index.html"
click node_seatpanel "https://github.com/nishadislamutso/prohor/blob/main/index.html"
click node_seatworker "https://github.com/nishadislamutso/prohor/blob/main/worker.js"
click node_semesterdata "https://github.com/nishadislamutso/prohor/tree/main/data/semesters"
click node_collector "https://github.com/nishadislamutso/prohor/blob/main/tools/collect-semesters.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_app,node_selection,node_preferences,node_search,node_results,node_views,node_exports,node_sharing,node_storage toneBlue
class node_feed,node_snapshot,node_semesterdata toneAmber
class node_seatpanel,node_seatworker toneMint
class node_collector toneRose
class node_normalization,node_enumeration,node_viewmodel,node_student,node_connect toneIndigo
```

## Components

### Routine planning

- [Planner interface](https://github.com/nishadislamutso/prohor/blob/main/index.html): `index.html`
- [Course selection](https://github.com/nishadislamutso/prohor/blob/main/index.html): `index.html`
- [Constraints and preferences](https://github.com/nishadislamutso/prohor/blob/main/index.html): `index.html`
- [Routine search](https://github.com/nishadislamutso/prohor/blob/main/worker.js): `worker.js`
- [Routine results](https://github.com/nishadislamutso/prohor/blob/main/index.html): `index.html`
- [Grid and day views](https://github.com/nishadislamutso/prohor/blob/main/core.js): `core.js`
- [Print and PNG export](https://github.com/nishadislamutso/prohor/blob/main/core.js): `core.js`
- [Share links](https://github.com/nishadislamutso/prohor/blob/main/index.html): `index.html`
- [Browser persistence](https://github.com/nishadislamutso/prohor/blob/main/index.html): `index.html`

### Catalogue and history

- **Live course feed**
- [Bundled snapshot](https://github.com/nishadislamutso/prohor/blob/main/snapshot.json): `snapshot.json`
- [Collected semester data](https://github.com/nishadislamutso/prohor/tree/main/data/semesters): `data/semesters`

### Seat monitoring

- [Seats panel and page](https://github.com/nishadislamutso/prohor/blob/main/index.html): `index.html`
- [Seat polling worker](https://github.com/nishadislamutso/prohor/blob/main/worker.js): `worker.js`

### Semester collection

- [Semester collector](https://github.com/nishadislamutso/prohor/blob/main/tools/collect-semesters.py): `tools/collect-semesters.py`

### Planning engine

- [Feed normalization](https://github.com/nishadislamutso/prohor/blob/main/core.js): `core.js`
- [Conflict-aware enumeration](https://github.com/nishadislamutso/prohor/blob/main/core.js): `core.js`
- [Routine view model](https://github.com/nishadislamutso/prohor/blob/main/core.js): `core.js`

### Other components

- **Student**
- **BRACU Connect feed**

## Connections

- Student → Planner interface: uses (evidence: `README.md`)
- Planner interface → Course selection: selects courses (evidence: `README.md`)
- Planner interface → Constraints and preferences: sets constraints (evidence: `README.md`)
- Planner interface → Routine search: dispatches search (evidence: `README.md`)
- Routine search → Conflict-aware enumeration: enumerates routines (evidence: `worker.js`)
- Conflict-aware enumeration → Feed normalization: uses candidates (evidence: `core.js`)
- Planner interface → Routine results: shows results (evidence: `README.md`)
- Routine results → Grid and day views: builds views (evidence: `README.md`)
- Grid and day views → Routine view model: uses view model (evidence: `README.md`)
- Routine results → Print and PNG export: exports routines (evidence: `README.md`)
- Student → Share links: shares routine (evidence: `README.md`)
- Planner interface → Browser persistence: persists preferences (evidence: `README.md`)
- Planner interface → Live course feed: loads catalogue (evidence: `README.md`)
- Planner interface → Bundled snapshot: falls back to (evidence: `README.md`)
- BRACU Connect feed → Live course feed: provides data (evidence: `README.md`)
- Student → Seats panel and page: checks seats (evidence: `README.md`)
- Seats panel and page → Seat polling worker: requests polling (evidence: `README.md`)
- Seat polling worker → BRACU Connect feed: fetches seat data (evidence: `worker.js`)
- Seats panel and page → Collected semester data: reads semesters (evidence: `README.md`)
- Semester collector → Collected semester data: updates collection (evidence: `README.md`)
- Semester collector → BRACU Connect feed: collects observations (evidence: `README.md`)
