Launch Check · Example
StudioBook: booking app for yoga studios
Built with Lovable, Supabase and Stripe. Reviewed: live app, repository, 14 migrations, 3 edge functions.
Summary
Not ready to launch yet, but close. Two critical issues let any visitor change other people's bookings and get classes without paying. Both are fixable in about a day. Everything else can follow after launch.
Findings
CriticalAnyone can edit or cancel any booking
Where: policy on bookings: FOR UPDATE USING (true)
Risk: one request from the browser console can cancel every booking in the studio.
Fix: USING (auth.uid() = user_id), plus a separate policy for studio admins checked in the database. About 1 hour.
CriticalFake payment events unlock paid classes
Where: edge function stripe-webhook reads the request body without verifying the Stripe signature.
Risk: anyone who finds the URL can mark a booking as paid.
Fix: verify with stripe.webhooks.constructEvent and the live webhook secret. About 2 hours including testing.
HighAdmin page protected only in the browser
Where: src/pages/Admin.tsx checks a role saved in localStorage.
Risk: changing one value in the browser shows every customer's name and phone number.
Fix: store roles in a table and enforce them in RLS. About 3 hours.
MediumDouble bookings on slow connections
Where: the Book button stays active while the request runs.
Fix: disable the button while saving and add a unique constraint on (class_id, user_id). About 1 hour.
MediumNo error monitoring
Failed payments and crashes go unnoticed until a customer complains. Fix: Sentry on frontend and edge functions. About 1 hour.
What's already good
- RLS is enabled on every table
- No secret keys in the frontend code
- Clean, readable structure that is easy to keep building on
Recommendation
Fix the two critical issues before launch (Fix Sprint, 5 working days, all critical and high items included). The medium items can follow in the first two weeks.