-
Notifications
You must be signed in to change notification settings - Fork 0
06. Imports & Exports
Nicolás Baier Quezada edited this page Jun 5, 2026
·
6 revisions
DIRD+ uses a single portable container format, .dird, to move data between installations. The full binary specification is in docs/dird-format.md.
- A
.dirdfile is a ZIP containing patient(s), sessions, images (as blobs), detections, segmentations, classifications, measurements and reports — everything needed to reconstruct the records. - Version 2.0 (current): encrypted. The container is wrapped with AES-256-GCM and an authenticated header. The key is derived from the export passphrase (separate from the application login password) with Argon2id.
- Version 1.0.1 (legacy): plain ZIP, still importable for backwards compatibility.
- Implementation:
src/lib/export/(DirdExporter,DirdImporter) andsrc/lib/export/dird-container.ts(header v2.0).
.dirdfiles contain sensitive clinical data and are never committed to the repository (they are git-ignored).
| Level | What it includes |
|---|---|
| Full patient | One patient with all their sessions, images and reports |
| Single session | One session of one patient |
| All data | Every patient in the database |
- ID remapping — record IDs are reassigned on import so they never collide with existing local IDs.
- Collision detection — if an incoming session would overwrite an existing one, the user is asked to confirm.
-
Wrong passphrase — an encrypted
.dirdopened with the wrong passphrase fails gracefully (authenticated decryption rejects it); no partial data is written.
Because the migration from the legacy IndexedDB storage exports a .dird backup before touching anything, .dird is also the recommended manual backup format: export "All data" periodically and store the file securely.