Cielo Running
Founder, race director, and engineer
Own company
Payment, capacity, and bib numbers cannot disagree.
Cielo Running is my trail-race company in the Pacific Northwest. I direct Hyak Passage, a 25K trail race at Snoqualmie Pass, and built the platform that sells it: registration and checkout, coupons and add-ons, a scholarship program, volunteer signup, and race-week email.
- Next.js
- Convex
- Stripe
- Clerk
- Resend
What must never happen
- A race sells past its capacity.
- One payment becomes two registrations.
- A bib number is issued twice, even after a refund.
- A refund that arrives out of order changes what was already settled.
- A past order is repriced from today’s catalog.
What I decided
- One order, however the confirmation arrives
- Stripe’s webhook and the runner returning from checkout can confirm the same payment at the same moment. Both reconcile against a single order, and a repeated confirmation returns the registration that already exists.
- Capacity, registration, and bib commit together
- The capacity check, the registration, and the bib allocation run in the one database transaction that records the paid order, so they succeed or fail together.
- Guests buy first and claim later
- A runner can register without an account. The purchase belongs to the browser that made it, stored only as a hash, until a verified account with the same email claims it.
- Scholarships use the same path as purchases
- A scholarship with Oiselle covered 15 entries. Approving one creates a zero-dollar order through the same fulfillment code as a paid registration, so capacity, consent, and bib rules apply to every runner.
How I check it
The rules are named tests, such as “out-of-order refund events cannot reduce the cumulative amount or undo a full refund.” Every branch deploys to its own preview with an isolated backend and Stripe in test mode. I also direct the race, so a registration mistake is mine to fix at the start line.