Lior.
← All projects

PocketBluff AI

A free poker-learning product I co-founded and built: game-like lessons, GTO tools and hand review on the web, a weekly freeroll on a live table server, and an iPhone app.

Year
2026
Role
Co-founder and CTO
Stack
Python, FastAPI, PostgreSQL, TypeScript, React, Next.js, Expo, WebSockets, Docker, DigitalOcean
Links
Live ↗
The pocketbluff.com homepage, near-black with a rain of card glyphs and the headline "The future of poker is here"

Why

Poker study tools come in two kinds: solvers and chart libraries for people who already know what a range is, and video courses for everyone else. PocketBluff AI is the company I co-founded to put both in one place, free: lessons that play like a game, real hands from poker’s legends rebuilt as decisions you make yourself, and game-theory-optimal (GTO) tools that show the math behind every answer. I’m the CTO. I designed the system and wrote nearly all of the code, from the first commit on September 21, 2026 to the public launch in October.

What a player gets

An account is an email and a password, no card, and it opens the whole app at pocketbluff.com/app:

  • Learn. A course, Poker from Zero, of 81 lessons. The server builds every exercise: a visual (hands, a table, a spot, cards) and an input (a choice, a number, or painting a range onto the 13 by 13 hand grid). The device checks answers for instant feedback, but only the server’s grade counts, and finishing a lesson is idempotent, so a retried upload never counts twice. Streaks run on the device’s own time zone.
  • Legends. Hands from World Series of Poker champions, rebuilt as lessons: sit in their seat, make their decision, see what it teaches.
  • GTO tools. A range explorer over the 8-max charts, hand by hand, with the table, the moves and the ranges; a line view; preflop drills on the same charts.
  • Study. Type a hand in as text and each of your decisions is graded as you go. Preflop grades come straight from the charts. A postflop decision becomes a solve job that a worker picks up, and two players who typed the same spot share one solve. A leak report grows out of the hands you save.
  • Minigames, a leaderboard, equity and outs calculators, and a heads-up bot to play against.

The range explorer: button facing the lojack’s open at 100bb, the 13 by 13 strategy matrix in raise, call and fold colors, the table, and the breakdown for ace-queen suited

The charts, and keeping them

The preflop charts are ours. A CFR+ script solves 8-max preflop with an ante and a capped rake over an equity-realization model of the flop: preflop is played out exactly, every seat and every hand class with card removal between the two players who see the flop, and the pot that reaches the flop is split by a realized-equity formula, or by a realization table measured from flop solves. The flop library is about 52,000 solved trees, built with a vendored open-source solver and a commercial one on AWS spot instances.

None of it ships to a client. The web app, the iPhone app and the desktop app fetch one chart at a time with a bearer token, hold it in memory while its screen is open, and never write it to disk. The server budgets new reads per account and day: reading the same chart twice costs nothing, so relaunches and revisits never run an account dry, but a scraper needs new items and runs out of them. Reads are recorded inside the request’s own transaction, so a refused read is never counted.

The table server

The Tuesday Freeroll is a real tournament against real players, played in the browser. It runs on a table server I wrote as its own process: one asyncio loop holds every table in memory, each table’s commands run one at a time under its lock, its clock is a timer task, and after every change each connection gets its own view over a WebSocket, so a player sees only their own cards. Stacks go to Postgres off the loop. It has to be a separate process because the API runs as two load-balanced instances, and everyone at a table must reach the one process that holds it. A tournament director handles registration, late registration through level five, the blind schedule, moving players between tables as tables break, and the payout. Entry takes a verified phone, one account per number, and after the first event a ticket earned by inviting a friend.

The tournaments page: the Tuesday Freeroll card and the coming $5,000 series

The API and the site

The API is FastAPI on PostgreSQL 16: Argon2 passwords, short-lived JWT access tokens with refresh, Google sign-in verified against Google’s keys, a check against leaked-password lists, Cloudflare Turnstile on sign-up, and texted verification codes with a daily cap on the Twilio bill. Rate limits are counted in the database, so both instances share one count. Hand review’s parser is a grammar; prose it can’t read goes to a language model, under its own daily caps.

The marketing site is Next.js 16 on the App Router with Tailwind 4, Motion, Neon Postgres with Drizzle, Resend for mail and a per-request Content Security Policy with nonces. The build runs a claims checker that fails if any live page names a plan, a price or an unannounced date, then Playwright runs against the production build. Database migrations run at the end of every build under a Postgres advisory lock, so overlapping deploys take turns. The web app itself is the desktop study app’s own React screens, built for the web with Vite and served beside the site.

Running it

Everything is on DigitalOcean for about $200 a month: the API on App Platform as two instances with health checks and start-before-stop deploys, a managed Postgres with daily backups and seven-day point-in-time recovery, droplets for the table server and the solver worker, and a container registry and object storage for the solve library. One ship command does every push and deploy, holds a lock, keeps a log, and freezes deploys around the freeroll. CI runs on Linux on every push and nightly on a self-hosted macOS runner. A weekly off-site database dump and a secrets-rotation script round it out.

The iPhone app

A Duolingo-style client for the Learn API in Expo with Expo Router, dark by default with light mode in settings. It shows exactly what the server returns: no streaks or unlocks are computed on the device, and no chart is ever stored on it. Android will come from the same code.