No description
Find a file
2026-06-19 23:41:19 +02:00
.storybook test: harden MVP QA gate 2026-06-18 19:50:28 +02:00
docs/superpowers feat: add react api and shadcn foundation 2026-06-19 23:35:46 +02:00
drizzle feat: add dashboard persistence store 2026-06-18 18:16:21 +02:00
src feat(ui): port dashboard components to react 2026-06-19 23:41:19 +02:00
static test: harden MVP QA gate 2026-06-18 19:50:28 +02:00
tests/e2e fix(dashboard): rebalance type scale 2026-06-19 04:21:57 +02:00
.containerignore build: add internal container deployment 2026-06-19 13:13:20 +02:00
.gitignore feat: add Storybook component explorer 2026-06-18 18:53:48 +02:00
bun.lock feat: add react api and shadcn foundation 2026-06-19 23:35:46 +02:00
components.json feat: add react api and shadcn foundation 2026-06-19 23:35:46 +02:00
Containerfile build: add internal container deployment 2026-06-19 13:13:20 +02:00
drizzle.config.ts feat: add dashboard persistence store 2026-06-18 18:16:21 +02:00
index.html build: add react vite scaffold 2026-06-19 23:26:28 +02:00
package.json feat: add react api and shadcn foundation 2026-06-19 23:35:46 +02:00
playwright.config.ts feat(dashboard): add live observability overview 2026-06-19 03:38:38 +02:00
README.md build: add internal container deployment 2026-06-19 13:13:20 +02:00
svelte.config.js feat: scaffold SvelteKit runtime 2026-06-18 17:29:01 +02:00
tsconfig.json build: add react vite scaffold 2026-06-19 23:26:28 +02:00
vite.config.ts feat: add react api and shadcn foundation 2026-06-19 23:35:46 +02:00

Dimension Lab Website

Standalone SvelteKit runtime for the Dimension Lab system overview dashboard.

This project is not a Homepage customization and does not depend on Homepage runtime, frontend code, or configuration. The dashboard will be model-driven: the reusable renderer stays content-free, while environment-specific data lives in validated dashboard model state.

Development

bun install
bun run dev

This MVP uses Drizzle with Bun SQLite for local file-backed persistence.

Scripts

  • bun run dev: start the local development server.
  • bun run check: run Svelte and TypeScript checks.
  • bun run test: run Vitest.
  • bun run test:unit: run Vitest explicitly as the unit test stage.
  • bun run test:e2e: build and run Playwright browser smoke and QA checks.
  • bun run test:qa: run the MVP release gate.
  • bun run build: build the production app.
  • bun run preview: preview the production build.
  • bun run storybook: start the component explorer on port 6006.
  • bun run build-storybook: build the static Storybook review artifact.
  • bun run db:generate: generate Drizzle migrations from the server schema.
  • bun run db:check: validate migration consistency.

Persistence

Dashboard documents are stored in SQLite through Drizzle. The default database URL is:

DATABASE_URL=file:./data/dimensionlab.sqlite

SQLite files under data/ are ignored. Drizzle schema lives in src/lib/server/db/schema.ts; tracked migrations live in drizzle/. Runtime startup applies the checked-in dashboard migrations before reads or writes. If the app is launched from outside the repo tree, set DASHBOARD_MIGRATIONS_DIR to the tracked migrations directory. The current driver is bun:sqlite, which keeps this repo installable in the Bun workflow. The store boundary is isolated so a later Postgres driver can replace the SQLite connection without changing the dashboard model or renderer. Stored dashboard documents pass through a version migration boundary before reads or writes; the MVP supports dashboard.v1 and fails unsupported versions with an explicit migration error.

Seed Data

The initial Dimension Lab dashboard lives in src/lib/model/fixtures/dimensionlab.ts as validated model data. It includes the first-screen telemetry, service groups, status strip, weather module, Iconify icon identifiers, links, and datasource references. Values that are not live yet are labeled as fallback values in the data so later datasource adapters can replace them without changing presentation components.

Runtime Shape

The SvelteKit build uses the Node adapter, and the current persistence runtime is Bun because the MVP SQLite driver is bun:sqlite. Later issues add the seed data expansion and rendering pipeline.

Storybook

Storybook covers the reusable UI components with generic fixtures only. Stories must not import environment-specific dashboard content; the presentation layer accepts labels, values, icons, status, and links through typed props.

MVP QA Gate

Install the Chromium browser once before running e2e checks locally:

bunx playwright install chromium

Run the CI-ready release gate with:

bun run test:qa

The gate runs Svelte/TypeScript checks, Vitest coverage for model, persistence, renderer, datasource mocks, and presentation boundaries, the production build, the static Storybook build, and Playwright desktop/mobile smoke checks against the built adapter output. Playwright also performs baseline screenshot checks, keyboard navigation checks, reduced-motion checks, landmark checks, and axe accessibility checks against the real model-driven route.

Playwright uses an isolated SQLite database per run unless PLAYWRIGHT_DATABASE_URL is set explicitly.

Presentation code is checked for Dimension Lab content leakage. Environment specific labels, links, icon names, fallback values, and datasource references belong in validated model data, not reusable components.

Deployment Notes

The production build uses the SvelteKit Node adapter, but the current SQLite driver depends on Bun. A minimal deployment flow is:

bun install --frozen-lockfile
bun run build
DATABASE_URL=file:/data/dimensionlab.sqlite HOST=0.0.0.0 PORT=3000 bun build/index.js

Mount /data or set DATABASE_URL to another persistent SQLite path. If the process starts outside the repository root, set DASHBOARD_MIGRATIONS_DIR to the checked-in drizzle/ directory so startup migrations can run.

Internal Container

The checked-in Containerfile builds the SvelteKit adapter output into a Bun runtime image. For the Dimension Lab internal host, run it behind Caddy on a loopback port and mount persistent state at /data:

podman build -t localhost/dimensionlab-website:latest .
podman run --rm \
  --publish 127.0.0.1:25341:3000 \
  --volume "$HOME/containers/dimensionlab-website/data:/data:Z" \
  --env-file "$HOME/containers/dimensionlab-website/dimensionlab-website.env" \
  localhost/dimensionlab-website:latest

The env file must provide AGENT_CONFIG_TOKEN. Runtime defaults inside the image set HOST=0.0.0.0, PORT=3000, DATABASE_URL=file:/data/dimensionlab.sqlite, and DASHBOARD_MIGRATIONS_DIR=/app/drizzle.