clone

a deno framework for local-first web apps that open instantly, work offline and sync when users choose

feat/141-demo-review-fixes
lofi / docs / spikes / jazz2-baseline / README.md
README.md 1.5K rendered
1# Jazz 2 exact-version control23This spike is intentionally a thin vendor control for GitHub issue #7. It pins4`jazz-tools@2.0.0-alpha.53` at every import, asks for the persistent browser driver, and uses the5vendor Vite plugin/local server without a lofi data abstraction.67```sh8deno task spike:jazz2:dev9deno task spike:jazz2:cloud10deno task spike:jazz2:build11deno task spike:jazz2:preview12```1314The UI distinguishes a requested OPFS driver from a locally confirmed write. It calls15`WriteResult.wait({ tier: "local" })` before claiming local durability. “Sync configured” does not16mean “connected”: this package pin has public disconnect/reconnect methods but no public live17connection-state or pending-operation count signal.1819The development plugin starts a local Jazz server, injects `VITE_JAZZ_APP_ID` and20`VITE_JAZZ_SERVER_URL`, and writes the generated app ID to this directory's ignored `.env`. The lofi21task runner pre-seeds a stable local app ID in that internal file so Jazz does not trigger a22mid-start Vite restart on the clean first run. The plugin's interactive TTY banner can print its23generated admin secret, so the graduated lofi command must not expose that banner unchanged.2425The separate `cloud` task loads the ignored root `.env`, validates the public pair, and maps only26`JAZZ_APP_ID` and `JAZZ_SERVER_URL` into Vite's client-visible namespace. Server credentials remain27unprefixed for the plugin's schema publication and are covered by the repository leak scan.