2025·Commerce platform·Live

Leo Hydra Studio

Production e-commerce platform I built and run end-to-end for a Dubai art studio. Drop weeks clear 40 to 50 orders a day. Each drop is six prints in editions of 50 (300 units) and sells out in 7 days. Dual-rail crypto and bank checkout, server-side Meta CAPI, three rounds of self-led adversarial security review.

Next.js 14·TypeScript·Postgres·Supabase·Resend·Vercel Cron·ethers.js·Meta CAPI·React Flow·Framer Motion·Tailwind CSS·Next.js 14·TypeScript·Postgres·Supabase·Resend·Vercel Cron·ethers.js·Meta CAPI·React Flow·Framer Motion·Tailwind CSS·

No template, no inherited codebase. The artist makes the work in Dubai. I design, code, and ship everything else from Mumbai. Live at leohydra.com.

Leo Hydra Studio homepage: large-format original on a luxurious interior wall, with the LEO HYDRA DUBAI · ORIGINAL WORKS · LIMITED EDITIONS positioning

Scale today

40 to 50
Orders / day in a drop week
rush concentrated across the six new prints
300
Prints per drop
6 designs, edition of 50 each, sold out inside 7 days
6
Originals sold to date
inquiry funnel, priced individually, about one a month
1
Engineer / operator
no team, no agency

Each drop is six new print designs, edition of 50 each, 300 prints in total. They clear inside 7 days of going live. Originals don't ship through this funnel at all: they're priced on inquiry, handled one at a time, and roughly one moves a month.

What I built

A production-grade Next.js 14 e-commerce platform that I architected and wrote from scratch:

  • Dual-rail checkout: USDT-on-Polygon (verified on-chain via ethers plus a Vercel Cron scanner walking USDT Transfer events every ~2 minutes) and bank transfer (admin manual confirm, UTR uniqueness enforced at the DB via partial unique index).
  • Micro-offset payment discriminator: every crypto order gets a unique 1 to 999 µUSDT offset added to its expected amount, enforced by a partial unique index on payments(expected_amount_micro) WHERE status='initiated'. Two pending orders with identical cart totals can never collide on-chain. Reserved and released by status-change triggers.
  • Race-locked payment confirmation: confirm_payment_atomic does SELECT … FOR UPDATE on the order row at the very top, then status-guarded UPDATEs to serialize against admin-cancel, auto-expire, and cron-expire (migration 031). Three cascading triggers on orders handle payment-row expiry, stock release, and micro-offset release in lockstep.
  • Transactional email pipeline: Resend-backed sends across six lifecycle email kinds (order confirmation, bank instructions, bank reference submitted, bank confirmed, order recovery, studio notifications). Every send writes a row to an append-only order_email_events audit table. Admin "Resend" UI is synced with the API route mapping so what's offered and what's sent stay in sync.
  • Meta Pixel + Conversions API across every conversion surface (checkout, inquiry / contact / project-request forms, newsletter, product pages, site-wide PageView), all dedup-aware via a shared eventID, PII hashed SHA-256 per Meta spec. Browser PageView uses navigator.sendBeacon with a fetch keepalive fallback.

One order, end to end

What it actually looks like when someone buys a print. A real $199 Chromatic print order, paid in USDT on Polygon, walked across every system I built. Auto-plays; hover to pause; click any step to jump.

Order lifecycle· 01 of 09
Product
01Product

Reader lands on the print page. $199, edition of 50, 29 remaining. Every state (preorder, available, fully collected) is its own variant of this same UI.

Swipe to navigate

Engineering scale

12
Postgres tables
orders hub + 4 standalone
30
Forward-only migrations
drift-checked vs pg_dump
22
API routes
26 pages · 50 components
11
Security commits
3 audit rounds, migrations 027 to 031

The full breakdown: 12 Postgres tables (orders, order_items, payments, bank_transfer_payments, crypto_payments, products, leads, newsletter_subscribers, order_email_events, payment_micro_reserved, order_scan_throttle, rate_limit_buckets). 30 forward-only migrations applied via Supabase SQL editor, with verified live-DB drift checks against nightly pg_dump backups. Three rounds of self-led adversarial code review hardened rate limiting, brute-force lockout, CSRF Origin checks, PII redaction, three isolated HMAC secrets, and CSP + security headers in next.config.js.

Mini Map

The actual database schema, interactive. Drag tables around, pinch or scroll to zoom, click the minimap to jump, hit "Reset layout" to restore. The seven FK relationships between orders, order_items, payments, crypto_payments, bank_transfer_payments, order_email_events, order_scan_throttle, and products are drawn as animated edges. The four standalone tables (leads, newsletter_subscribers, rate_limit_buckets, payment_micro_reserved) sit independently. They belong to inquiry, marketing, infrastructure, and crypto discriminator subsystems respectively. None of them need referential ties to the order graph.

A separate commerce model for originals

Original-artwork detail page (The Turn): acrylic-on-canvas spec, "AVAILABLE" status, certificate / signature / worldwide-delivery features, "Price: Available on inquiry", INQUIRE TO ACQUIRE CTA. A separate commerce model from the prints, unique pieces priced on inquiry, not point of sale.

Originals don't run through the checkout above. Unique pieces are priced on inquiry, captured into the leads table, and routed to the studio manually. Two commerce models, one codebase.

Arnav handles everything technical at Leo Hydra. Site, payments, emails, admin panel, the whole damn thing. We've been live and selling since October 2025 and I haven't touched a line of code. I make the work, he ships it.

Lev·Principal artist · Leo Hydra Studio·Dubai·@leeohydra

The non-code half

I run the Meta ad campaigns end to end. I work with printing houses on every limited-edition production run, coordinate fulfilment out of the Dubai warehouse, hire and direct video editors, handle sound design, and post across Behance, Tumblr, and Instagram.

Live at leohydra.com.

See it live

leohydra.com