Files
loki/scripts/site-template/tsconfig.json
84706fb9c1 feat(infra): the site scaffold — register, new-site.sh, widget provisioning (#395)
#394 auto-merged on its first commit, so the rest of this work landed on a
branch that was already closed. This is that remainder, rebuilt on main.

**apps.conf becomes the register.** It knew port, domain, repo and database; it
did not know who anything belongs to or whether they pay, so "what am I owed
this month" was unanswerable and the answers lived as prose in bitbaum Status
lines — "first client in progress", "city relationship unverified", "one real
clinic". Six fields added: owner, kind, status, plan, price, since. plan and
price are '-' everywhere on purpose; the gaps are the point.

lib.sh needed its parser widened first — `read -r ... DB` lets bash's last
variable swallow every extra field, so appending columns would have silently
turned DB into "petvity|bitbaum|product|live|-|-". A 6-field line still parses
exactly as before.

**new-site.sh** does repo → register → box → deploy in one command. Substrata
took nine manual steps today; Camille took the same route a week ago and skipped
two of them — creating the repository and registering it — then ran in
production for eight days with no version control, which made the studio's
central claim untestable for the site built to demonstrate it. Those two steps
have no visible payoff on the day, which is exactly why a machine should do them.

Guards, because a slug becomes a DNS label, a certificate subject, a directory
and a systemd unit: non-DNS-safe slugs, slugs already registered, hostnames
already served, and reserved names — infrastructure like supabase, and
impersonation like security, where a valid certificate on our own domain is a
phish rather than a website. Ports come from the register, not ss -ltnp: a port
free on the box but claimed here belongs to something not currently running.

**provision-widget.ts** creates the FleetCrown project and mints a token bound
to that site's origin. The widget is why this is not a dev shop — the owner
points at their own page and an agent changes it — so it is provisioned at birth
rather than later. Idempotent and deliberately non-rotating: rotating would
silently invalidate a snippet already live on a customer's site. Non-fatal in
the scaffold, because a missing widget is a minute's work while a half-finished
scaffold is a mess.

**The template ships tokens that say in the file that leaving them unchanged is
a bug.** Twenty-four identical sites would destroy the thing being sold.

Verified: guards refuse five bad inputs, dry-run allocates the next port and
prints every step, template installs and builds static pages clean, and the
widget provisioner was proved against the live database by giving Substrata its
project and token — now serving in production.

Co-authored-by: Mao Nakamoto <georgy.butaev@revamp-it.ch>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-27 13:47:30 +00:00

21 lines
541 B
JSON

{
"compilerOptions": {
"target": "ES2022",
"lib": ["dom", "dom.iterable", "esnext"],
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"skipLibCheck": true,
"plugins": [{ "name": "next" }],
"paths": { "@/*": ["./*"] }
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}