CASE STUDYPlatform
MDM: master data for convenience-store vendors, governed by design.
A Master Data Management platform — the system that sits underneath a convenience-store operator and governs one source of truth for stores, vendors, products and inventory. Designed and built solo, end to end: domain model, information architecture, UX flows, database schema and application code.
- ROLE
- Product Designer & Design-Engineer (solo)
- STATUS
- Admin console, onboarding and vendor portal running end to end; rebuilt on SagUI
- STACK
- Next.js 16 · TypeScript · PostgreSQL · SagUI · Turborepo · Vercel
- Apps on one Postgres database
- 3
- Steps in vendor onboarding
- 8
- Design system: SagUI, shared with this site’s case studies
- 1
- Vendor writes straight to master data
- 0


The problem
This started with an observation from an in-production enterprise MDM system for a large convenience-store operation. The way it worked and the way a system managing vendor and product data at that scale should work kept pulling apart in the same five places:
- 01
Admins created every product
Vendors couldn't enter or maintain their own data — every SKU, attribute and update went through an internal admin, by hand.
- 02
Vendor links added after the fact
The vendor–product relationship was admin bookkeeping, not a step in the vendor's own workflow.
- 03
No onboarding or categorization
Vendors weren't classified by what they supplied, so nothing downstream — compliance, fields, permissions — could depend on it.
- 04
No approval gate
Vendor and product data went straight into production tables with no staging, review or needs-more-info step.
- 05
Design spent on polish, not process
Screens were good-looking; the broken workflow and data governance underneath went largely unaddressed.
None of these gaps are cosmetic. No onboarding means no categorization; no categorization means no conditional compliance; no approval gate means bad data has a straight path into production.
I formed a point of view on the fix — vendors onboard and categorize themselves, every vendor- and product-facing change passes an explicit approval step, and design effort goes into the process, not just the pixels — and validated it with subject-matter experts from the operational side before building anything.
The MVP flow
- 01 InviteMDM admins send vendor invites — a deliberate, self-service relationship instead of admin-created records.
- 02 ApproveAdmins review and approve vendors and products — the gate the original system never had.
- 03 Self-serviceVendors categorize themselves at onboarding and maintain their own catalog from then on.
- 04 Design systemVisual consistency becomes infrastructure — now SagUI, built once and reused across every app.
System architecture
The domain had to be modeled before any screen was designed. I treated architecture as a design problem: every structural decision has a UX consequence downstream.
┌───────────────────────── Turborepo ─────────────────────────┐
staff ───────►│ apps/web apps/onboarding apps/vendor-portal │◄──── vendors
│ (MDM admin) (invite wizard) (approved vendors) │
│ │ approves ──────── handoff ──────────►│ │
│ │◄──────────── reviews submissions ────┤ │
│ └──────── packages/db · packages/ui ───┘ │
└──────────────────────────┬──────────────────────────────────┘
▼
PostgreSQL (shared)- 01
Different threat models
The vendor portal faces the open internet; the admin console doesn't need to. Separate deploys keep a vendor-side issue away from internal tooling.
- 02
Separate auth, no branching
Staff and vendors use different session models, so neither app's middleware has to ask “which kind of user is this?”
- 03
Independent scaling
400 vendors syncing catalogs at 9am shouldn't queue behind internal admin work.


The staging-and-approval pattern
The single most important decision: nothing a vendor submits touches master data directly. Every vendor-initiated change lands in a staging table with a status. An admin acts on it. Only then does a promotion step write to the real tables. Orders are the deliberate exception — fast and reversible enough to write straight into their own state machine.
| VENDOR ACTION | STAGING TABLE | ON APPROVAL |
|---|---|---|
| Edits profile | vendor_edit_requests | Updates vendors |
| Submits a new product | product_submissions + line items | Inserts into products, assigns MDM SKU |
| Edits an existing product | product_edit_requests | Updates products |
This pattern isn’t incidental architecture — it is the product. Everything else is UI wrapped around one guarantee: master data stays trustworthy however much self-service the front end offers.
Stack decisions
- Plain SQL via pgPrisma was ruled out — cross-table analytics needed hand-tunable SQL its abstraction fought against.
- Magic-link authNo passwords for vendors in v1 — removes a whole class of credential UX; scoped, signed, httpOnly sessions kept separate from staff auth.
- SagUIOne component library and token set for all three apps, with rules AI agents follow when they build screens.
- Hashed invite tokensInvite tokens are stored only as hashes; the raw link is shown once, at creation.
Rebuilt on SagUI
The first version sat on shadcn/ui with its own small kit. I’ve since rebuilt all three apps on SagUI →, my design system for people and AI agents. Every screen on this page is SagUI: the AppShell and sidebar, page headings, metric cards, data tables, the stepper, chips and badges.
That changed how the product gets built. The repo carries SagUI’s rules for AI agents, and agents check the SagUI MCP server before they write UI — so new screens come out on-system without a design pass. The design effort stays where it belongs: on the workflow.
- One shell, three appsAdmin, onboarding and vendor portal share the same AppShell, tokens and components from @sagui/ui.
- Tokens onlySemantic colors, radius roles and elevation levels — no hard-coded values in app code.
- Agent-ready repoAGENTS.md rules plus search → get → validate through the SagUI MCP server.
- Docs in the monorepoSagUI docs and Storybook live alongside the three apps.

Vendor onboarding
Vendor onboarding is a form problem and a trust problem at once: you’re asking a business for sensitive information before it has received any value back. Seven principles drove every decision:
- 01
Progressive disclosure
Never one 40-field form — steps small enough to feel manageable.
- 02
Ask only when needed
Compliance documents come after categories, so vendors see only what applies.
- 03
Save and resume
Every step autosaves; losing progress is the fastest way to lose a vendor.
- 04
Validate inline, early
Catch a malformed EIN on blur, not at final submit.
- 05
Say what happens next
A visible stepper and honest review timelines cut anxiety and support load.
- 06
Smart defaults
The invite pre-fills the email; the primary category pre-selects what they supply.
- 07
Two-sided by design
The admin review queue got as much design attention as the vendor wizard.
Eight steps, ordered on purpose
| STEP | COLLECTS | WHY HERE |
|---|---|---|
| 1 Company | Legal name, DBA, tax ID, primary category | Lowest friction; lets the system dedupe against existing vendors |
| 2 Contact | Primary contact person | Still low-sensitivity |
| 3 Address | Business location | Validated inline (5-digit ZIP) |
| 4 Payment | Payment terms, minimum order | Commercial context before compliance |
| 5 Categories | Product categories supplied | Drives every downstream conditional requirement |
| 6 Documents | Compliance uploads | Category-aware: only what applies |
| 7 Review | Everything, one page | A last check before committing |
| 8 Submit | Send for approval | One clear commit point |


A status machine with a third answer
draft ─submit─▶ submitted ─assign─▶ under_review
│
┌─────────────────────┼─────────────────────┐
▼ ▼ ▼
needs_info approved rejected
│ │
└─resubmit─▶ under_review ▶ promoted into live vendorsneeds_info is the key UX decision. Instead of a binary approve/reject, reviewers request changes to specific fields, and the vendor gets a targeted, resumable edit — not a full resubmission. It converts what would be a lost vendor (hard reject) or a data-integrity risk (soft approve) into a fix.


Products, once a vendor is live
- 01
Bulk Excel upload
For full catalogs. Templates are personalised per vendor with their approved categories; errors are fixed inline in a preview table instead of forcing a re-upload.
- 02
Barcode
For the single new item, looked up against barcode databases so most fields fill themselves.
- 03
Manual entry
The fallback for products with no barcode match or fields automation can't fill.



Two journeys, one trust boundary
Onboarding reads as one flow, but it’s two: a vendor moving into self-service, and an admin protecting master data at the same moments. Mapping both side by side is what surfaces the core insight — self-service and data integrity were designed together, stage by stage.

| VENDOR STAGE | FEELING | MATCHING ADMIN STAGE | DESIGN RESPONSE |
|---|---|---|---|
| Invited | Cautious | Source & invite | Low-sensitivity profile step first |
| Onboarding | Effortful, guided | Review application | Category-conditional docs: reviewers see only what applies |
| Awaiting review | Anxious, in limbo | Decide | needs_info: fix only the flagged fields |
| Approved | Relieved | Manage live vendor | Staged edits, batched notifications |
| Ongoing use | Settled | Ongoing oversight | Same staging gate for every edit and product |
- Asymmetric low pointsThe vendor's worst moment is the wait; the admin's is the review queue one stage earlier. The progress stepper and batched, category-conditional queues were designed as a pair.
- needs_info at the hingeIt answers the vendor's worst stage and the admin's decision in the same beat.
- Trust changes shapeAt approval the relationship shifts from “prove you're legitimate” to “run your business here” — gatekeeping becomes enabling on both sides.
How AI fit into the work
I used Claude in two modes of roughly equal weight: as a thinking partner to pressure-test decisions, and as an accelerant to turn agreed specs into schemas and code.
Thinking partner
- Scoping: magic-link only, images and multi-seat deferred — with second-order effects surfaced first
- Domain modeling that led to the staging-and-approval pattern
- Asked to argue for alternative step orders so I could stress-test my own
Engineering accelerant
- SQL schemas drafted straight from the UX flows, keeping data and steps in lockstep
- Grounded in the real repo, not a hypothetical one
- Specs kept as versioned markdown documents, edited surgically rather than regenerated
- The SagUI rebuild done with agents following SagUI's own rules and MCP server
Every architectural call, scoping tradeoff and sequencing decision was mine. AI compressed the distance between a decision and a build-ready artifact; it didn’t make the decisions.
Where it stands
WORKING
- Admin console: dashboard, stores, vendors, products, inventory, search
- Invite → 8-step onboarding → review queue → approve / needs info / reject
- Vendor portal: magic-link sign-in, catalog, add products by bulk, barcode or hand
- Vendor submissions queue in the admin console
- All three apps rebuilt on SagUI
DEFERRED
- Product images
- Multi-seat vendor accounts
- Self-service category expansion
- AI copilot UI