Files
PriceForge/bible-local/kit/patterns/import-export/contract.md
2026-03-01 22:26:50 +03:00

880 B

Contract: Import / Export Workflows

Import Workflow

Recommended stages:

  1. Upload
  2. Preview / Validate
  3. Confirm
  4. Execute
  5. Result summary

Rules:

  • Validation preview must be human-readable (table/list), not raw JSON only.
  • Warnings and errors should be shown per row and in aggregate summary.
  • Confirm step should clearly communicate scope and side effects.

Export Workflow

  • User must explicitly choose export scope (selected, filtered, all) when ambiguity exists.
  • Export format should be explicit (csv, json, etc.).
  • Download response should set:
    • Content-Type
    • Content-Disposition
  • If CSV targets spreadsheet users, document delimiter and BOM policy.

Error Handling

  • Import errors should map to clear user-facing messages.
  • Export errors after streaming starts must degrade gracefully (human-readable fallback).