Skip to content
Myr

Merge chore/web-dev-host into main

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by oscabriel · committed by oscabriel · parents 83826c6, f8681bc · Browse files · 2 files+37 added−19 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+37 added−19 removed

  • other:+37 added−19 removed

2 files+37 added−19 removed

modified:apps/web/vite.config.ts+31 added-13 removed
modified:README.md+6 added-6 removed
81 unmodified lines
82```sh83bun run --cwd apps/web dev84```8586`vite dev` resolves the web's `#backend` import to `apps/web/src/dev/backend.ts`: every contract served in process over memory adapters, seeded with the two fictional example projects, `examples/datekit/` and `examples/burrow/`. Open the URL vite prints; `/auth/dev?handle=ines-v` signs you in as datekit's fictional decider.86`vite dev` resolves the web's `#backend` import to `apps/web/src/dev/backend.ts`: every contract served in process over memory adapters, seeded with the two fictional example projects, `examples/datekit/` and `examples/burrow/`. It answers on `http://127.0.0.1:3032`, pinned in `apps/web/vite.config.ts`; a `CADDY_DEV_HOST` in the gitignored `apps/web/.env` also lets a reverse proxy serve it under that name, with hot reload over `wss`. `/auth/dev?handle=ines-v` signs you in as datekit's fictional decider.8788To see every state a page can draw (each outcome, a family's fan mid-way, every kind of decision, a sealed ledger, a set env value, drafted proposals), add the dev fixtures: a fictional project, `vellum`, told as a story through the same service, and six small projects beside it. `live` also lands one family child about 20 s after a vellum page first reads it, so a page open on it shows the landing as it happens:8990```sh91VITE_DEV_FIXTURES=1 bun run --cwd apps/web dev92VITE_DEV_FIXTURES=live bun run --cwd apps/web dev93```9495With the fixtures running, `WEB_URL=<the URL vite printed> bun run --cwd apps/web e2e -- a11y.e2e.ts` runs axe and a keyboard walk over every page in both colour schemes at 1440 and 390 px (it loads axe from cdnjs at run time).95With the fixtures running, `WEB_URL=http://127.0.0.1:3032 bun run --cwd apps/web e2e -- a11y.e2e.ts` runs axe and a keyboard walk over every page in both colour schemes at 1440 and 390 px (it loads axe from cdnjs at run time).9697The CLI from source, against that dev world (use the port vite printed):97The CLI from source, against that dev world:9899```sh100MYR_URL=http://localhost:5173 bun apps/cli/src/bin.ts projects101MYR_URL=http://localhost:5173 bun apps/cli/src/bin.ts asks --project datekit102MYR_URL=http://localhost:5173 bun apps/cli/src/bin.ts ask format-ordinal --project datekit100MYR_URL=http://127.0.0.1:3032 bun apps/cli/src/bin.ts projects101MYR_URL=http://127.0.0.1:3032 bun apps/cli/src/bin.ts asks --project datekit102MYR_URL=http://127.0.0.1:3032 bun apps/cli/src/bin.ts ask format-ordinal --project datekit103```104105Both examples, seeded onto a platform that runs in Node on this machine for the length of the command, with real git:106
287 unmodified lines