Product · Online art auctions
Heirwell
EZCLOUD
- Stack
- Next.js 16
- React 19
- TypeScript
- TanStack Query
- Orval
- NestJS
- PostgreSQL
- Prisma
- Redis
- BullMQ
- Elasticsearch
- Stripe
Heirwell runs timed online sales for a US art dealer. Every lot has its own clock, bids arrive in real time, and the winner pays an invoice online. Owners can also offer works for sale.
The Challenge
The final seconds decide the sale. Bids flood in at once, a late bid extends the clock, and every visitor's clock is a little off. The result has to stay consistent under that load, while the site loads fast, ranks in search and looks like a premium auction house.
The Approach
- Bids in the closing seconds go through a Redis lock and a Postgres transaction, so two bids can't both win. A late bid extends the lot, and when the timer ends the lot is re-read from the server.
- Contract-first API: Orval turns the OpenAPI spec into types, TanStack Query hooks, Zod schemas and MSW mocks. The frontend runs ahead of the backend, and a contract change shows up as a type error.
- Next.js Cache Components: server-rendered by default, with cached data and dynamic parts streamed through Suspense, so the first screen is fast and indexable.
- Lot catalogue imports of tens of thousands of rows are streamed and processed in BullMQ workers, so a large upload never runs the API out of memory.
- Stripe and PayPal webhooks pass through an idempotency table, so a duplicate webhook can't record a payment twice.
The Outcome
24
end-to-end specs on desktop Chrome and mobile Safari, each with accessibility checks
3
ways to pay (Stripe, PayPal, bank transfer), with webhooks that never record a payment twice