Skip to main content

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​

PieceRepoJob here
Frameworkdimdefine, html, hooks → window.Dim
Shared UIdimuiAtoms/kits as classic scripts
Hash routerdimurl#/note/:id / #/folder/:id
This appdim-boilerplateNotes 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​

  1. Clone the repo.
  2. Serve over HTTP (python3 -m http.server 4173).
  3. Open index.html in 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.