You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte-kit-vice/apps/base
dev 834e6c49a0
feat(apps): apps/base — la primera app que consume UIX como fuente desde un workspace, y su check entra en el gate (F3 del cierre)
3 weeks ago
..
scripts feat(apps): apps/base — la primera app que consume UIX como fuente desde un workspace, y su check entra en el gate (F3 del cierre) 3 weeks ago
src feat(apps): apps/base — la primera app que consume UIX como fuente desde un workspace, y su check entra en el gate (F3 del cierre) 3 weeks ago
README.md feat(apps): apps/base — la primera app que consume UIX como fuente desde un workspace, y su check entra en el gate (F3 del cierre) 3 weeks ago
package.json feat(apps): apps/base — la primera app que consume UIX como fuente desde un workspace, y su check entra en el gate (F3 del cierre) 3 weeks ago
svelte.config.js feat(apps): apps/base — la primera app que consume UIX como fuente desde un workspace, y su check entra en el gate (F3 del cierre) 3 weeks ago
tsconfig.json feat(apps): apps/base — la primera app que consume UIX como fuente desde un workspace, y su check entra en el gate (F3 del cierre) 3 weeks ago
vite.config.ts feat(apps): apps/base — la primera app que consume UIX como fuente desde un workspace, y su check entra en el gate (F3 del cierre) 3 weeks ago

README.md

@vicen/base

The base application skeleton: a SvelteKit app, prerendered to static files, that consumes UIX as source from this workspace. It follows docs/consuming.md to the letter and is the first app that runs the framework's pre-hydration boot for real. It is a skeleton, not a product — one page, composed from canon components only:

  • the AppShell block, with a Toggle that writes uix.prefs.setIntent('mode', …) and a Select that writes uix.prefs.setIntent('language', …) (es / en / ar);
  • a Heading and a Dialog opened by its trigger Button.

Where things are

File What it is
svelte.config.js the framework's alias table, runes by config, kit.csp with THIS app's boot hash
vite.config.ts sveltekit() + uixBootCheck, which fails the build on a stale boot
src/prefs-schema.ts the preference schema — read by the root layout AND compiled into the boot
src/generated/boot.js the compiled boot (npm run boot), committed
src/hooks.server.ts replaces %uix.boot% in src/app.html with the boot tag
src/lib/eidos-config.ts the eidos config the root registers, and the theme ids the boot is given
src/lib/reset.css the document reset the foundation leaves to the app (docs/consuming.md §5)
src/lib/strings.ts the page's words in es, en and ar, read with langs.ts
src/routes/+layout.svelte the standalone composition root
scripts/sync-assets.mjs copies the framework's static/fonts and static/sounds into static/
scripts/smoke.mjs loads build/ in Chromium and holds it to the boot contract

static/fonts/, static/sounds/, build/ and .svelte-kit/ are generated and git-ignored.

Commands

Run them from the repository root with -w apps/base, or from this directory without it.

npm run dev -w apps/base           # dev server (copies the assets first)
npm run build -w apps/base         # static build into build/ (copies the assets first)
npm run preview -w apps/base       # serve the build
npm run check -w apps/base         # svelte-kit sync + svelte-check
npm run boot -w apps/base          # recompile src/generated/boot.js — after editing the schema or upgrading UIX
npm run assets:sync -w apps/base   # copy fonts and sounds; `-- --check` only reports drift (exit 1)
npm run smoke -w apps/base         # smoke test of build/ (build first)
npm run apps:check                 # from the root: check + build + smoke, a member of `npm run gate`

The smoke prints one line of figures and exits non-zero on any failure. It first checks that build/index.html places the boot tag after the CSP <meta> (unguarded 0) — a <meta> policy governs only what follows it. Then, in Chromium, two passes for each of three visitors — es-ES, ar-EG, and es-ES asking for a dark scheme and reduced motion: the boot alone (modules under /_app/ aborted) must stamp its nine attributes on <html> with the values that visitor asks for (dir="rtl" lang="ar"; data-mode="dark" data-motion="reduce"), and the full load must show no page error, no console.error, no CSP violation, and the same nine attributes after hydration.

It counts only what a production build can show. A missing translation is not among them: langs reports it in dev only, and a path that does not exist prerenders as its raw text, silently. The page's own words are guarded by npm run check instead — src/lib/strings.ts requires all three languages, and a misspelt name does not compile. A missing context never reaches the smoke: it fails the prerender.

The gaps this app found in the framework are flagged to be fixed there, and left visible here rather than patched in the app.

Powered by TurnKey Linux.