React importer
Use @diakrio/importer-react for a guided workflow from source selection to reviewed mapping, validation, delivery, and rejected-record correction.
Package availability
Preview · npm release pending@diakrio/importer-reactThis scoped package has no verified public npm release as of 2026-09-18. You can try the locally built runtime on this site while the release is prepared.
Free for personal and commercial application use. License and notices.
Choose a processing mode
Local mode
The browser samples, maps, validates, and separates rejected records. Accepted batches go directly to your callback; Diakrio receives no imported data. Your callback controls onward transmission and must deduplicate stable batch IDs.
Cloud v2
Your backend authorizes the user and provides a short-lived session through getSession. The widget loads the pinned schema and relays accepted batches to its approved destination. A publishable key alone is insufficient. See the session guide.
Source settings
Browse, drop, or paste CSV, JSON, NDJSON, or XML. Choose CSV delimiter, header handling, and text encoding. A nested JSON record path such as data.contacts reads the complete JSON in a worker and is limited to 32 MiB; use NDJSON for larger nested sources. The published beta supports XLSX with worksheet selection. The next beta candidate adds PSV, JSONL, YAML, XLS, ODS, incremental nested JSON, and larger saved-source budgets; these are not in 0.1.0-beta.1.
Review and recovery
Review field mappings and the mapped preview before delivery. Rejected rows can be filtered, corrected, revalidated, and submitted again. Corrected records use a separate submission; a retry of an uncertain delivery retains its original batch identity and bytes. These are different operations.
Optional resume configuration exposes “Keep progress on this device.” It saves the prepared source, mappings, corrections, and delivery journal in IndexedDB, but never session tokens. Saved drafts expire within 24 hours and are removed on the next access; Discard removes them immediately. Namespace drafts by your authorized user, importer, and destination, and clear them on logout.
Cloud reload recovery asks your backend to renew the same owned session. The version, destination, budgets, and receipts stay fixed; a new session cannot recover the old import. Browser eviction, revocation, and the absolute renewal horizon can prevent recovery.
Cancellation
Cancellation stops future local work. With a saved draft, it preserves the Cloud import for resume. Without a saved draft, API mode requests terminal Cloud cancellation. Already delivered records cannot be recalled.
Before production
- Review your maximum input, record, and batch sizes.
- Handle rejected records, diagnostics, cancellation, and completion.
- For Cloud, publish the schema and register an exact origin and approved destination.
- Authorize session ownership on your backend; verify receiver signatures and durable idempotency.
Open the React quickstart or read the processing boundary. OCR and anonymizer are separate packages and are not automatically enabled in this workflow.