# txasw/kmitl.js architecture

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

- Interactive diagram: https://gitdiagram.com/txasw/kmitl.js
- Repository: https://github.com/txasw/kmitl.js

## Overview

KMITL UI Enhancements is a collection of standalone browser-console scripts, not a shared application. A user selects a script for the current KMITL page and runs it to reshape a course table, edit an E-Filing budget interface, automate OSDA event operations, or fill CES evaluations. Each script acts directly on its page; the sampled OSDA bots submit form-based requests, while the CES script invokes site RPC methods. The E-Filing and CES excerpts are partial, so their unsampled internal steps are not expanded here.

Main entry points: [`scripts/group_course_sections.js`](https://github.com/txasw/kmitl.js/blob/main/scripts/group_course_sections.js) (Grouped course view), [`scripts/osda_registration_bot.js`](https://github.com/txasw/kmitl.js/blob/main/scripts/osda_registration_bot.js) (Bulk registration), [`scripts/osda_event_bot.js`](https://github.com/txasw/kmitl.js/blob/main/scripts/osda_event_bot.js) (Activity hours batch), [`scripts/osda_efilling_editor.js`](https://github.com/txasw/kmitl.js/blob/main/scripts/osda_efilling_editor.js) (Budget editor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_course["Course Registration"]
  node_course_view["Grouped course view"]
end

subgraph group_osda["OSDA Tools"]
  node_reg_bot["Bulk registration"]
  node_event_bot["Activity hours batch<br/>[osda_event_bot.js]"]
  node_efiling["Budget editor"]
end

subgraph group_ces["CES Evaluation"]
  node_ces_auto["Evaluation autofill"]
end

node_user(("Console user"))
node_regis_site(("Registration site"))
node_osda_event_site(("OSDA event site"))
node_efiling_site(("OSDA E-Filing site"))
node_ces_site(("CES site"))

node_user -->|"runs on page"| node_course_view
node_course_view -->|"reshapes table"| node_regis_site
node_user -->|"runs on page"| node_reg_bot
node_reg_bot -->|"posts registrations"| node_osda_event_site
node_user -->|"runs on page"| node_event_bot
node_event_bot -->|"posts activity hours"| node_osda_event_site
node_user -->|"runs on page"| node_efiling
node_efiling -->|"edits page interface"| node_efiling_site
node_user -->|"runs on page"| node_ces_auto
node_ces_auto -->|"calls evaluation RPC"| node_ces_site

click node_course_view "https://github.com/txasw/kmitl.js/blob/main/scripts/group_course_sections.js"
click node_reg_bot "https://github.com/txasw/kmitl.js/blob/main/scripts/osda_registration_bot.js"
click node_event_bot "https://github.com/txasw/kmitl.js/blob/main/scripts/osda_event_bot.js"
click node_efiling "https://github.com/txasw/kmitl.js/blob/main/scripts/osda_efilling_editor.js"
click node_ces_auto "https://github.com/txasw/kmitl.js/blob/main/scripts/ces_evaluation_autofill.js"

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_course_view,node_user toneBlue
class node_reg_bot,node_event_bot,node_efiling toneAmber
class node_ces_auto toneMint
class node_regis_site,node_osda_event_site,node_efiling_site,node_ces_site toneIndigo
```

## Components

### Course Registration

- [Grouped course view](https://github.com/txasw/kmitl.js/blob/main/scripts/group_course_sections.js): `scripts/group_course_sections.js`

### OSDA Tools

- [Bulk registration](https://github.com/txasw/kmitl.js/blob/main/scripts/osda_registration_bot.js): `scripts/osda_registration_bot.js`
- [Activity hours batch](https://github.com/txasw/kmitl.js/blob/main/scripts/osda_event_bot.js): `scripts/osda_event_bot.js`
- [Budget editor](https://github.com/txasw/kmitl.js/blob/main/scripts/osda_efilling_editor.js): `scripts/osda_efilling_editor.js`

### CES Evaluation

- [Evaluation autofill](https://github.com/txasw/kmitl.js/blob/main/scripts/ces_evaluation_autofill.js): `scripts/ces_evaluation_autofill.js`

### Other components

- **Console user**
- **Registration site**
- **OSDA event site**
- **OSDA E-Filing site**
- **CES site**

## Connections

- Console user → Grouped course view: runs on page (evidence: `README.md`)
- Grouped course view → Registration site: reshapes table (evidence: `README.md`)
- Console user → Bulk registration: runs on page (evidence: `README.md`)
- Bulk registration → OSDA event site: posts registrations (evidence: `scripts/osda_registration_bot.js`)
- Console user → Activity hours batch: runs on page (evidence: `README.md`)
- Activity hours batch → OSDA event site: posts activity hours (evidence: `scripts/osda_event_bot.js`)
- Console user → Budget editor: runs on page (evidence: `README.md`)
- Budget editor → OSDA E-Filing site: edits page interface (evidence: `scripts/osda_efilling_editor.js`)
- Console user → Evaluation autofill: runs on page (evidence: `README.md`)
- Evaluation autofill → CES site: calls evaluation RPC (evidence: `scripts/ces_evaluation_autofill.js`)
