zsty.us

Before / After · Case Study

cbd.restaurant — Headless Hemp & THCa E-Commerce Rebuild

  • Hemp / CBD

Replaced a legacy BigCommerce storefront with a purpose-built Next.js headless e-commerce platform for hemp-derived CBD/THCa products. The rebuild emphasizes compliance-first design, dual-mode order fulfillment (card checkout for legal hemp/THCa; pay-on-delivery for future marijuana SKUs), real-time inventory, and multi-channel customer notifications (email/SMS/web-push). Achieves feature parity with BigCommerce while reducing compliance surface and enabling direct control over payment, fulfillment, and customer journeys.

Cannabis, served fresh. A short menu, done well.
🔒https://new.cbd.restaurant
jackiej.events — modern site

Receipts — measured

Numbers that moved.

1channels (email→email/SMS/push)
Notification Channels
was 1channels (email→email/SMS/push)
4tables (order/customer/notification domain)
Database Tables
was 4tables (order/customer/notification domain)
3server actions (inventory/order/returns)
Admin Functions
was 3server actions (inventory/order/returns)
  • 50 products live (6 hemp + 44 THCa)
  • 7,228 lines of TypeScript code
  • 16 Postgres tables, dual-mode fulfillment logic
  • 3 notification channels (email/SMS/push)

The pixel diff

Overview, then the walkthrough.

Left: everything the legacy site shipped — frozen in place. Right: an auto-scrolling tour of the rebuild, from hero to booking. No slider to fight with.

Before — the overview
🔒https://cbd.restaurant
Before — the overview

This is everything the legacy site had to offer above the fold. No pricing, no calendar, no booking — the funnel ended at a mailto.

After — scroll through what shipped
🔒https://new.cbd.restaurant
After — scroll through what shipped

Auto-scrolls through the modern site so you can see the booking surface, the package grid, the pricing table, and the calendar inline — without leaving this page.

The four beats

Problem · Insight · Build · Outcome.

Scroll past the legacy frame. The four beats land in order. At the end, the modern site fades into the same window.

🔒https://cbd.restaurant
Legacy
Legacy constraint

BigCommerce hosted complexity

The legacy cbd.restaurant store lived on BigCommerce. While functional, it obscured hemp/THCa compliance rules, had no SMS capability (carrier-blocked anyway), and tied inventory/pricing to a third-party theme. Psilocybin products sat in the same catalog.

Insight

Hemp + marijuana are different checkout modes

Farm Bill hemp (≤0.3% Δ9) is shippable via card networks. True marijuana requires state licensing + cash-on-delivery. The legacy store conflated them. A headless rebuild could separate the paths at the database and checkout layer, reducing compliance surface.

Build

Next.js monolithic storefront + Neon

Shipped in 6 days (2026-06-06). Single Next.js app with Neon Postgres backend; no separate API layer. Clover hosted-fields integration (VAPID-safe, production-ready). Added guest accounts, wishlists, gift certificates, returns/RMA. SES + AlpineIQ for notifications. Caught dual-mode bugs (gift-card charge refs, oversell race) in QA; all fixed.

Live

Production at new.cbd.restaurant

50 products live (6 hemp CBD + 44 THCa concentrates/flowers). All checkout paths tested end-to-end. Clover payment capture controlled by admin (authorize-first to mitigate chargeback). Awaiting Brendon's first real card order to unlock production payment flow.

🔒https://new.cbd.restaurant
Modern

Architecture

One chain replaced by another. Receipts above.

Old stack
  • Hosted template
  • Third-party payment gateway
  • Limited automation
New stack
  • Custom checkout UX
  • Clover + fallback stub
  • 3-channel notify
  • Dual fulfillment modes

What changed

Grouped by what kind of system shipped.

Each claim ships with concrete evidence — env vars, table names, cadence chips. No marketing fluff.

Design

Dual-Mode Fulfillment

Compliance-first architecture enforces product-type rules at the server layer (not just UI). Orders with THC SKUs force cash-on-delivery, never touch Clover. Supports future state-licensed inventory without code changes.

Before
Single card-checkout path
After
Hemp/THCa→card+ship; Marijuana→pay-on-delivery
Retention

Multi-Channel Notifications

Customers receive order confirmations, shipment tracking, and status updates via preferred channel. AlpineIQ SMS ensures compliance (no carrier block on hemp/THCa). Web Push opted in per order for real-time delivery proof.

Before
Email only (BC transactional)
After
Email + SMS + Web Push
Agent backbone

Field Agent Attribution

Intro coupon 420GAL (42% off first $100) auto-tags orders with agent slug. Integrates with OG Life identity layer for cross-brand attribution. Supports future commission payouts.

Before
No referral tracking
After
Coupon codes + first-touch QR
Real-time push

Real-Time Inventory Admin

Add/edit/toggle products live. Stock decrements atomically in order transaction; oversell returns 409. Supports future per-size variants (schema extensible).

Before
BC product editor + manual sync
After
/admin/products CRUD + stock decrement

← All rebuilds

cbd.restaurant — Headless Hemp & THCa E-Commerce Rebuild — zsty.us