Skip to content

feat(desktop): tursodb single-writer relocation + in-process composition root #453

Description

@rickylabs

Part of #327

Handle: #E3 · Milestone: 0.0.1-beta.8 · Depends on: nothing hard (composition-root work). Blocks: #E4.

Scope — tursodb single-writer relocation + in-process composition root

Per-user data-dir resolver (%APPDATA%\<app> / ~/Library/Application Support/<app> / $XDG_DATA_HOME/<app>); single-process host composition root that resolves the data dir, sets DATABASE_URL, build()s the service in-process, and registerInProcessService(name, app); lifecycle ownership so no external process opens the same file.

Acceptance

  1. Exactly one process holds the tursodb file lock in single-process mode (no os error 33).
  2. Data-dir resolved from OS conventions, not launch cwd; validated on Windows (primary), spec for macOS/Linux.
  3. Prisma engine + tursodb driver run against a real-FS path (not the VFS) — option (c) does not require the native-addon-in-VFS spike; document this explicitly.
  4. b→c cutover guard: starting the in-process host verifies no external service holds the data dir.
  5. Bounded validation (O-2): Prisma engine confirmed working inside a deno desktop-packaged binary against the per-user data dir.

Design source: design/E-desktop/epic-and-issues.md (#E3).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions