# anselmlong/better-edurec architecture

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

- Interactive diagram: https://gitdiagram.com/anselmlong/better-edurec
- Repository: https://github.com/anselmlong/better-edurec

## Overview

Better EduRec is a read-only Chrome extension that layers navigation, summaries, dashboards and presentation controls over signed-in EduRec pages. The main workflow detects the current page, mounts the redesigned shell, enhances recognized pages, and saves selected summaries for the Overview; users can also navigate/search, configure themes, and view/export a live timetable. The README documents several feature relationships not visible in sampled excerpts; edges cite that documentation where appropriate. Unsampled implementation details are not inferred beyond those documented capabilities.

Main entry points: [`src/main.js`](https://github.com/anselmlong/better-edurec/blob/main/src/main.js) (Runtime orchestrator), [`src/enhancers.js`](https://github.com/anselmlong/better-edurec/blob/main/src/enhancers.js) (Page recognizers and cards), [`src/shell.js`](https://github.com/anselmlong/better-edurec/blob/main/src/shell.js) (Sidebar and search shell), [`src/store.js`](https://github.com/anselmlong/better-edurec/blob/main/src/store.js) (Preferences and snapshots)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Extension runtime"]
  node_main["Runtime orchestrator<br/>[main.js]"]
  node_boot["Early theme boot<br/>[boot.js]"]
  node_layout["Page layout fixes<br/>[layout.js]"]
  node_store[("Preferences and snapshots<br/>[store.js]")]
  node_core["Shared page utilities<br/>[core.js]"]
end

subgraph group_navigation["Navigation and controls"]
  node_routes["Page routes and search index<br/>[routes.js]"]
  node_shell["Sidebar and search shell<br/>[shell.js]"]
  node_keys["Keyboard controls<br/>[keys.js]"]
  node_popup["Toolbar settings<br/>[popup.js]"]
end

subgraph group_academic["Academic summaries"]
  node_enhancers["Page recognizers and cards<br/>[enhancers.js]"]
  node_parsers["Academic page parsers<br/>[parsers.js]"]
  node_views["Summary answer views<br/>[views.js]"]
  node_overview["Overview dashboard<br/>[overview.js]"]
  node_guide["Setup checklist and coach<br/>[guide.js]"]
  node_timetable["Live timetable<br/>[timetable.js]"]
end

subgraph group_personalization["Presentation and preferences"]
  node_themes["Themes and fonts<br/>[themes.js]"]
  node_theme_css["Scoped restyle<br/>[theme.css]"]
end

subgraph group_integrations["External services"]
  node_nusmods["NUSMods public API"]
end

node_student(("Student"))
node_edurec["EduRec pages"]

node_student -->|"opens pages"| node_edurec
node_edurec -->|"loads extension"| node_main
node_main -->|"caches first paint"| node_boot
node_main -->|"checks preferences"| node_store
node_main -->|"detects page"| node_routes
node_main -->|"mounts shell"| node_shell
node_main -->|"starts controls"| node_keys
node_main -->|"mounts dashboard"| node_overview
node_main -->|"resumes setup"| node_guide
node_main -->|"starts enhancements"| node_enhancers
node_main -->|"applies preferences"| node_themes
node_main -.->|"applies layout fixes"| node_layout
node_enhancers -->|"parses page text"| node_parsers
node_enhancers -->|"renders summaries"| node_views
node_enhancers -->|"saves snapshots"| node_store
node_overview -->|"reads summaries"| node_store
node_overview -.->|"shows this week"| node_timetable
node_guide -->|"guides page visits"| node_edurec
node_popup -->|"updates settings"| node_store
node_shell -.->|"searches destinations"| node_routes
node_shell -.->|"offers theme picker"| node_themes
node_themes -.->|"styles extension UI"| node_theme_css
node_timetable -.->|"exports course codes"| node_nusmods
node_student -->|"configures extension"| node_popup
node_student -->|"searches and navigates"| node_shell

click node_main "https://github.com/anselmlong/better-edurec/blob/main/src/main.js"
click node_boot "https://github.com/anselmlong/better-edurec/blob/main/src/boot.js"
click node_layout "https://github.com/anselmlong/better-edurec/blob/main/src/layout.js"
click node_store "https://github.com/anselmlong/better-edurec/blob/main/src/store.js"
click node_routes "https://github.com/anselmlong/better-edurec/blob/main/src/routes.js"
click node_shell "https://github.com/anselmlong/better-edurec/blob/main/src/shell.js"
click node_keys "https://github.com/anselmlong/better-edurec/blob/main/src/keys.js"
click node_popup "https://github.com/anselmlong/better-edurec/blob/main/popup/popup.js"
click node_enhancers "https://github.com/anselmlong/better-edurec/blob/main/src/enhancers.js"
click node_parsers "https://github.com/anselmlong/better-edurec/blob/main/src/parsers.js"
click node_views "https://github.com/anselmlong/better-edurec/blob/main/src/views.js"
click node_overview "https://github.com/anselmlong/better-edurec/blob/main/src/overview.js"
click node_guide "https://github.com/anselmlong/better-edurec/blob/main/src/guide.js"
click node_timetable "https://github.com/anselmlong/better-edurec/blob/main/src/timetable.js"
click node_themes "https://github.com/anselmlong/better-edurec/blob/main/src/themes.js"
click node_core "https://github.com/anselmlong/better-edurec/blob/main/src/core.js"
click node_theme_css "https://github.com/anselmlong/better-edurec/blob/main/src/theme.css"

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_main,node_boot,node_layout,node_store,node_core toneBlue
class node_routes,node_shell,node_keys,node_popup toneAmber
class node_enhancers,node_parsers,node_views,node_overview,node_guide,node_timetable toneMint
class node_themes,node_theme_css toneRose
class node_nusmods,node_student,node_edurec toneIndigo
```

## Components

### Extension runtime

- [Runtime orchestrator](https://github.com/anselmlong/better-edurec/blob/main/src/main.js): `src/main.js`
- [Early theme boot](https://github.com/anselmlong/better-edurec/blob/main/src/boot.js): `src/boot.js`
- [Page layout fixes](https://github.com/anselmlong/better-edurec/blob/main/src/layout.js): `src/layout.js`
- [Preferences and snapshots](https://github.com/anselmlong/better-edurec/blob/main/src/store.js): `src/store.js`
- [Shared page utilities](https://github.com/anselmlong/better-edurec/blob/main/src/core.js): `src/core.js`

### Navigation and controls

- [Page routes and search index](https://github.com/anselmlong/better-edurec/blob/main/src/routes.js): `src/routes.js`
- [Sidebar and search shell](https://github.com/anselmlong/better-edurec/blob/main/src/shell.js): `src/shell.js`
- [Keyboard controls](https://github.com/anselmlong/better-edurec/blob/main/src/keys.js): `src/keys.js`
- [Toolbar settings](https://github.com/anselmlong/better-edurec/blob/main/popup/popup.js): `popup/popup.js`

### Academic summaries

- [Page recognizers and cards](https://github.com/anselmlong/better-edurec/blob/main/src/enhancers.js): `src/enhancers.js`
- [Academic page parsers](https://github.com/anselmlong/better-edurec/blob/main/src/parsers.js): `src/parsers.js`
- [Summary answer views](https://github.com/anselmlong/better-edurec/blob/main/src/views.js): `src/views.js`
- [Overview dashboard](https://github.com/anselmlong/better-edurec/blob/main/src/overview.js): `src/overview.js`
- [Setup checklist and coach](https://github.com/anselmlong/better-edurec/blob/main/src/guide.js): `src/guide.js`
- [Live timetable](https://github.com/anselmlong/better-edurec/blob/main/src/timetable.js): `src/timetable.js`

### Presentation and preferences

- [Themes and fonts](https://github.com/anselmlong/better-edurec/blob/main/src/themes.js): `src/themes.js`
- [Scoped restyle](https://github.com/anselmlong/better-edurec/blob/main/src/theme.css): `src/theme.css`

### External services

- **NUSMods public API**

### Other components

- **Student**
- **EduRec pages**

## Connections

- Student → EduRec pages: opens pages (evidence: `README.md`)
- EduRec pages → Runtime orchestrator: loads extension (evidence: `README.md`)
- Runtime orchestrator → Early theme boot: caches first paint (evidence: `src/main.js`)
- Runtime orchestrator → Preferences and snapshots: checks preferences (evidence: `src/main.js`)
- Runtime orchestrator → Page routes and search index: detects page (evidence: `src/main.js`)
- Runtime orchestrator → Sidebar and search shell: mounts shell (evidence: `src/main.js`)
- Runtime orchestrator → Keyboard controls: starts controls (evidence: `src/main.js`)
- Runtime orchestrator → Overview dashboard: mounts dashboard (evidence: `src/main.js`)
- Runtime orchestrator → Setup checklist and coach: resumes setup (evidence: `src/main.js`)
- Runtime orchestrator → Page recognizers and cards: starts enhancements (evidence: `src/main.js`)
- Runtime orchestrator → Themes and fonts: applies preferences (evidence: `src/main.js`)
- Runtime orchestrator → Page layout fixes: applies layout fixes (evidence: `README.md`)
- Page recognizers and cards → Academic page parsers: parses page text (evidence: `src/enhancers.js`)
- Page recognizers and cards → Summary answer views: renders summaries (evidence: `src/enhancers.js`)
- Page recognizers and cards → Preferences and snapshots: saves snapshots (evidence: `README.md`)
- Overview dashboard → Preferences and snapshots: reads summaries (evidence: `README.md`)
- Overview dashboard → Live timetable: shows this week (evidence: `README.md`)
- Setup checklist and coach → EduRec pages: guides page visits (evidence: `README.md`)
- Toolbar settings → Preferences and snapshots: updates settings (evidence: `popup/popup.js`)
- Sidebar and search shell → Page routes and search index: searches destinations (evidence: `README.md`)
- Sidebar and search shell → Themes and fonts: offers theme picker (evidence: `README.md`)
- Themes and fonts → Scoped restyle: styles extension UI (evidence: `README.md`)
- Live timetable → NUSMods public API: exports course codes (evidence: `README.md`)
- Student → Toolbar settings: configures extension (evidence: `README.md`)
- Student → Sidebar and search shell: searches and navigates (evidence: `README.md`)
