Overview
Nobody registers hundreds of existing assets one modal at a time. Every competitor (Snipe-IT, Asset Panda, EZOfficeInventory) ships CSV import. exceljs and CSV tooling are already installed. The wizard UI is planned as [FE-15].
What to Build
Extend AssetsModule (or an ImportModule):
| Method |
Path |
Description |
POST |
/api/assets/import?dryRun=true|false |
Multipart CSV/XLSX upload |
GET |
/api/assets/import/template |
Download a CSV template with headers + one example row |
- Parse CSV and XLSX; map columns to asset fields (name, category, department, serialNumber, status, condition, purchaseDate, purchasePrice, location…)
- Category/department matched by name — auto-create or reject? Reject with a row error listing valid values (safer for v1)
- Dry-run mode returns per-row validation results (
row, status: ok|error, errors[]) without writing
- Real run: insert valid rows, return a summary
{ created, failed, errors[] }; large files processed via the Bull queue ([BE-22]) if row count exceeds a threshold
- Record
CREATED history events ([BE-08]) with an import marker
References
- Blocked by [BE-06], [BE-09]; queue via [BE-22]
- Consumed by [FE-15] (wizard UI)
Acceptance Criteria
Overview
Nobody registers hundreds of existing assets one modal at a time. Every competitor (Snipe-IT, Asset Panda, EZOfficeInventory) ships CSV import.
exceljsand CSV tooling are already installed. The wizard UI is planned as [FE-15].What to Build
Extend
AssetsModule(or anImportModule):POST/api/assets/import?dryRun=true|falseGET/api/assets/import/templaterow, status: ok|error, errors[]) without writing{ created, failed, errors[] }; large files processed via the Bull queue ([BE-22]) if row count exceeds a thresholdCREATEDhistory events ([BE-08]) with animportmarkerReferences
Acceptance Criteria