FlexRide Web
Web · 2026
A full-stack Next.js rebuild of a hackathon MVP, with real Stripe payments, NextAuth, an admin dashboard, and two production-grade race-condition fixes.
- Role
- Solo developer, rebuild
- Impact
- Found and fixed two race conditions that could double-charge or double-credit
Challenge
FlexRide began as a three-week hackathon app my team built with Express and Vite. It demoed well but had real bugs: any signed-in user could make themselves an admin, booking over a guest hold cancelled the hold and then rejected the booking anyway, and nothing stopped a payment being submitted twice.
Contribution
I rebuilt it on my own in Next.js 16 with NextAuth, MongoDB and Stripe, keeping the original Figma design. Instead of porting the old code, I worked the business rules out again and went through every path that touches money or permissions.
Outcome
It's live with guest bookings, Stripe test-mode checkout that holds a deposit and charges the rental separately, and an admin dashboard anyone can look around safely because every action is checked on the server. While reviewing it I found two check-then-write bugs, in checkout and in referral credits, and made both atomic.
Details
FlexRide started as a three-week hackathon MVP, with a React/Vite frontend and an Express/Node backend, built with a team to prove out a car rental concept fast.
This is a solo, ground-up rebuild in Next.js: same business domain, rewritten architecture, a much higher bar for correctness. The hackathon version demoed fine but carried real bugs, including an admin self-promotion endpoint, a reservation-override flow that could silently drop a booking, and payment logic with no protection against concurrent double-submits. Rather than port the old code, I re-derived the business logic and audited every security- and money-adjacent path.
Auth is NextAuth backed by MongoDB. Payments use a two-PaymentIntent Stripe pattern: a manual-capture deposit hold plus an auto-capture rental charge, with atomic findOneAndUpdate claims guarding checkout and referral-reward crediting against double-charge and double-credit race conditions. Found and fixed two of those race conditions in the live money-handling code.


Stack
Next.js · TypeScript · NextAuth · MongoDB · Stripe · TanStack Query



