# Poker With Your Friends

> A private-table Texas Hold’em game with invite links, spectators, practice bots, and a Discord Activity build.

Canonical page: [Poker With Your Friends](<https://devanmetz.com/portfolio/poker-with-friends/>)

Project date: Jul 2026

Updated: 2026-10-14

Category: Game development

Status: Private prototype

Tags: TypeScript, React, WebSockets, Multiplayer

- **My work:** Game rules, realtime server, and web client
- **Platform:** Browser · Discord Activity support
- **Table:** 2–6 players · invite links · practice bots

## In short

I built Poker With Your Friends as a real-time Texas Hold’em table for two to six people playing with play money. I support private invite links, spectators, practice bots, and reconnect-safe rooms so friends can keep a full table game going in the browser or a Discord Activity build.

![A Texas Hold’em table in progress with hole cards, community cards, the pot, and the active players’ action buttons.](<https://devanmetz.com/_astro/poker-with-friends.BXwKxhwR_ZuSYVa.webp>)

A table in play, with the shared board, pot total, and per-player controls.

## 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 

### 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 

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 

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 

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 

### 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 

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 

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.

## Build photos

![Illustrated cover artwork with five cartoon players seated around a poker table under a dark blue light.](<https://devanmetz.com/_astro/poker-artwork.B8V5Psiw_Z2cCNxF.webp>)

Storefront cover artwork for the game’s listing.

![Wide illustrated scene of cartoon characters playing poker, with emoji speech bubbles behind the table.](<https://devanmetz.com/_astro/poker-activity.BKlNETyi_1wdpmr.webp>)

Activity background artwork for the Discord embedded app.

## Related reading

- [Goop Troops](<https://devanmetz.com/portfolio/goop-troops/index.md>)
- [OpenRP](<https://devanmetz.com/portfolio/openrp/index.md>)
- [KICKR CORE 2 Hub](<https://devanmetz.com/portfolio/kickr-core-hub/index.md>)
