// The data source the whole app uses. Import `repo` from here — never reach for // `api/client` in stores/views. // // The desktop shell runs fully offline against the on-device SQLite core // (`local.ts`, over Tauri `invoke`); the web build uses REST. A desktop linked to a // server still reads and writes locally: the core syncs underneath. import { isDesktop } from "../desktop/bridge"; import { rest } from "./rest"; import { local } from "./local"; import type { Repo } from "./repo"; export const repo: Repo = isDesktop() ? local : rest; export type { Repo } from "./repo";