SD-0001: Solution Design — MVP sign up and create a single storefront (Feature #1) #2

Merged
ben.stull merged 12 commits from claude/optimistic-lumiere-ef8b1e into main 2026-06-10 14:12:57 +00:00
Showing only changes of commit a6d9bdf135 - Show all commits
@@ -985,12 +985,73 @@ the bootstrap state; rollback is flotilla redeploy of the prior version
## 8. Traceability matrix
<!-- §8 pending -->
| Pain | Business UC | Product UC | Slice | Tests |
| --- | --- | --- | --- | --- |
| PP-1 | BUC-1, BUC-1a, BUC-2 | PUC-1, PUC-2 (+a/b/c), PUC-3, PUC-9 | SLICE-2 | `test_14_01_0001…0004`, `test_14_01_0009…0011`, `test_puc_02a/b/c_*`, `test_puc_09_*`, INV-2/INV-3 tests |
| PP-2 | BUC-3, BUC-3a, BUC-4 | PUC-4, PUC-5, PUC-6, PUC-7, PUC-8 | SLICE-3 | `test_14_01_0013/0015/0016/0025/0026/0027`, `test_puc_05/07/08_*`, INV-4 test |
| PP-3 | BUC-1…BUC-4 (the real spine) | all of the above | SLICE-1…3 | the whole gate (`scripts/check.sh`) green on real persistence |
| PP-4 | BUC-5, BUC-5a | PUC-10, PUC-11 | SLICE-1, SLICE-4 | bootstrap test (INV-1), migrate-idempotence test; PPE + Prod rehearsals recorded in `docs/BOOTSTRAP.md` |
Audit: every pain is relieved by at least one slice; every BUC is realized by
at least one PUC; every PUC lands in exactly one slice; every slice carries
tests. PUC-9 is product-only (no BUC) by design; BUC-1a is realized inside
PUC-2a/b (failed proof ≠ admission).
## 9. Open Questions & Decisions log
<!-- §9 pending -->
**Open**
| # | Question | Owner | Blocks |
| --- | --- | --- | --- |
| Q-1 | Which SMTP relay/provider serves PPE and Prod? (Deployment-shape choice — config + Secret Manager entry, not code; the app speaks SMTP either way.) | Operator (Ben) | SLICE-4 deploy config only |
| Q-2 | Backup cadence for the Prod SQLite file beyond VM disk snapshots (and when does it graduate from "accepted pre-v1 bar", §6.9)? | Operator (Ben) | nothing in this Feature; revisit before real merchant data accrues |
| Q-3 | Account deletion / data export (OHM: Exit & Portability) — deliberately deferred from the MVP's honest bar; which Feature picks it up? | ecomm team | nothing here; must be captured as a Feature before public launch |
**Resolved**
| # | Decision | Resolution | Date |
| --- | --- | --- | --- |
| D-1 | Architecture for the clean rebuild | Carry forward the prototype's proven shape (4-layer monolith, SQLite/WAL, React SPA, REST BFF), invert seed + admission gate, defer GraphQL/OAuth — §2, §6.7 | 2026-06-10 |
| D-2 | One vs many storefronts per account | UX + service-layer 1-1 (INV-4) over a many-capable membership schema; conscious divergence from corpus 14.01.0012/0014, per Feature #1 | 2026-06-10 |
| D-3 | Auth bar for the MVP | Passwordless email + OTC; no passwords ⇒ no reset flow; OTC ⇒ verification inherent; OAuth/magic-link deferred under the email-canonical rule (INV-2) | 2026-06-10 |
| D-4 | Bootstrap mechanism | No seed anywhere; empty persistence is a working state (INV-1); migrations self-apply at startup (INV-7) | 2026-06-10 |
| D-5 | Canonical noun | "Storefront" (charter + Feature #1), with corpus "store" mapped in §10 | 2026-06-10 |
| D-6 | Corpus first-run steps not adopted | Onboarding questionnaire / POS opt-in (14.01.00170024) and multi-store selection (14.01.0012/0014) are out; merchant lands straight on the admin | 2026-06-10 |
## 10. Glossary & References
<!-- §10 pending -->
- **Storefront** — ecomm's unit of "a merchant's business presence": the
thing a merchant owns, manages, and (later) sells through. Maps to the BDD
corpus's **store** (corpus scenario text saying "store" reads as
"storefront" here — D-5).
- **Merchant** — the business actor who owns a storefront; as a product
persona, the authenticated account holder (the corpus's "Store Owner").
- **Admin** — the merchant-facing management surface of a storefront; this
release ships its honestly-empty shell.
- **One-time code (OTC)** — the short-lived emailed code that is ecomm's
passwordless proof of identity (INV-3).
- **Entry routing** — the exhaustive arrival rule of §6.5: no session →
landing; session without storefront → create; session with storefront →
admin.
- **Bootstrap** — bringing an environment from empty persistence to "first
merchant, first storefront" through the product flows alone (BUC-5);
documented per environment in `docs/BOOTSTRAP.md`.
- **PPE** — the pre-production environment; Prod's rehearsal stage (handbook
§8).
- **flotilla** — the Wiggleverse operator CLI that provisions and deploys
app environments (handbook §8); provisioning is an operator-run gesture
(§8.5).
- **OHM** — the concept corpus at <https://ohm.wiggleverse.org> that grounds
ecomm's mechanics (Agency & Anti-Manipulation, Privacy & Data
Minimization, Transparency & Traceability, Duty of Care, …).
- **References:**
- Anchoring Feature: <https://git.wiggleverse.org/wiggleverse/wiggleverse-ecomm/issues/1>
- BDD corpus: <https://git.wiggleverse.org/wiggleverse/wiggleverse-ecomm-prototype-content/src/branch/main/research/shopify>
— esp. `flows/first-run-experience.md` (14.01.\*), `analytics/dashboard.md`
(01.01.0008), `settings/general.md` (13.06.\*), `settings/users-and-permissions.md` (13.15.\*)
- Reference prototype: <https://git.wiggleverse.org/wiggleverse/wiggleverse-ecomm-prototype>
(R01R07; SPEC.md, `.importlinter`, `platform/`, `domains/`)
- Engineering handbook & Solution-Design standard:
<https://git.wiggleverse.org/wiggleverse/engineering> (`README.md`,
`solution-design/GUIDE.md`)
- Capture session for Feature #1: ecomm session 0019 (2026-06-10)