feat: bootstrap design kit and vaporwave demo baseline
This commit is contained in:
13
kit/patterns/import-export/README.md
Normal file
13
kit/patterns/import-export/README.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Import / Export Pattern
|
||||
|
||||
Canonical file transfer UX patterns for Go web applications:
|
||||
|
||||
- file import forms (CSV/JSON and similar)
|
||||
- validation preview tables before confirm
|
||||
- confirm step with human-readable summary
|
||||
- export controls (format + scope + options)
|
||||
- predictable file download behavior and filenames
|
||||
|
||||
This pattern covers UI and UX contracts. Business-specific validation and file schemas remain in
|
||||
the host project's own architecture docs.
|
||||
|
||||
32
kit/patterns/import-export/contract.md
Normal file
32
kit/patterns/import-export/contract.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# 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).
|
||||
|
||||
Reference in New Issue
Block a user