aboutsummaryrefslogtreecommitdiff
path: root/course/chapters/02-architecture.json
diff options
context:
space:
mode:
authorAgando <roduccomm@gmail.com>2026-10-18 14:05:18 +0200
committerAgando <roduccomm@gmail.com>2026-10-18 14:05:18 +0200
commit0d0d936e7b5cd41a31773069540b1ddb8836ef44 (patch)
tree273e7ee9a72453655119bf0f63efb9b61e193d7f /course/chapters/02-architecture.json
parent526c420f4591f0a58f805b473fa76d3da2981eae (diff)
newOS4: interactive AI course (terminal module, portal, atlas, telemetry, daily maintenance+cron) + free store card
Diffstat (limited to 'course/chapters/02-architecture.json')
-rw-r--r--course/chapters/02-architecture.json131
1 files changed, 131 insertions, 0 deletions
diff --git a/course/chapters/02-architecture.json b/course/chapters/02-architecture.json
new file mode 100644
index 0000000..7dee513
--- /dev/null
+++ b/course/chapters/02-architecture.json
@@ -0,0 +1,131 @@
+{
+ "id": "02-architecture",
+ "title": "Architecture without the mystery",
+ "icon": "🏗",
+ "level": "beginner",
+ "lessons": [
+ {
+ "id": "2.1",
+ "title": "Terminal, modules, commands",
+ "objective": "See how the terminal, module manager and command registry fit together.",
+ "minutes": 9,
+ "commands": [
+ "modules",
+ "status",
+ "help"
+ ],
+ "blocks": [
+ {
+ "type": "text",
+ "text": "`terminal.js` parses input and dispatches a command to the module that registered it. Each module owns a `commands` map and contributes help strings."
+ },
+ {
+ "type": "cmd",
+ "text": "modules"
+ },
+ {
+ "type": "text",
+ "text": "The module manager lists every loaded module and its command count."
+ },
+ {
+ "type": "cmd",
+ "text": "status"
+ },
+ {
+ "type": "text",
+ "text": "`status` shows files, modules and network state in one place."
+ },
+ {
+ "type": "cmd",
+ "text": "check"
+ },
+ {
+ "type": "tip",
+ "text": "A command that exists in `help` but fails at runtime usually has an unmet module requirement that `check` reports."
+ }
+ ],
+ "exercise": {
+ "instruction": "List the loaded modules.",
+ "accept": [
+ "modules",
+ "status"
+ ],
+ "check": {
+ "type": "command"
+ },
+ "hint": "Type: modules"
+ },
+ "quiz": {
+ "q": "Who executes a command after you press Enter?",
+ "options": [
+ "nginx",
+ "the module that registered it",
+ "the browser cache"
+ ],
+ "answer": 1
+ },
+ "sources": [
+ "modules/core/terminal.js",
+ "modules/core/module-manager.js",
+ "modules/core/module-system.js"
+ ]
+ },
+ {
+ "id": "2.2",
+ "title": "VFS and the three loading tiers",
+ "objective": "Understand where files live and why a module edit sometimes needs a rebuild and sometimes does not.",
+ "minutes": 10,
+ "commands": [
+ "status",
+ "help",
+ "load-local"
+ ],
+ "blocks": [
+ {
+ "type": "text",
+ "text": "Files live in `virtual-fs.js` (in-memory + localStorage persistence). Directories are nodes; `readFile()` returns `null` for a missing path."
+ },
+ {
+ "type": "text",
+ "text": "Modules ship in three tiers:"
+ },
+ {
+ "type": "table",
+ "text": "core-bundle.js — core modules (requires rebuild) | critical-ext-bundle.js — editor, shell, alias, finder, filemgr, diff, busybox (requires rebuild) | individually loaded ext modules — cache-busted by LATEST_VER (no rebuild)"
+ },
+ {
+ "type": "cmd",
+ "text": "status"
+ },
+ {
+ "type": "warn",
+ "text": "Individually loaded modules are cached with `?v=<webx11_cache_ver>`. Without bumping `LATEST_VER`, users keep the old file."
+ }
+ ],
+ "exercise": {
+ "instruction": "Run `status` and find the VFS size line.",
+ "accept": [
+ "status"
+ ],
+ "check": {
+ "type": "command"
+ },
+ "hint": "Type: status"
+ },
+ "quiz": {
+ "q": "Which tier needs `rebuild-bundles.py` after an edit?",
+ "options": [
+ "core-bundle.js",
+ "webdav.js",
+ "course.js"
+ ],
+ "answer": 0
+ },
+ "sources": [
+ "modules/core/virtual-fs.js",
+ "modules/core/module-loader.js",
+ "scripts/rebuild-bundles.py"
+ ]
+ }
+ ]
+} \ No newline at end of file