READMEs for strangers: overview, three layers, a real minimal adapter, security model; the long reference moves to docs/ARCHITECTURE.md

This commit is contained in:
CRTkafa 2026-09-30 23:20:58 +07:00
parent 8dd570147e
commit 507cd95d8e
5 changed files with 717 additions and 518 deletions

View file

@ -4,6 +4,12 @@ The framework behind the wayBetter apps: the apps you already use in a light nat
window, extended in place the way BetterDiscord extends Discord. Websites and services that ship a
heavy Electron client alike: every wayBetter app is the same shell, runtime and one small adapter.
This package is the TypeScript half and the command line. The native half is the Rust crate
`waybetter-host`, which is not on npm: an app takes it from the
[repository](https://git.crt.fyi/CRT/waybetter) as a git submodule or a path dependency. The
repository README explains how the three layers fit together and shows a minimal adapter;
`docs/ARCHITECTURE.md` there lists every module.
- **`waybetter/runtime/*`**: the page runtime. One DOM-mutation/animation-frame hub, one
fetch/XHR hub, a plugin API core with a themed UI kit (toasts, alerts, confirmations, prompts,
dialogs), a theme API, an OKLab theme color model, split-pane rail hiding, link routing and
@ -180,7 +186,7 @@ or, in a project that installs the package, `"$schema": "./node_modules/waybette
```sh
npm create waybetter plugin # *.plugin.js (or --ts) using api.scope, storage, ui and theme
npm create waybetter theme # theme JSON with "$schema" pointing at theme.schema.json
npm create waybetter app -- --site youtube.com # a new wayBetter app (Tauri 2 + waybetter-host)
npm create waybetter app myapp -- --site youtube.com # a new wayBetter app (Tauri 2 + waybetter-host)
```
[`create-waybetter`](https://www.npmjs.com/package/create-waybetter) generates code against this
@ -190,7 +196,7 @@ package's real API and schema; `--help` lists every option.
| Project | Target | What it is |
| --- | --- | --- |
| [wayBetter for X](https://waybetter.fyi/x/) | x.com (website) | Desktop app around the live X: tabs, split panes, real accounts side by side, themes, plugins, drafts and fixes for X's own bugs. The first wayBetter app. |
| [wayBetter for X](https://git.crt.fyi/CRT/waybetter-for-x) | x.com (website) | Desktop app around the live X: tabs, split panes, real accounts side by side, themes, plugins, drafts and fixes for X's own bugs. The first wayBetter app. |
Built something on wayBetter? Add it to this list with a pull request: name and link, what it extends, one line on what it does.