Files
citation-evidence/docs/decisions/ADR-0005-persistence.md
tegwick 2f25f99cae Implement CE-WP-0001 Foundations: TS scaffold, lint boundaries, normalize v1, fixtures
T01 Toolchain — vite + pnpm 9.15 + React 18 + strict TS (ADR-0001).
T02 Folder layout — src/{shared,engine,anchor,source,binder,work,app}/
    mirroring the future subsystem split, with path aliases.
T03 Boundary lint — eslint-plugin-boundaries enforcing the dependency
    edges from wiki/DependencyMap.md §4; verified by a violating fixture.
T04 Canonical normalization v1 — src/shared/text/normalize.ts with
    NORMALIZE_VERSION=1; 10/10 vitest covering ligatures, CRLF, soft
    hyphens (including line-break reassembly), mixed whitespace.
T05 PDF fixture corpus — 7 user-supplied German PDFs in fixtures/pdfs/
    (gitignored binaries) plus a manifest with verbatim known-good
    quotes and page counts, ready for CE-WP-0002 selector tests.
T06 README upgrade — umbrella README points at wiki/docs/workplans
    and documents the dev workflow.
T07 ADR-0002..0006 stubs in docs/decisions/.

Toolchain end-to-end: pnpm install + lint + typecheck + test all green.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 00:13:03 +02:00

1.2 KiB

ADR-0005 — Persistence layer (MVP and beyond)

  • Status: proposed
  • Date: 2026-05-24
  • Workplan: CE-WP-0001-T07 (stub); MVP placeholder in CE-WP-0002-T08

Context

The MVP needs persistence so that "click an evidence item and have the PDF jump to and highlight the passage — even after a full page reload" works (PRD §20 step 4). The acceptable MVP shortcut is localStorage (decided explicitly in CE-WP-0002-T08).

This ADR is the durable home for the real persistence decision: where do documents, annotations, evidence items, links, and sets live in v1.0?

Options

  • A. Browser-local only (IndexedDB via idb or dexie)

    • Pros: zero infra; great for a single-user reference workspace.
    • Cons: no cross-device sync; export/import only via files.
  • B. Local-first + sync server (e.g. CRDT-backed)

    • Pros: matches the long-term vision of a workspace tool; conflict-free multi-device.
    • Cons: significant infra and CRDT design cost; out of MVP scope.
  • C. Traditional client/server with a REST or GraphQL API

    • Pros: familiar; easy team-sharing story.
    • Cons: requires hosting; loses the local-first character.

Decision

(blank — to be answered before the second product slice past MVP.)

Consequences

(blank)