Skip to content
Barry Zhang, home
All work
Independent project · Nov 2026

Wine retail commerce and operations platform

Fine-wine retail has rules a generic store template does not handle: single bottles that must never oversell, age checks, shipping that depends on the state, wholesale buyers who need quotes and invoices, and customers who search in two languages.

Prototype source on GitHub
Role
Design and engineering
Context
Portfolio build modeled on a family-owned wine retailer's public catalog
Stack
Next.jsReactTypeScriptPostgreSQLPrismaDocker Compose
AI coding tools
CodexClaude CodeCursor
oversold: 12 simultaneous buyers for the last 2 bottles
0
charge for a payment submitted twice
1
tables in the PostgreSQL schema
41
products and 452 photos modeled
241

A portfolio build. Every figure here comes from test runs: payments and delivery are simulated, and the retailer is not named. The screens come from a separate interaction prototype with placeholder wines and a neutral look, so this page does not reproduce the retailer's catalog.

Data model
41 tables, 8 areas

Every table in the platform's PostgreSQL schema, grouped by what it is for. The number is the field count of the model.

Identity and access6
  • User9
  • Session10
  • Grant10
  • Organization12
  • OrgMember4
  • RateLimit3
Catalog5
  • Product12
  • Variant22
  • Collection4
  • CollectionMember4
  • Asset15
Inventory and allocations5
  • Lot12
  • StockMove11
  • Reservation6
  • Allocation13
  • Nomination9
Cart and checkout4
  • Cart7
  • CartLine6
  • Quote8
  • Attempt14
Orders and payments5
  • Order27
  • OrderLine20
  • Refund15
  • RefundAllocation9
  • SimReceipt7
Wholesale3
  • Rfq9
  • TradeQuote10
  • Invoice11
Fulfilment and service5
  • Shipment12
  • ShipmentItem7
  • Appointment11
  • Claim10
  • Ticket12
Operations8
  • Job12
  • Notification9
  • Event8
  • Setting3
  • Heartbeat3
  • Alert5
  • Newsletter4
  • RequestMetric5
01

The platform

I designed and built the full platform: a bilingual storefront, wholesale ordering, and owner, advisor, warehouse and support workspaces with role-based access on a 41-table PostgreSQL schema.

Support workspace in the interaction prototype, showing what the role cannot do
Staff workspaces: each role has its own boundaries
02

Correct under concurrency

Inventory and payments are the two places a store cannot be wrong. 12 simultaneous buyers for the last 2 bottles never oversold. A repeated payment charged once. A 133-request stress test hit 0 server errors.

Checkout of the interaction prototype, with a clock counting down the hold on the bottle
Checkout: the bottle is held on a visible clock
03

Real retail rules

The model covers 241 products and 452 photos, 21+ age checks and state shipping rules, wholesale quotes and invoices, tasting appointments and bilingual alias search.

Bottle page of the interaction prototype: one bottle left, three destinations and an age confirmation
Bottle page: stock, destination and age are settled before checkout
Wholesale quote in the interaction prototype, with trade prices and held stock
Wholesale: a quote that holds stock while the buyer decides
04

Packaging and design

It ships as a 7-service Docker Compose stack (web, worker, watchdog, PostgreSQL, mail, database UI, migrations) with health checks and a one-command, resettable demo.

The visual direction is a dark editorial 'private cellar' for a luxury catalog, with serif typography, an English and Chinese interface and layouts checked at 390 and 1440 px.

Try it

Open the interaction prototype

A clickable prototype with placeholder wines and a neutral look: the bottle page, the checkout hold, a wholesale quote and the staff roles. It runs in the browser and sends nothing anywhere.

Open the prototype