Sai Byrraju
< Back to projects

poker-nights

active

Tracks buy-ins and cash-outs for home games.

TypeScriptReact 19Next.js 16Tailwind v4Framer MotionSupabaseVercel

Why I built this

In our home poker games, one person is the banker. They handle all the money. Everyone sends their buy-ins to the banker, and at the end the banker figures out who gets paid what, then opens Venmo or Cash App and sends money one by one. Before this app, that meant notes, a calculator, and a lot of back and forth. I built this to make that whole process take about two minutes.

How it works

groups → sessions → transactions → settlements → payouts

Users create groups, bankers start sessions, add players, and record buy-ins. At the end, cash-out totals are used to compute settlements, check discrepancies, and generate a payout list. Each entry deep-links to Venmo or Cash App with the person and amount pre-filled. Supabase Postgres with RLS stores the data. Nine migrations cover atomic session creation, RLS recursion fixes, duplicate settlement prevention, and payment handles. Auth uses (auth) and (main) route groups. The active session UI uses optimistic insertion with a three-second undo window.

Decisions

Supabase over a custom backend

I wanted auth, RLS, and realtime for free. The app is session-based and write-heavy, and Supabase handles that without me running a server.

Banker-transfer concurrency protection

The write checks .eq("banker_id", currentUserId) so two people cannot act as banker simultaneously.

PWA with full Apple metadata

The app is used at poker tables, so it needs to work from the home screen without a browser bar.

Optimistic buy-in insertion with undo

Buy-ins appear immediately and write in the background; a three-second undo catches fat-finger entries.