retold 1.0.6 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +84 -0
- package/CLAUDE.md +52 -0
- package/docs/.nojekyll +0 -0
- package/docs/README.md +162 -0
- package/docs/_sidebar.md +78 -0
- package/docs/_topbar.md +6 -0
- package/docs/architecture/architecture.md +312 -0
- package/docs/architecture/module-architecture.md +234 -0
- package/docs/architecture/modules.md +99 -0
- package/docs/cover.md +15 -0
- package/docs/css/docuserve.css +73 -0
- package/docs/examples/examples.md +71 -0
- package/docs/examples/todolist/todo-list-cli-client.md +178 -0
- package/docs/examples/todolist/todo-list-console-client.md +152 -0
- package/docs/examples/todolist/todo-list-model.md +114 -0
- package/docs/examples/todolist/todo-list-server.md +128 -0
- package/docs/examples/todolist/todo-list-web-client.md +177 -0
- package/docs/examples/todolist/todo-list.md +162 -0
- package/docs/getting-started.md +273 -0
- package/docs/index.html +39 -0
- package/docs/modules/fable.md +198 -0
- package/docs/modules/meadow.md +209 -0
- package/docs/modules/orator.md +165 -0
- package/docs/modules/pict.md +235 -0
- package/docs/modules/utility.md +54 -0
- package/docs/retold-building-documentation.md +33 -0
- package/docs/retold-catalog.json +1405 -0
- package/docs/retold-keyword-index.json +203389 -0
- package/examples/quickstart/README.md +47 -0
- package/examples/quickstart/layer1/README.md +21 -0
- package/examples/quickstart/layer1/index.js +49 -0
- package/examples/quickstart/layer1/package-lock.json +344 -0
- package/examples/quickstart/layer1/package.json +12 -0
- package/examples/quickstart/layer2/README.md +34 -0
- package/examples/quickstart/layer2/index.js +251 -0
- package/examples/quickstart/layer2/package-lock.json +4468 -0
- package/examples/quickstart/layer2/package.json +17 -0
- package/examples/quickstart/layer2/setup-database.js +61 -0
- package/examples/quickstart/layer3/README.md +39 -0
- package/examples/quickstart/layer3/index.js +91 -0
- package/examples/quickstart/layer3/package-lock.json +1936 -0
- package/examples/quickstart/layer3/package.json +14 -0
- package/examples/quickstart/layer4/README.md +47 -0
- package/examples/quickstart/layer4/generate-build-config.js +18 -0
- package/examples/quickstart/layer4/html/index.html +17 -0
- package/examples/quickstart/layer4/package-lock.json +13206 -0
- package/examples/quickstart/layer4/package.json +38 -0
- package/examples/quickstart/layer4/server.js +28 -0
- package/examples/quickstart/layer4/source/BookStore-Application-Config.json +15 -0
- package/examples/quickstart/layer4/source/BookStore-Application.js +54 -0
- package/examples/quickstart/layer4/source/providers/Router-Config.json +18 -0
- package/examples/quickstart/layer4/source/views/View-About.js +38 -0
- package/examples/quickstart/layer4/source/views/View-Home.js +50 -0
- package/examples/quickstart/layer4/source/views/View-Layout.js +60 -0
- package/examples/quickstart/layer5/README.md +26 -0
- package/examples/quickstart/layer5/index.js +121 -0
- package/examples/quickstart/layer5/package-lock.json +345 -0
- package/examples/quickstart/layer5/package.json +13 -0
- package/examples/todo-list/Dockerfile +45 -0
- package/examples/todo-list/README.md +394 -0
- package/examples/todo-list/cli-client/package-lock.json +418 -0
- package/examples/todo-list/cli-client/package.json +19 -0
- package/examples/todo-list/cli-client/source/TodoCLI-CLIProgram.js +30 -0
- package/examples/todo-list/cli-client/source/TodoCLI-Run.js +3 -0
- package/examples/todo-list/cli-client/source/commands/add/TodoCLI-Command-Add.js +74 -0
- package/examples/todo-list/cli-client/source/commands/complete/TodoCLI-Command-Complete.js +84 -0
- package/examples/todo-list/cli-client/source/commands/list/TodoCLI-Command-List.js +110 -0
- package/examples/todo-list/cli-client/source/commands/remove/TodoCLI-Command-Remove.js +49 -0
- package/examples/todo-list/cli-client/source/services/TodoCLI-Service-API.js +92 -0
- package/examples/todo-list/console-client/console-client.cjs +913 -0
- package/examples/todo-list/console-client/package-lock.json +426 -0
- package/examples/todo-list/console-client/package.json +19 -0
- package/examples/todo-list/console-client/views/PictView-TUI-Header.cjs +43 -0
- package/examples/todo-list/console-client/views/PictView-TUI-Layout.cjs +58 -0
- package/examples/todo-list/console-client/views/PictView-TUI-StatusBar.cjs +41 -0
- package/examples/todo-list/console-client/views/PictView-TUI-TaskList.cjs +104 -0
- package/examples/todo-list/docker-motd.sh +36 -0
- package/examples/todo-list/docker-run.sh +2 -0
- package/examples/todo-list/docker-shell.sh +2 -0
- package/examples/todo-list/model/MeadowSchema-Task.json +152 -0
- package/examples/todo-list/model/Task-Compiled.json +25 -0
- package/examples/todo-list/model/Task.mddl +15 -0
- package/examples/todo-list/model/data/seeded_todo_events.csv +1001 -0
- package/examples/todo-list/server/database-initialization-service.cjs +273 -0
- package/examples/todo-list/server/package-lock.json +6113 -0
- package/examples/todo-list/server/package.json +19 -0
- package/examples/todo-list/server/server.cjs +138 -0
- package/examples/todo-list/web-client/css/todolist-theme.css +235 -0
- package/examples/todo-list/web-client/generate-build-config.cjs +18 -0
- package/examples/todo-list/web-client/html/index.html +18 -0
- package/examples/todo-list/web-client/package-lock.json +12030 -0
- package/examples/todo-list/web-client/package.json +43 -0
- package/examples/todo-list/web-client/source/TodoList-Application-Config.json +12 -0
- package/examples/todo-list/web-client/source/TodoList-Application.cjs +383 -0
- package/examples/todo-list/web-client/source/providers/Provider-TaskData.cjs +243 -0
- package/examples/todo-list/web-client/source/providers/Router-Config.json +32 -0
- package/examples/todo-list/web-client/source/views/View-Layout.cjs +75 -0
- package/examples/todo-list/web-client/source/views/View-TaskForm.cjs +87 -0
- package/examples/todo-list/web-client/source/views/View-TaskList.cjs +127 -0
- package/examples/todo-list/web-client/source/views/calendar/View-MonthView.cjs +293 -0
- package/examples/todo-list/web-client/source/views/calendar/View-WeekView.cjs +149 -0
- package/examples/todo-list/web-client/source/views/calendar/View-YearView.cjs +226 -0
- package/modules/.claude/settings.local.json +52 -0
- package/modules/CLAUDE.md +60 -0
- package/modules/Checkout.sh +42 -0
- package/modules/Include-Retold-Module-List.sh +15 -0
- package/modules/Retold-Modules.md +24 -0
- package/modules/Status.sh +59 -0
- package/modules/Update.sh +45 -0
- package/modules/fable/Fable.md +2 -0
- package/modules/meadow/Meadow.md +1 -0
- package/modules/orator/Orator.md +1 -0
- package/modules/pict/Pict.md +1 -0
- package/package.json +30 -35
- package/source/Retold.cjs +2 -0
- package/test/Retold_tests.js +23 -41
- package/.travis.yml +0 -13
- package/source/Retold-Meadow-Macros.js +0 -269
- package/source/Retold.js +0 -48
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(done)",
|
|
5
|
+
"Bash(xargs:*)",
|
|
6
|
+
"Bash(npm install:*)",
|
|
7
|
+
"Bash(npm view:*)",
|
|
8
|
+
"Bash(npm test:*)",
|
|
9
|
+
"Bash(chmod:*)",
|
|
10
|
+
"Bash(pdftk:*)",
|
|
11
|
+
"Bash(pdftoppm:*)",
|
|
12
|
+
"Bash(gs:*)",
|
|
13
|
+
"Bash(convert:*)",
|
|
14
|
+
"Bash(npx mocha test/Orator-File-Translation_basic_tests.js --exit --timeout 10000)",
|
|
15
|
+
"Bash(docker build:*)",
|
|
16
|
+
"Bash(docker run:*)",
|
|
17
|
+
"Bash(docker logs:*)",
|
|
18
|
+
"Bash(node -e:*)",
|
|
19
|
+
"Bash(curl:*)",
|
|
20
|
+
"Bash(docker images:*)",
|
|
21
|
+
"Bash(docker stop:*)",
|
|
22
|
+
"Bash(wc:*)",
|
|
23
|
+
"Bash(npm run build:*)",
|
|
24
|
+
"Bash(node build-site.js:*)",
|
|
25
|
+
"Bash(npm run build-site:*)",
|
|
26
|
+
"Bash(npx http-server example_applications/todo-app/site -p 8787 -c-1)",
|
|
27
|
+
"Bash(npm run build-examples:*)",
|
|
28
|
+
"Bash(ls:*)",
|
|
29
|
+
"Bash(tr:*)",
|
|
30
|
+
"Bash(npm pack:*)",
|
|
31
|
+
"Bash(tar:*)",
|
|
32
|
+
"Bash(git check-ignore:*)",
|
|
33
|
+
"Bash(node /Users/stevenvelozo/Code/retold/modules/pict/pict-docuserve/source/cli/Docuserve-CLI-Run.js inject:*)",
|
|
34
|
+
"Bash(node example_applications/build-examples.js:*)",
|
|
35
|
+
"Bash(npm run build-docs:*)",
|
|
36
|
+
"Bash(lsof:*)",
|
|
37
|
+
"Bash(find:*)",
|
|
38
|
+
"Bash(DISCLAIMER='> **Note:** This is sample documentation for a fictional product, created to demonstrate [pict-docuserve]\\(https://github.com/stevenvelozo/pict-docuserve\\). It is not a real application.')",
|
|
39
|
+
"Bash(SKIP_FILES=\"_sidebar.md _topbar.md cover.md errorpage.md\")",
|
|
40
|
+
"Bash(npm install)",
|
|
41
|
+
"Bash(xargs kill:*)",
|
|
42
|
+
"Bash(timeout 5 node:*)",
|
|
43
|
+
"Bash(grep:*)",
|
|
44
|
+
"Bash(npx quack:*)",
|
|
45
|
+
"Bash(npx copy-files-from-to:*)",
|
|
46
|
+
"Bash(python3:*)",
|
|
47
|
+
"Bash(echo:*)",
|
|
48
|
+
"Bash(npx quack build:*)",
|
|
49
|
+
"Bash(npx quack copy:*)",
|
|
50
|
+
"Bash(mysql:*)",
|
|
51
|
+
"Bash(node:*)",
|
|
52
|
+
"Bash(kill:*)",
|
|
53
|
+
"Bash(wait)",
|
|
54
|
+
"Bash(while read d)",
|
|
55
|
+
"Bash(do echo \"Cleaning: $d\")",
|
|
56
|
+
"Bash(git pull:*)",
|
|
57
|
+
"Bash(git push:*)",
|
|
58
|
+
"Bash(git add:*)",
|
|
59
|
+
"Bash(git rebase:*)",
|
|
60
|
+
"Bash(git commit:*)",
|
|
61
|
+
"Bash(cd:*)",
|
|
62
|
+
"Bash(node source/cli/Meadow-Integration-CLI-Run.js:*)",
|
|
63
|
+
"Bash(bash:*)",
|
|
64
|
+
"Bash(npm test)",
|
|
65
|
+
"WebFetch(domain:stevenvelozo.github.io)",
|
|
66
|
+
"Bash(git ls-tree:*)",
|
|
67
|
+
"Bash(npx mocha:*)",
|
|
68
|
+
"Bash(pkill:*)",
|
|
69
|
+
"Bash(ln:*)",
|
|
70
|
+
"Bash(timeout 10 node:*)",
|
|
71
|
+
"Bash(npm ls:*)",
|
|
72
|
+
"Bash(node -e \"\nconst proc = require\\(''child_process''\\).spawn\\(''node'', [''server.cjs''], { cwd: ''/Users/stevenvelozo/Code/retold/examples/todo-list/server'', stdio: ''pipe'' }\\);\nlet output = '''';\nproc.stdout.on\\(''data'', \\(d\\) => { output += d.toString\\(\\); }\\);\nproc.stderr.on\\(''data'', \\(d\\) => { output += d.toString\\(\\); }\\);\nsetTimeout\\(\\(\\) => {\n const http = require\\(''http''\\);\n\n // Test 1: Static HTML serving\n http.get\\(''http://localhost:8086/'', \\(res\\) => {\n let data = '''';\n res.on\\(''data'', \\(c\\) => { data += c; }\\);\n res.on\\(''end'', \\(\\) => {\n console.log\\(''=== Test 1: Static HTML ===''\\);\n console.log\\(''Status:'', res.statusCode\\);\n console.log\\(''Contains RetoldExampleTodoWebClient:'', data.includes\\(''RetoldExampleTodoWebClient''\\)\\);\n\n // Test 2: API list\n http.get\\(''http://localhost:8086/1.0/Tasks'', \\(res2\\) => {\n let data2 = '''';\n res2.on\\(''data'', \\(c\\) => { data2 += c; }\\);\n res2.on\\(''end'', \\(\\) => {\n let tasks = JSON.parse\\(data2\\);\n console.log\\(''''\\);\n console.log\\(''=== Test 2: API Reads ===''\\);\n console.log\\(''Tasks returned:'', tasks.length\\);\n\n // Test 3: Create\n let postData = JSON.stringify\\({Name:''CJS test'',Status:''Pending'',LengthInHours:1}\\);\n let req = http.request\\({hostname:''localhost'',port:8086,path:''/1.0/Task'',method:''POST'',headers:{''Content-Type'':''application/json''}}, \\(res3\\) => {\n let data3 = '''';\n res3.on\\(''data'', \\(c\\) => { data3 += c; }\\);\n res3.on\\(''end'', \\(\\) => {\n let created = JSON.parse\\(data3\\);\n console.log\\(''''\\);\n console.log\\(''=== Test 3: Create ===''\\);\n console.log\\(''Created ID:'', created.IDTask, ''Name:'', created.Name\\);\n\n // Test 4: Update\n let putData = JSON.stringify\\({IDTask:created.IDTask, Name:''CJS test \\(updated\\)'', Status:''Complete''}\\);\n let req2 = http.request\\({hostname:''localhost'',port:8086,path:''/1.0/Task'',method:''PUT'',headers:{''Content-Type'':''application/json''}}, \\(res4\\) => {\n let data4 = '''';\n res4.on\\(''data'', \\(c\\) => { data4 += c; }\\);\n res4.on\\(''end'', \\(\\) => {\n let updated = JSON.parse\\(data4\\);\n console.log\\(''''\\);\n console.log\\(''=== Test 4: Update ===''\\);\n console.log\\(''Updated:'', updated.Name, updated.Status\\);\n\n // Test 5: Delete\n let req3 = http.request\\({hostname:''localhost'',port:8086,path:''/1.0/Task/''+created.IDTask,method:''DELETE''}, \\(res5\\) => {\n let data5 = '''';\n res5.on\\(''data'', \\(c\\) => { data5 += c; }\\);\n res5.on\\(''end'', \\(\\) => {\n let del = JSON.parse\\(data5\\);\n console.log\\(''''\\);\n console.log\\(''=== Test 5: Delete ===''\\);\n console.log\\(''Deleted count:'', del.Count\\);\n console.log\\(''''\\);\n console.log\\(''=== ALL TESTS PASSED ===''\\);\n proc.kill\\(\\);\n process.exit\\(0\\);\n }\\);\n }\\);\n req3.end\\(\\);\n }\\);\n }\\);\n req2.write\\(putData\\);\n req2.end\\(\\);\n }\\);\n }\\);\n req.write\\(postData\\);\n req.end\\(\\);\n }\\);\n }\\);\n }\\);\n }\\);\n}, 3000\\);\n\")",
|
|
73
|
+
"Bash(node -e \" const _origStderrWrite = process.stderr.write; process.stderr.write = function \\(pChunk\\) { if \\(typeof pChunk === ''string'' && pChunk.indexOf\\(''Setulc''\\) !== -1\\) { return true; } return _origStderrWrite.apply\\(process.stderr, arguments\\); }; const blessed = require\\(''blessed''\\); const libPict = require\\(''pict''\\); const libPictApplication = require\\(''pict-application''\\); const libPictTerminalUI = require\\(''pict-terminalui''\\); const libViewLayout = require\\(''/Users/stevenvelozo/Code/retold/examples/todo-list/console-client/views/PictView-TUI-Layout.cjs''\\); const libViewHeader = require\\(''/Users/stevenvelozo/Code/retold/examples/todo-list/console-client/views/PictView-TUI-Header.cjs''\\); const libViewTaskList = require\\(''/Users/stevenvelozo/Code/retold/examples/todo-list/console-client/views/PictView-TUI-TaskList.cjs''\\); const libViewStatusBar = require\\(''/Users/stevenvelozo/Code/retold/examples/todo-list/console-client/views/PictView-TUI-StatusBar.cjs''\\); console.log\\(''All console-client .cjs modules loaded OK''\\); console.log\\(''Views:'', [libViewLayout, libViewHeader, libViewTaskList, libViewStatusBar].map\\(v => v.default_configuration.ViewIdentifier\\).join\\('', ''\\)\\); process.exit\\(0\\); \")",
|
|
74
|
+
"Bash(node Stricture.js:*)",
|
|
75
|
+
"Bash(timeout 15 node:*)",
|
|
76
|
+
"Bash(npm update:*)",
|
|
77
|
+
"Bash(awk:*)",
|
|
78
|
+
"Bash(/Users/stevenvelozo/Code/retold/examples/todo-list/model/data/fix_csv.py << 'PYEOF'\nimport re\n\nINPUT_FILE = '/Users/stevenvelozo/Code/retold/examples/todo-list/model/data/seeded_todo_events.csv'\n\nwith open\\(INPUT_FILE, 'r'\\) as f:\n lines = f.readlines\\(\\)\n\nheader = lines[0].strip\\(\\)\noutput_lines = [header]\n\n# Pattern for the last 3 fields: date, number, status\n# DueDate is YYYY-MM-DD, LengthInHours is a number \\(int or float\\), Status is one of three values\ntail_pattern = re.compile\\(r',\\(\\\\d{4}-\\\\d{2}-\\\\d{2}\\),\\([\\\\d.]+\\),\\(Pending|In Progress|Complete\\)\\\\s*\\)\n\nfor i, line in enumerate\\(lines[1:], start=2\\):\n line = line.strip\\(\\)\n if not line:\n continue\n\n # Find the tail \\(DueDate, LengthInHours, Status\\) from the right\n match = tail_pattern.search\\(line\\)\n if not match:\n print\\(f\"WARNING: Line {i} does not match expected tail pattern: {line[:80]}\"\\)\n output_lines.append\\(line\\)\n continue\n\n tail_start = match.start\\(\\)\n due_date = match.group\\(1\\)\n length = match.group\\(2\\)\n status = match.group\\(3\\)\n\n # Everything before the tail is \"Name,Description\" \\(with possible extra commas in Description\\)\n front = line[:tail_start]\n\n # Split front into Name and Description at the first comma\n first_comma = front.index\\(','\\)\n name = front[:first_comma]\n description = front[first_comma + 1:]\n\n # Strip any existing surrounding quotes from the description\n if description.startswith\\('\"'\\) and description.endswith\\('\"'\\):\n description = description[1:-1]\n\n # Escape any double quotes inside the description \\(double them per CSV standard\\)\n description = description.replace\\('\"', '\"\"'\\)\n\n # Reconstruct the line with the description properly quoted\n fixed_line = f'{name},\"{description}\",{due_date},{length},{status}'\n output_lines.append\\(fixed_line\\)\n\nwith open\\(INPUT_FILE, 'w'\\) as f:\n f.write\\('\\\\n'.join\\(output_lines\\) + '\\\\n'\\)\n\nprint\\(f\"Processed {len\\(output_lines\\) - 1} data rows \\(plus header\\).\"\\)\nprint\\(\"File written successfully.\"\\)\nPYEOF)",
|
|
79
|
+
"Bash(for f in architecture.md fable.md meadow.md orator.md pict.md utility.md modules.md examples.md todo-list.md todo-list-model.md todo-list-server.md todo-list-web-client.md todo-list-console-client.md todo-list-cli-client.md)",
|
|
80
|
+
"Bash(do [ -f \"/Users/stevenvelozo/Code/retold/docs/$f\" ])",
|
|
81
|
+
"WebFetch(domain:registry.npmjs.org)"
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
}
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Retold
|
|
2
|
+
|
|
3
|
+
A suite of ~50 JavaScript/Node.js modules for building web applications and APIs. MIT licensed.
|
|
4
|
+
|
|
5
|
+
## Architecture
|
|
6
|
+
|
|
7
|
+
Five module groups, each in `modules/<group>/`:
|
|
8
|
+
|
|
9
|
+
- **Fable** — Core ecosystem: dependency injection (service provider pattern), configuration, logging, UUID generation, expression parser, REST client, template engine
|
|
10
|
+
- **Meadow** — Data access layer: ORM, query DSL (FoxHound), schema definitions (Stricture), DB connectors (MySQL, MSSQL, SQLite), RESTful endpoint generation
|
|
11
|
+
- **Orator** — API server: Restify wrapper, static file serving, HTTP proxy, WebSocket support (Tidings)
|
|
12
|
+
- **Pict** — MVC tools: views, templates, providers, application lifecycle, form builders, TUI grid, CLI utilities
|
|
13
|
+
- **Utility** — Build tools (Quackage), manifest management (Manyfest), documentation (Indoctrinate), process supervision (Ultravisor)
|
|
14
|
+
|
|
15
|
+
## Repository Structure
|
|
16
|
+
|
|
17
|
+
Each module is its own git repo cloned into a category folder under `modules/`. The root repo tracks module organization only — individual module code lives in their own repos.
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
retold/
|
|
21
|
+
├── source/Retold.js # Minimal common service class
|
|
22
|
+
├── test/ # Root-level tests
|
|
23
|
+
├── modules/
|
|
24
|
+
│ ├── fable/ # 6 modules
|
|
25
|
+
│ ├── meadow/ # 13 modules
|
|
26
|
+
│ ├── orator/ # 6 modules
|
|
27
|
+
│ ├── pict/ # 15 modules
|
|
28
|
+
│ └── utility/ # 10+ modules
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Code Style
|
|
32
|
+
|
|
33
|
+
- Tabs for indentation, never spaces
|
|
34
|
+
- Plain JavaScript only — no TypeScript
|
|
35
|
+
- Opening braces on new lines (Allman style)
|
|
36
|
+
- Variable naming:
|
|
37
|
+
- `pVariable` — function parameters
|
|
38
|
+
- `tmpVariable` — scoped/temporary variables
|
|
39
|
+
- `VARIABLE` — globals and constants
|
|
40
|
+
- `libSomeLibrary` — imported/required libraries
|
|
41
|
+
- Always follow existing patterns in the module you are editing
|
|
42
|
+
|
|
43
|
+
## Common Commands
|
|
44
|
+
|
|
45
|
+
- `npm test` — Run tests (Mocha, TDD style)
|
|
46
|
+
- `npx quack build` — Build with Quackage
|
|
47
|
+
- `npm run coverage` — Code coverage via nyc/Istanbul
|
|
48
|
+
- `npm run docker-dev-build` / `docker-dev-run` — Docker dev environment (some modules)
|
|
49
|
+
|
|
50
|
+
## Key Services Pattern
|
|
51
|
+
|
|
52
|
+
Modules extend `fable-serviceproviderbase`. Services register with a Fable instance and get access to logging, configuration, and other services through dependency injection. When writing new services, follow this pattern.
|
package/docs/.nojekyll
ADDED
|
File without changes
|
package/docs/README.md
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# Retold
|
|
2
|
+
|
|
3
|
+
> A story-obsessed application suite.
|
|
4
|
+
|
|
5
|
+
Retold is a collection of ~50 JavaScript/Node.js modules for building web applications and APIs. The modules span five groups — from core dependency injection up through data access, API serving, and full MVC — all designed to compose together through a shared service provider pattern.
|
|
6
|
+
|
|
7
|
+
## Architecture at a Glance
|
|
8
|
+
|
|
9
|
+
The modules build on each other in layers. A typical Retold application stacks up like this:
|
|
10
|
+
|
|
11
|
+
```mermaid
|
|
12
|
+
block-beta
|
|
13
|
+
columns 4
|
|
14
|
+
|
|
15
|
+
block:app:4
|
|
16
|
+
columns 4
|
|
17
|
+
appLabel["Your Application / Mid-Tier Service"]:4
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
block:server:2
|
|
21
|
+
oratorLabel["Orator\n(API Server)"]
|
|
22
|
+
end
|
|
23
|
+
block:endpoints:2
|
|
24
|
+
endpointLabel["Meadow-Endpoints\n(Auto-generated REST)"]
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
block:data:4
|
|
28
|
+
columns 3
|
|
29
|
+
meadowLabel["Meadow (Data Access)"]:3
|
|
30
|
+
foxhound["FoxHound\n(Query DSL)"]
|
|
31
|
+
stricture["Stricture\n(Schema DDL)"]
|
|
32
|
+
connections["Connections\n(MySQL / MSSQL / SQLite)"]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
block:core:4
|
|
36
|
+
columns 4
|
|
37
|
+
fableLabel["Fable (Core Ecosystem)"]:4
|
|
38
|
+
settings["Settings\n(Config)"]
|
|
39
|
+
flog["Log\n(Logging)"]
|
|
40
|
+
uuid["UUID\n(Identity)"]
|
|
41
|
+
spb["Service\nProvider Base"]
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
block:infra:4
|
|
45
|
+
columns 3
|
|
46
|
+
config["Config Files"]
|
|
47
|
+
logs["Log Streams"]
|
|
48
|
+
db[("Database")]
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
space:4
|
|
52
|
+
|
|
53
|
+
block:pict:4
|
|
54
|
+
columns 4
|
|
55
|
+
pictLabel["Pict (MVC Tools)"]:4
|
|
56
|
+
views["Views"]
|
|
57
|
+
templates["Templates"]
|
|
58
|
+
providers["Providers"]
|
|
59
|
+
appfw["App\nLifecycle"]
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
app --> server
|
|
63
|
+
app --> endpoints
|
|
64
|
+
server --> data
|
|
65
|
+
endpoints --> data
|
|
66
|
+
data --> core
|
|
67
|
+
core --> infra
|
|
68
|
+
pict --> core
|
|
69
|
+
|
|
70
|
+
style app fill:#e8f5e9,stroke:#42b983,color:#333
|
|
71
|
+
style server fill:#e3f2fd,stroke:#42a5f5,color:#333
|
|
72
|
+
style endpoints fill:#e3f2fd,stroke:#42a5f5,color:#333
|
|
73
|
+
style data fill:#fff3e0,stroke:#ffa726,color:#333
|
|
74
|
+
style core fill:#fce4ec,stroke:#ef5350,color:#333
|
|
75
|
+
style infra fill:#f5f5f5,stroke:#bdbdbd,color:#333
|
|
76
|
+
style pict fill:#f3e5f5,stroke:#ab47bc,color:#333
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**Fable** is the foundation — every other module depends on it for dependency injection, configuration, logging, and UUID generation.
|
|
80
|
+
|
|
81
|
+
**Meadow** provides the data access layer. It uses **FoxHound** to generate SQL queries, **Stricture** to define schemas, and database-specific connection modules to talk to MySQL, MSSQL, or SQLite.
|
|
82
|
+
|
|
83
|
+
**Orator** wraps an HTTP server (Restify) to serve APIs. **Meadow-Endpoints** auto-generates RESTful CRUD routes from Meadow entities.
|
|
84
|
+
|
|
85
|
+
**Pict** provides Model-View-Controller patterns for browser, console, and text-based UIs. It connects to Fable for services and can use Meadow for data.
|
|
86
|
+
|
|
87
|
+
All modules follow the **Fable Service Provider Pattern**: they register with a Fable instance and gain access to logging, configuration, and each other through dependency injection.
|
|
88
|
+
|
|
89
|
+
## Module Groups
|
|
90
|
+
|
|
91
|
+
### [Fable](/fable/fable/) — Core Ecosystem
|
|
92
|
+
|
|
93
|
+
The foundation layer. Dependency injection, configuration, logging, UUID generation, expression parsing, REST client, and template engine.
|
|
94
|
+
|
|
95
|
+
**Key modules:** [fable](/fable/fable/) · [fable-log](/fable/fable-log/) · [fable-settings](/fable/fable-settings/) · [fable-uuid](/fable/fable-uuid/) · [fable-serviceproviderbase](/fable/fable-serviceproviderbase/)
|
|
96
|
+
|
|
97
|
+
### [Meadow](/meadow/meadow/) — Data Access Layer
|
|
98
|
+
|
|
99
|
+
Provider-agnostic data broker with schema management, query generation, and automatic audit tracking.
|
|
100
|
+
|
|
101
|
+
**Key modules:** [meadow](/meadow/meadow/) · [foxhound](/meadow/foxhound/) · [stricture](/meadow/stricture/) · [meadow-endpoints](/meadow/meadow-endpoints/) · [retold-data-service](/meadow/retold-data-service/)
|
|
102
|
+
|
|
103
|
+
### [Orator](/orator/orator/) — API Server
|
|
104
|
+
|
|
105
|
+
Thin HTTP server abstraction with REST and IPC support, static file serving, proxy pass-through, and WebSocket reporting.
|
|
106
|
+
|
|
107
|
+
**Key modules:** [orator](/orator/orator/) · [orator-serviceserver-restify](/orator/orator-serviceserver-restify/) · [orator-static-server](/orator/orator-static-server/)
|
|
108
|
+
|
|
109
|
+
### [Pict](/pict/pict/) — MVC Tools
|
|
110
|
+
|
|
111
|
+
Non-opinionated Model-View-Controller tools for building UIs as text strings — browser, console, or any text-based interface.
|
|
112
|
+
|
|
113
|
+
**Key modules:** [pict](/pict/pict/) · [pict-view](/pict/pict-view/) · [pict-application](/pict/pict-application/) · [pict-section-form](/pict/pict-section-form/)
|
|
114
|
+
|
|
115
|
+
### [Utility](/utility/indoctrinate/) — Build & Documentation Tools
|
|
116
|
+
|
|
117
|
+
Build tooling, manifest management, documentation generation, and process supervision.
|
|
118
|
+
|
|
119
|
+
**Key modules:** [indoctrinate](/utility/indoctrinate/) · [manyfest](/utility/manyfest/) · [quackage](/utility/quackage/) · [ultravisor](/utility/ultravisor/)
|
|
120
|
+
|
|
121
|
+
## Quick Start
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
# Install the core
|
|
125
|
+
npm install fable
|
|
126
|
+
|
|
127
|
+
# Add data access
|
|
128
|
+
npm install meadow foxhound stricture
|
|
129
|
+
|
|
130
|
+
# Add an API server
|
|
131
|
+
npm install orator orator-serviceserver-restify meadow-endpoints
|
|
132
|
+
|
|
133
|
+
# Add browser MVC
|
|
134
|
+
npm install pict
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
```javascript
|
|
138
|
+
const libFable = require('fable');
|
|
139
|
+
|
|
140
|
+
let _Fable = new libFable({
|
|
141
|
+
Product: 'MyApp',
|
|
142
|
+
ProductVersion: '1.0.0',
|
|
143
|
+
LogLevel: 3
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
_Fable.log.info('Retold application started.');
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## Learn More
|
|
150
|
+
|
|
151
|
+
- **[Architecture](architecture/architecture.md)** — Detailed layer-by-layer breakdown of the module stack
|
|
152
|
+
- **[Getting Started](getting-started.md)** — Building your first Retold application
|
|
153
|
+
- **[Examples](examples/examples.md)** — Complete runnable applications including the Todo List full-stack example
|
|
154
|
+
- **[Fable In Depth](modules/fable.md)** — The core ecosystem and service provider pattern
|
|
155
|
+
- **[Meadow In Depth](modules/meadow.md)** — Data access, schemas, and query generation
|
|
156
|
+
- **[Orator In Depth](modules/orator.md)** — API servers and endpoint generation
|
|
157
|
+
- **[Pict In Depth](modules/pict.md)** — MVC tools for browser and console UIs
|
|
158
|
+
- **[All Modules](modules/modules.md)** — Exhaustive list of every Retold repository
|
|
159
|
+
|
|
160
|
+
## License
|
|
161
|
+
|
|
162
|
+
MIT
|
package/docs/_sidebar.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
- Getting Started
|
|
2
|
+
|
|
3
|
+
- [Getting Started](getting-started.md)
|
|
4
|
+
- [Architecture](architecture/architecture.md)
|
|
5
|
+
- [Ecosystem Architecture](architecture/module-architecture.md)
|
|
6
|
+
- [All Modules](architecture/modules.md)
|
|
7
|
+
|
|
8
|
+
- [Examples](examples/examples.md)
|
|
9
|
+
|
|
10
|
+
- [Todo List Application](examples/todolist/todo-list.md)
|
|
11
|
+
- [Todo List: System Model](examples/todolist/todo-list-model.md)
|
|
12
|
+
- [Todo List: API Server](examples/todolist/todo-list-server.md)
|
|
13
|
+
- [Todo List: Web Client](examples/todolist/todo-list-web-client.md)
|
|
14
|
+
- [Todo List: Console Client](examples/todolist/todo-list-console-client.md)
|
|
15
|
+
- [Todo List: CLI Client](examples/todolist/todo-list-cli-client.md)
|
|
16
|
+
|
|
17
|
+
- [Fable — Core Ecosystem](modules/fable.md)
|
|
18
|
+
|
|
19
|
+
- [fable](/fable/fable/)
|
|
20
|
+
- [fable-serviceproviderbase](/fable/fable-serviceproviderbase/)
|
|
21
|
+
- [fable-settings](/fable/fable-settings/)
|
|
22
|
+
- [fable-log](/fable/fable-log/)
|
|
23
|
+
- [fable-uuid](/fable/fable-uuid/)
|
|
24
|
+
- [fable-log-logger-bunyan](/fable/fable-log-logger-bunyan/)
|
|
25
|
+
|
|
26
|
+
- [Meadow — Data Access](modules/meadow.md)
|
|
27
|
+
|
|
28
|
+
- [stricture](/meadow/stricture/)
|
|
29
|
+
- [foxhound](/meadow/foxhound/)
|
|
30
|
+
- [bibliograph](/meadow/bibliograph/)
|
|
31
|
+
- [meadow](/meadow/meadow/)
|
|
32
|
+
- [parime](/meadow/parime/)
|
|
33
|
+
- [meadow-endpoints](/meadow/meadow-endpoints/)
|
|
34
|
+
- [meadow-connection-mysql](/meadow/meadow-connection-mysql/)
|
|
35
|
+
- [meadow-connection-mssql](/meadow/meadow-connection-mssql/)
|
|
36
|
+
- [meadow-connection-sqlite](/meadow/meadow-connection-sqlite/)
|
|
37
|
+
- [retold-data-service](/meadow/retold-data-service/)
|
|
38
|
+
- [retold-harness](/meadow/retold-harness/)
|
|
39
|
+
- [meadow-integration](/meadow/meadow-integration/)
|
|
40
|
+
|
|
41
|
+
- [Orator — API Server](modules/orator.md)
|
|
42
|
+
|
|
43
|
+
- [orator](/orator/orator/)
|
|
44
|
+
- [orator-serviceserver-restify](/orator/orator-serviceserver-restify/)
|
|
45
|
+
- [orator-static-server](/orator/orator-static-server/)
|
|
46
|
+
- [orator-http-proxy](/orator/orator-http-proxy/)
|
|
47
|
+
- [tidings](/orator/tidings/)
|
|
48
|
+
- [orator-endpoint](/orator/orator-endpoint/)
|
|
49
|
+
- [orator-conversion](/orator/orator-conversion/)
|
|
50
|
+
|
|
51
|
+
- [Pict — MVC Tools](modules/pict.md)
|
|
52
|
+
|
|
53
|
+
- [pict](/pict/pict/)
|
|
54
|
+
- [pict-template](/pict/pict-template/)
|
|
55
|
+
- [pict-view](/pict/pict-view/)
|
|
56
|
+
- [pict-provider](/pict/pict-provider/)
|
|
57
|
+
- [pict-application](/pict/pict-application/)
|
|
58
|
+
- [pict-panel](/pict/pict-panel/)
|
|
59
|
+
- [pict-nonlinearconfig](/pict/pict-nonlinearconfig/)
|
|
60
|
+
- [pict-section-flow](/pict/pict-section-flow/)
|
|
61
|
+
- [pict-docuserve](/pict/pict-docuserve/)
|
|
62
|
+
- [cryptbrau](/pict/cryptbrau/)
|
|
63
|
+
- [informary](/pict/informary/)
|
|
64
|
+
- [pict-service-commandlineutility](/pict/pict-service-commandlineutility/)
|
|
65
|
+
- [pict-section-recordset](/pict/pict-section-recordset/)
|
|
66
|
+
- [pict-section-content](/pict/pict-section-content/)
|
|
67
|
+
- [pict-section-form](/pict/pict-section-form/)
|
|
68
|
+
- [pict-section-tuigrid](/pict/pict-section-tuigrid/)
|
|
69
|
+
- [pict-router](/pict/pict-router/)
|
|
70
|
+
- [pict-serviceproviderbase](/pict/pict-serviceproviderbase/)
|
|
71
|
+
- [pict-terminalui](/pict/pict-terminalui/)
|
|
72
|
+
|
|
73
|
+
- [Utility — Build Tools](modules/utility.md)
|
|
74
|
+
|
|
75
|
+
- [indoctrinate](/utility/indoctrinate/)
|
|
76
|
+
- [manyfest](/utility/manyfest/)
|
|
77
|
+
- [quackage](/utility/quackage/)
|
|
78
|
+
- [ultravisor](/utility/ultravisor/)
|