Product Architecture
A visual walkthrough of the core flows, rule engines and data domains that power the marketplace.
Customer
Seller
Admin
Cart
Order placed
Split into suborders
Seller fulfills
Delivered
A single customer order fans out into one suborder per seller. Each suborder has its own status, tracking code and shipping context — invisible to other sellers.
Rule resolution
function resolveCommission(seller, global):
if seller.commissionOverride != null:
return seller.commissionOverride
return global.marketplaceCommission
fee = suborder.total * rate / 100
earnings = suborder.total - feeApplied at settlement time
Only approved sellers can list products or receive orders. Blocked or rejected sellers keep their historical data.
Correios-ready integration
User ─┬─ Customer
├─ Seller ── Products (1..n)
└─ Admin
Order ── SubOrder (1..n) ── OrderItem (1..n) ─ Product
Order ── Customer
SubOrder ── Seller ── Settlement (1..n)
Consent ── User (versioned)
Notification ── audience[]Versioned consent
Every user carries a consentVersion stamp. When the policy version changes, users are re-prompted on next sign-in. Records are immutable and auditable.
Event → audience routing
seller.registeredadminseller.approvedsellerseller.rejectedsellerseller.blockedseller, adminorder.createdseller, adminorder.shippedcustomersettlement.paidsellerManual mark-as-paid workflow
Balances accrue automatically. Admins review outstanding amounts and mark settlements as paid once the bank transfer clears. Full history is preserved per seller.
© visionHub — architecture snapshot