-
Notifications
You must be signed in to change notification settings - Fork 0
reference data models
Douwe de Vries edited this page Jul 2, 2026
·
2 revisions
Data models define CSV input, selections, mappings, normalization, results, and persistence artifacts. Rust owns backend model behavior, while TypeScript mirrors wire shapes for the UI.
| Model | File | Notes |
|---|---|---|
CsvData, ColumnInfo, ColumnDataType
|
src/data/types.rs |
Parsed CSV and column metadata. |
ComparisonNormalizationConfig |
src/data/types.rs |
User-configurable normalization rules. |
ComparisonConfig |
src/data/types.rs |
Validated compare config. |
ColumnMapping, MappingType, MappingKind
|
src/data/types.rs |
Mapping provenance and wire kind. |
RowComparisonResult, ResultType, ValueDifference
|
src/data/types.rs |
Backend result model. |
CompareRequest, PairOrderSelection
|
src/backend/requests.rs |
Request and persisted selection DTOs. |
SnapshotV1 and nested types |
src/backend/persistence/v1/mod.rs |
Versioned snapshot schema. |
| Model | File | Notes |
|---|---|---|
FileLoadResponse, CompareRequest, CompareResponse
|
frontend/src/types/api.ts |
API and command DTOs. |
ComparisonNormalizationConfig |
frontend/src/types/api.ts |
Frontend mirror of Rust normalization config. |
AppState |
frontend/src/types/api.ts |
Main workflow state payload. |
AppStep, AppFile, MappingSelectionState
|
frontend/src/types/ui.ts |
UI state concepts. |
ResultRowViewModel |
frontend/src/features/results/presentation.ts |
UI rendering model, not wire format. |
src/presentation/responses.rs converts backend structs into serializable response DTOs. src/backend/persistence/v1/mod.rs converts snapshots into SessionData and response types after validation.
| File | Purpose |
|---|---|
src/data/types.rs |
Core backend data model. |
src/backend/requests.rs |
Requests and persistence response DTOs. |
src/presentation/responses.rs |
Response conversions. |
frontend/src/types/api.ts |
Frontend wire types. |
frontend/src/types/ui.ts |
Frontend UI state types. |
For conceptual explanations, read primitives.