# akioweh/educationperfected architecture

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

- Interactive diagram: https://gitdiagram.com/akioweh/educationperfected
- Repository: https://github.com/akioweh/educationperfected

## Overview

EducationPerfected automates language-question tasks on Education Perfect. In the current Node.js version, the user launches a Puppeteer-controlled browser, logs in, refreshes a task’s word lists, and starts or stops answering with hotkeys; answers come from learned vocabulary, with error correction and modal cleanup. The archive contains earlier in-page userscripts, including a version that navigates folders and completes tasks. Current-version relationships are based on the README and sampled `index.js`; archive relationships are based on the sampled scripts, so unsampled implementation details are not inferred.

Main entry points: [`index.js`](https://github.com/akioweh/educationperfected/blob/main/index.js) (Answer Loop), [`V1_Archive/script.js`](https://github.com/akioweh/educationperfected/blob/main/V1_Archive/script.js) (Legacy Auto-Answer), [`V1_Archive/script+.js`](https://github.com/akioweh/educationperfected/blob/main/V1_Archive/script%2B.js) (Folder Traversal)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_control["Browser Control"]
  node_puppeteer["Puppeteer<br/>[index.js]"]
  node_browser["Browser Page<br/>[index.js]"]
  node_login["Login Setup<br/>[index.js]"]
  node_hotkeys["Hotkey Controls<br/>[index.js]"]
end

subgraph group_answering["Answering"]
  node_refresh["Word Refresh<br/>[index.js]"]
  node_dictionary["Answer Dictionaries<br/>[index.js]"]
  node_matcher["Answer Matching<br/>[index.js]"]
  node_answerloop["Answer Loop<br/>[index.js]"]
  node_mode["Answer Modes<br/>[index.js]"]
  node_correction["Error Correction<br/>[index.js]"]
  node_modal["Modal Cleanup<br/>[index.js]"]
end

subgraph group_legacy["Archived Userscripts"]
  node_legacybasic["Legacy Auto-Answer<br/>[script.js]"]
  node_legacycrawler["Folder Traversal<br/>[script+.js]"]
  node_legacytask["Legacy Task Completion<br/>[script+.js]"]
end

node_user(("User"))
node_ep["Education Perfect"]

node_user -->|"launches"| node_puppeteer
node_puppeteer -->|"launches"| node_browser
node_browser -->|"opens page"| node_ep
node_login -->|"logs in"| node_ep
node_browser -->|"loads login"| node_login
node_user -->|"presses"| node_hotkeys
node_hotkeys -->|"triggers"| node_refresh
node_hotkeys -->|"toggles"| node_mode
node_hotkeys -->|"starts or stops"| node_answerloop
node_refresh -->|"reads word lists"| node_browser
node_refresh -->|"updates"| node_dictionary
node_answerloop -->|"reads questions"| node_browser
node_answerloop -->|"requests answer"| node_matcher
node_matcher -->|"looks up"| node_dictionary
node_answerloop -->|"submits answer"| node_browser
node_answerloop -->|"handles wrong answer"| node_correction
node_correction -->|"learns correction"| node_dictionary
node_answerloop -->|"cleans up"| node_modal
node_mode -->|"sets submission mode"| node_answerloop
node_user -->|"uses hotkeys"| node_legacybasic
node_legacybasic -->|"refreshes vocabulary"| node_dictionary
node_legacycrawler -->|"dispatches tasks"| node_legacytask

click node_puppeteer "https://github.com/akioweh/educationperfected/blob/main/index.js"
click node_browser "https://github.com/akioweh/educationperfected/blob/main/index.js"
click node_login "https://github.com/akioweh/educationperfected/blob/main/index.js"
click node_hotkeys "https://github.com/akioweh/educationperfected/blob/main/index.js"
click node_refresh "https://github.com/akioweh/educationperfected/blob/main/index.js"
click node_dictionary "https://github.com/akioweh/educationperfected/blob/main/index.js"
click node_matcher "https://github.com/akioweh/educationperfected/blob/main/index.js"
click node_answerloop "https://github.com/akioweh/educationperfected/blob/main/index.js"
click node_mode "https://github.com/akioweh/educationperfected/blob/main/index.js"
click node_correction "https://github.com/akioweh/educationperfected/blob/main/index.js"
click node_modal "https://github.com/akioweh/educationperfected/blob/main/index.js"
click node_legacybasic "https://github.com/akioweh/educationperfected/blob/main/V1_Archive/script.js"
click node_legacycrawler "https://github.com/akioweh/educationperfected/blob/main/V1_Archive/script%2B.js"
click node_legacytask "https://github.com/akioweh/educationperfected/blob/main/V1_Archive/script%2B.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_puppeteer,node_browser,node_login,node_hotkeys,node_user toneBlue
class node_refresh,node_dictionary,node_matcher,node_answerloop,node_mode,node_correction,node_modal toneAmber
class node_legacybasic,node_legacycrawler,node_legacytask toneMint
class node_ep toneIndigo
```

## Components

### Browser Control

- [Puppeteer](https://github.com/akioweh/educationperfected/blob/main/index.js): `index.js`
- [Browser Page](https://github.com/akioweh/educationperfected/blob/main/index.js): `index.js`
- [Login Setup](https://github.com/akioweh/educationperfected/blob/main/index.js): `index.js`
- [Hotkey Controls](https://github.com/akioweh/educationperfected/blob/main/index.js): `index.js`

### Answering

- [Word Refresh](https://github.com/akioweh/educationperfected/blob/main/index.js): `index.js`
- [Answer Dictionaries](https://github.com/akioweh/educationperfected/blob/main/index.js): `index.js`
- [Answer Matching](https://github.com/akioweh/educationperfected/blob/main/index.js): `index.js`
- [Answer Loop](https://github.com/akioweh/educationperfected/blob/main/index.js): `index.js`
- [Answer Modes](https://github.com/akioweh/educationperfected/blob/main/index.js): `index.js`
- [Error Correction](https://github.com/akioweh/educationperfected/blob/main/index.js): `index.js`
- [Modal Cleanup](https://github.com/akioweh/educationperfected/blob/main/index.js): `index.js`

### Archived Userscripts

- [Legacy Auto-Answer](https://github.com/akioweh/educationperfected/blob/main/V1_Archive/script.js): `V1_Archive/script.js`
- [Folder Traversal](https://github.com/akioweh/educationperfected/blob/main/V1_Archive/script%2B.js): `V1_Archive/script+.js`
- [Legacy Task Completion](https://github.com/akioweh/educationperfected/blob/main/V1_Archive/script%2B.js): `V1_Archive/script+.js`

### Other components

- **User**
- **Education Perfect**

## Connections

- User → Puppeteer: launches (evidence: `README.md`)
- Puppeteer → Browser Page: launches (evidence: `index.js`)
- Browser Page → Education Perfect: opens page (evidence: `index.js`)
- Login Setup → Education Perfect: logs in (evidence: `index.js`)
- Browser Page → Login Setup: loads login (evidence: `index.js`)
- User → Hotkey Controls: presses (evidence: `README.md`)
- Hotkey Controls → Word Refresh: triggers (evidence: `index.js`)
- Hotkey Controls → Answer Modes: toggles (evidence: `index.js`)
- Hotkey Controls → Answer Loop: starts or stops (evidence: `index.js`)
- Word Refresh → Browser Page: reads word lists (evidence: `index.js`)
- Word Refresh → Answer Dictionaries: updates (evidence: `index.js`)
- Answer Loop → Browser Page: reads questions (evidence: `index.js`)
- Answer Loop → Answer Matching: requests answer (evidence: `index.js`)
- Answer Matching → Answer Dictionaries: looks up (evidence: `index.js`)
- Answer Loop → Browser Page: submits answer (evidence: `index.js`)
- Answer Loop → Error Correction: handles wrong answer (evidence: `index.js`)
- Error Correction → Answer Dictionaries: learns correction (evidence: `README.md`)
- Answer Loop → Modal Cleanup: cleans up (evidence: `index.js`)
- Answer Modes → Answer Loop: sets submission mode (evidence: `index.js`)
- User → Legacy Auto-Answer: uses hotkeys (evidence: `V1_Archive/script.js`)
- Legacy Auto-Answer → Answer Dictionaries: refreshes vocabulary (evidence: `V1_Archive/script.js`)
- Folder Traversal → Legacy Task Completion: dispatches tasks (evidence: `V1_Archive/script+.js`)
