39 lines
1.2 KiB
Markdown
39 lines
1.2 KiB
Markdown
|
|
# 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)
|