Repository navigation
ADR 0011
Status: accepted · Built: done · Date: 2026-11-21 · Superseded by: 0012
Built: the core (@kodentuzo/spotstrap/blocks) with English wording, and the Vue views as a registry on spotstrap.dev (/r/vue/.json), built by scripts/registry.ts. Checked 2026-11-21: React Native Reusables publishes its own components as shadcn registry items, so native views can come from a registry too; Basecoat is CSS with no registry, so plain-HTML views will ship as npm exports. Not built yet: views for other frameworks.
Every app on Spotcraft needs the same pages: a privacy policy, a legal notice, a way to
download or delete your data, and a say in counting visits. Spotcraft gives each app the facts
they're built from (its ADR 0043): who runs the instance and what it does with personal data
(LEGAL_FACTS), and spotkit gives the calls (exportMe, deleteMe, analytics()). Apps are
written in different frameworks, rendered on the server or in the browser, and each owns its
own pages (ADR 0010: Spotstrap ships no components).
-
A block has two parts.
-
The core,
@kodentuzo/spotstrap/blockson npm: framework-free TypeScript with the wording, the document models and the small state machines. It touches no DOM when imported, and formats dates in UTC with a fixed locale, so a page renders the same on the server and in the browser. A fix to the wording reaches every app with an update. - Views, one per framework, copied into the app from a shadcn registry on spotstrap.dev and built from that framework's shadcn port. The app owns them and can change them.
-
The core,
-
Documents are data, not HTML: a title, then sections of paragraphs and lists, with links
as
{ text, href }. A view can't inject markup from them, and a native app can render them. -
The blocks:
-
privacyPolicy(facts, { appName, appData }): who is responsible, each processing with its reason, legal basis, time limit, processor and transfer, what the app stores in its own words, cookies and storage, the user's rights and how to use them, and the authority to complain to. Missing owner details become a sentence saying so, never an empty section; -
legalNotice(facts): the name, address and email; -
createYourData(client, …): download (the account and the app's rows in one file) and delete, with a confirmation, as a store a view subscribes to; -
createAnalyticsChoice(analytics): the switch wherever visits are counted, and theopt-inprompt until the visitor answers it once.
-
-
English first. Every sentence is in one
Messagesobject; another language is a file of the same shape, so it can't miss one. - spotkit is an optional peer dependency, for its types; the core takes the client and the analytics object as arguments.
- An app renders its legal pages from one call and a view, and its own text is only what it stores itself.
- Views for a framework exist once someone needs them; Vue comes first, for Sokobanko.
- The wording is a legal text in plain words. It needs a lawyer's reading once, and again when it changes.
Published from docs/. Edit the files there; changes here are overwritten.