Sync the points-mall capability plus the frontend-mall and frontend-admin requirements into the main specs, and write the capability Purpose the archive leaves as a placeholder.
1.6 KiB
1.6 KiB
1. Prerequisite and persistence
- 1.1 Confirm
customer-accountsis archived and use its guarded internal points-debit service. - 1.2 Add additive migrations for platform points products, redemption orders, redemption items, status constraints, address snapshots, and indexes.
- 1.3 Implement the Rust points module repositories and services for published catalog reads, admin product management, atomic redemption, history, and validated fulfillment transitions.
2. Contract and backend proof
- 2.1 Register customer and platform routes with appropriate roles and add shared types, client methods, locales, and fixed-data adapter parity.
- 2.2 Add integration tests for unpublished-product rejection, insufficient points rollback, concurrent final stock, ownership filtering, and fulfillment transition validation.
3. Application surfaces
- 3.1 Add platform-admin points-product and redemption-order management screens and admin nav entries using the shared client.
- 3.2 Replace mall points fixtures with live catalog, address-aware redemption, refreshed balance, and customer redemption history.
- 3.3 Remove
INTEGRAL_PRODUCTSandUSER_STATSpage imports without deleting fixed-data adapter support.
4. Verification and specification
- 4.1 Seed deterministic points products and credit demo customer points through the archived customer-accounts credit path (append-only entry, never an absolute balance write). Browser-smoke admin publication and customer redemption.
- 4.2 Run cargo test for vmall-api, builds for mall and admin, and strict validation for this OpenSpec change.