-
Notifications
You must be signed in to change notification settings - Fork 0
primitives
Douwe de Vries edited this page Jul 1, 2026
·
2 revisions
Active contributors: Douwe de Vries
This section documents the core domain objects that carry CSV Align state across parsing, session storage, comparison, presentation, persistence, and the frontend API. These primitives are the vocabulary used by the feature pages and the system pages.
Related pages:
| Area | Source paths |
|---|---|
| Core Rust data types | /Users/vriesd/projects/csv-align/src/data/types.rs |
| Session state |
/Users/vriesd/projects/csv-align/src/backend/session.rs, /Users/vriesd/projects/csv-align/src/backend/store.rs
|
| Request models | /Users/vriesd/projects/csv-align/src/backend/requests.rs |
| Response DTOs | /Users/vriesd/projects/csv-align/src/presentation/responses.rs |
| Frontend API types | /Users/vriesd/projects/csv-align/frontend/src/types/api.ts |
| Frontend UI state types | /Users/vriesd/projects/csv-align/frontend/src/types/ui.ts |
-
CsvDatais a loaded CSV with optional file path, headers, and rows. -
ColumnInfodescribes physical CSV columns and detected data types. -
FileSideidentifies File A or File B. -
ColumnMappingandMappingTypedescribe how comparison columns are paired. -
ComparisonConfigis the validated configuration used by the comparison engine. -
ComparisonNormalizationConfigcontrols cleanup and flexible key matching. -
RowComparisonResultrepresents one output row category. -
ComparisonSummaryaggregates result counts. -
SessionDatakeeps loaded data, mappings, config, results, and revision state for a session.
- CSV bytes are parsed into
CsvDataand detectedColumnInfovalues. - The backend stores File A and File B in
SessionData. - User selections and mappings arrive as request DTOs from
/Users/vriesd/projects/csv-align/src/backend/requests.rs. - Validation converts request DTOs into
ComparisonConfig. - The comparison engine emits
RowComparisonResultvalues and aComparisonSummary. -
/Users/vriesd/projects/csv-align/src/presentation/responses.rsconverts backend primitives into response DTOs. -
/Users/vriesd/projects/csv-align/frontend/src/types/api.tsmirrors the response and request shapes consumed by React.
-
Auto-pairing depends on
ColumnMappingandMappingDto. -
Flexible row-key matching depends on
ComparisonNormalizationConfig. - Saved work serializes selections, mappings, normalization, results, and summaries.
-
Results and export consumes
ResultResponseandSummaryResponse. - API exposes these shapes over HTTP and Tauri.
- Change Rust primitives in
/Users/vriesd/projects/csv-align/src/data/types.rs. - Change session fields in
/Users/vriesd/projects/csv-align/src/backend/session.rs. - Change request DTOs in
/Users/vriesd/projects/csv-align/src/backend/requests.rs. - Change response DTOs in
/Users/vriesd/projects/csv-align/src/presentation/responses.rs. - Keep frontend types in
/Users/vriesd/projects/csv-align/frontend/src/types/api.tsaligned with Rust response and request shapes.
| File | Purpose |
|---|---|
/Users/vriesd/projects/csv-align/src/data/types.rs |
Core Rust domain primitives. |
/Users/vriesd/projects/csv-align/src/backend/session.rs |
In-memory per-session state. |
/Users/vriesd/projects/csv-align/src/backend/requests.rs |
HTTP/Tauri request DTOs and validation error enums. |
/Users/vriesd/projects/csv-align/src/presentation/responses.rs |
Response DTOs and conversions from Rust domain results. |
/Users/vriesd/projects/csv-align/frontend/src/types/api.ts |
Frontend API contract types. |
/Users/vriesd/projects/csv-align/frontend/src/types/ui.ts |
Frontend UI-only state types. |