dim-boilerplate
dim-boilerplate is an encrypted notes demo built with Dim — plain JavaScript, no app-side transpile, no npm install. Dim, dimui, and dimurl load from their GitHub Pages CDNs. Selecting a note updates the hash (e.g. #/note/note-welcome) so deep links work on GitHub Pages.
Live: positive-intentions.github.io/dim-boilerplate.
Three pieces
| Piece | Repo | Job here |
|---|---|---|
| Framework | dim | define, html, hooks → window.Dim |
| Shared UI | dimui | Atoms/kits as classic scripts |
| Hash router | dimurl | #/note/:id / #/folder/:id |
| This app | dim-boilerplate | Notes vault, folders, list/editor |
Where to look
dim-boilerplate/
├── index.html # Dim + classic scripts + PWA
├── runTests.html # DimTest runner + coverage
├── runtime.js # BP registry + dimui loader
├── app.js # host chrome
└── notes/
├── e2e/ # iframe AUT specs
├── lib/ # vault, filters, …
└── components/ # atoms (proxies), molecules, organisms, pages
Start at notes/components/pages/notes-app/, then notes/components/organisms/notes-shell.js (encrypted useStore + folders).
Quick start
- Clone the repo.
- Serve over HTTP (
python3 -m http.server 4173). - Open
index.htmlin Chrome, create a vault password, add notes.
Runtimes: ?impl=js or ?impl=wasm. Local kits while developing: ?dimuiSrc=… and ?dimurlSrc=….
Notes deep links (after unlock): #/, #/folder/pinned, #/note/note-welcome.
Tests
runTests.html loads the same Dim + BP modules as the app (without app.js / pwa.js) and runs DimTest. Specs sit next to source (*.test.js). E2E specs live under notes/e2e/ and drive index.html in an iframe (including hash navigation).
Details: Unit tests, E2E tests, Coverage.