A Texas Hold’em table in progress with hole cards, community cards, the pot, and the active players’ action buttons.
A table in play, with the shared board, pot total, and per-player controls.

Overview Link to section: Overview

I built Poker With Your Friends as a real-time Texas Hold’em (poker with two private cards per player and five shared cards) table for two to six people. It is built for play money among friends: a host creates a room, shares an invite link, and everyone plays from the browser.

The game keeps a full table experience rather than a single heads-up (two-player) hand. Players can join with private invite links, watch as spectators, and continue through reconnect-safe rooms with session stats (statistics for the play session) and emoji reactions.

A Discord Activity (an app embedded in Discord) build lets the same game run inside a Discord server.

Table rules and play Link to section: Table rules and play

Dealing and betting Link to section: Dealing and betting

The server deals every hand and resolves all betting, from blinds (required bets before the cards are played) and turn order to side pots (separate pots for players eligible to win different amounts) when players are all-in (betting all their remaining chips) for different amounts.

The client renders the table, cards, chips, and action buttons, and sends player actions back to the server.

Saving and reconnecting Link to section: Saving and reconnecting

Rooms persist as JSON snapshots (saved room data in a structured text format), so a dropped connection or a server restart does not lose an in-progress game.

On a Railway (an application hosting platform) volume (persistent storage), the room state survives redeploys; the Docker image (a packaged application and its runtime) runs the same server with a single data file.

Practice bots Link to section: Practice bots

Five bot personalities (computer-controlled players) fill out a table when friends are not around:

  • Bold.
  • Steady.
  • Careful.
  • Tricky.
  • Loose.

Each style has its own tendencies for folding (leaving a hand), calling (matching a bet), bluffing (betting to suggest a stronger hand), and raising (increasing a bet), so a practice game plays differently depending on who is seated.

Discord Activity Link to section: Discord Activity

The game ships as a Discord Activity using the embedded-app SDK (software development kit for apps running inside Discord). A Discord application maps the game’s public hostname, and the activity reuses the same realtime server. The plain browser game keeps working when the Discord environment variables (runtime configuration values) are absent.

Architecture and testing Link to section: Architecture and testing

Client and server Link to section: Client and server

The client is React (a library for browser interfaces) and TypeScript (JavaScript with type checks) built with Vite (a development and build tool). The authoritative game server (the source of truth for game rules and state) is a single Node (a JavaScript runtime outside the browser) process that serves the client and hosts the WebSocket (a persistent two-way connection) rooms.

Deployment and checks Link to section: Deployment and checks

The Dockerfile (instructions for building the Docker image) plus a Railway service and custom domain are the deployment path, with anonymous beta funnel totals (aggregate counts through beta participation steps) available at the /metrics endpoint (a server address for requests).

The rules live in a shared game module with its own test file, and the server has a separate integration test (checking connected components together) that drives rooms, actions, and reconnection behavior over the network.

Current state Link to section: Current state

Poker With Your Friends is a private prototype. The repository is private and there is no public deployment, so the table is currently limited to local and self-hosted play. All play is for play money.