The challenge
PokerNow makes it easy to host a home game, but what it leaves behind is a raw text log: hundreds of hands, a dozen players and a pile of IOUs at the end of the night.
Players wanted to know how everyone at their table really plays, review the hands that mattered and settle up fairly, without a solver, spreadsheets or setup.
The approach
An uploaded log runs through two parsers on an Express server. The first is a single-pass state machine that turns each line into hands, actions and money flow, then computes VPIP, PFR, 3-bet, showdown and aggression stats per player and per position. The second keeps every hand as an ordered list of events, so the replayer can rebuild the table one step at a time.
Claude sits on top as the paid layer. Each request carries a player’s stats plus the norms for the game actually played, so a 32% VPIP reads as loose in Hold’em and standard in Omaha. The model returns structured JSON that becomes scouting reports, street-by-street hand reviews and a session debrief.
- Player statsVPIP, PFR and 3-bet for everyone at the table, split by position, plus showdown and aggression numbers.
- Hand replayerStep through any hand with pot odds, stack-to-pot ratio, live equity and a quiz mode that hides the result.
- AI scouting reportsA written read on each opponent: style, strengths and the leaks that cost them chips.
- Ledger settle-upMerge duplicate names and settle the night in at most one fewer transfers than there are players.
From log to insight
- 01UploadThe PokerNow log, as exported
- 02ParseHands, actions, stacks, game type
- 03MeasureStats, equity and pot odds
- 04ExplainClaude reads and hand reviews
- 05SettleA short list of transfers
How it’s built
One React app, one Express API on Vercel and MongoDB for everything that persists. There is no queue or cache server: a log is parsed inside the upload request.
- 01React + Vite front endA single-page app with Context state. Guides, tools and FAQ pages are prerendered to static HTML at build time so search engines can read them.
- 02Express APIOne Node function serves the API, verifies a Firebase ID token on every protected route, and handles Stripe webhooks and a daily email cron.
- 03Log parsersUploads stay in memory with a 10 MB cap. A regex state machine builds the stats; a second pass stores up to 3,000 hands per log as event lists for the replayer.
- 04Equity engineA hand evaluator written from scratch runs in the browser. It enumerates every runout on the flop and turn, and uses a seeded Monte Carlo preflop so percentages never flicker between renders.
- 05Claude analysisAnthropic’s Messages API with JSON-schema output. Results are cached on the MongoDB document, and Pro access and daily limits are enforced on the server.
- 06MongoDB and StripeMongoose models hold users, analyses, hand histories, opponent profiles and ledgers. Stripe Checkout runs subscriptions, with a fallback that asks Stripe directly if a webhook is missed.
Technical decisions
- Profit from buy-ins, not pots
- Net result is cash-out minus buy-in, tracked from join, stack-edit and quit lines. A player who re-seats with chips is not charged a second buy-in.
- Game type by majority vote
- Every hand header names its variant and the most frequent one wins, with hole-card count as a fallback. A dealer’s-choice night still resolves to one game.
- Bets are street totals
- PokerNow logs “raises to 50” as a total, not chips added. The replayer takes each player’s highest bet per street, adds dead posts and subtracts uncalled bets to get the true pot.
- Omaha rules in the evaluator
- Omaha hands must use exactly two hole cards and three board cards, so equity is right for PLO and 5-card PLO. Hi-lo games show no equity rather than a wrong one.





