Admin & data mapping
Prototype architecture note for the MMX Field Issue Portal.
Master data (read-only)
Stores, schedule, contractor/GC data, purchase orders and received components come from stores.jsonl — one JSON object per store, the authoritative source of record. It replaces the earlier five-sheet normalized workbook import. Nothing here is editable in the UI, and store/location IDs are handled as strings so leading zeros are preserved.
Live dataset: 2,582 stores, 47,201 component lines and 7,810 purchase orders across 71 distinct SKUs in the beauty, gifting hub and kids hub groups. Refresh path: python3 scripts/import-stores-jsonl.py stores.jsonl → writes src/data/master-data.generated.json. The importer validates unique store IDs and positive component quantities. The full store database is never exposed to contractors as a downloadable table — lookup always requires a search criterion, and prices, costs and store/district manager contacts stay in the internal views only.
Contractor submissions (read/write)
Submissions are stored separately from master data behind the CaseRepository interface (src/lib/repository/types.ts). The prototype ships LocalCaseRepository (browser storage). Swapping in SharePoint or Dataverse means implementing the same six methods — the UI is untouched.
| App model | Notes | SharePoint / Dataverse |
|---|---|---|
| StoreMaster | Read-only master plan | MMX_Stores |
| ExpectedComponent | Planned qty per store/component | MMX_StoreScope |
| CaseReport | Title = case ID, Status choice, Owner person | MMX_Cases |
| IssueLine | Lookup → case; category/severity choices | MMX_CaseIssues |
| EvidenceItem | File + caption metadata | MMX_CaseEvidence (library) |
| StatusEvent | Status history entries | MMX_CaseHistory |
| InternalNote | Internal + clarification requests | MMX_CaseNotes |
Graph v1.0 through the connector gateway: POST /sites/{site-id}/lists/{list-id}/items for records and PUT /sites/{site-id}/drive/root:/{path}:/content for evidence. Case IDs (MMX-YYYY-000000) become a Dataverse autonumber or SharePoint calculated column.
Prototype limits
- Evidence files are held in browser storage, not a permanent document library.
- Seeded cases are labelled “Demo data” and derive from real component codes.
- No authentication yet; the role switcher stands in for contractor vs. internal roles.
- Contractors can only see stores they search for — the full store list is never exposed.