36 lines
1.7 KiB
Markdown
36 lines
1.7 KiB
Markdown
# Phase 0 Research: Archive Curator
|
|
|
|
## Decision: Backend Web API Framework
|
|
- **Decision**: Axum
|
|
- **Rationale**: Rust-native, async-first, strong ecosystem support, and clean layering
|
|
between validation and business logic.
|
|
- **Alternatives considered**: Actix Web (fast, but heavier abstraction), Warp
|
|
(composable but less active).
|
|
|
|
## Decision: Frontend UI Framework
|
|
- **Decision**: SvelteKit
|
|
- **Rationale**: Small bundle size, fast UI updates, and well-suited for touch-first,
|
|
swipe-capable interfaces.
|
|
- **Alternatives considered**: React (larger bundle, more boilerplate), Vue (good fit
|
|
but less direct for swipe-first interactions without extra libraries).
|
|
|
|
## Decision: State Storage
|
|
- **Decision**: SQLite for directory state + append-only audit log file
|
|
- **Rationale**: Durable local storage with simple deployment, supports atomic updates
|
|
and queryable state history; audit log remains append-only and retained indefinitely.
|
|
- **Alternatives considered**: Flat JSON state (simpler but weaker concurrency and
|
|
integrity guarantees), embedded key-value store (less standard tooling).
|
|
|
|
## Decision: API Contract Style
|
|
- **Decision**: REST with explicit preview/confirm endpoints
|
|
- **Rationale**: Clear separation between preview and confirmation phases enforces
|
|
safety requirements; easy to document and test.
|
|
- **Alternatives considered**: GraphQL (flexible but less explicit for multi-step
|
|
destructive actions).
|
|
|
|
## Decision: Testing Strategy
|
|
- **Decision**: Rust unit/integration tests + HTTP API tests + NixOS VM tests
|
|
- **Rationale**: Aligns with binding testing plan and ensures safety rules are enforced
|
|
at multiple layers, including system service behavior.
|
|
- **Alternatives considered**: Unit tests only (insufficient for safety guarantees).
|