Stack Society HUD
A complete analytics and study platform for a poker community.
Product screenshot. Displayed figures reflect the captured dataset.
Overview
I built StackHUD to connect a poker community’s game history: the sessions people played, the money that changed hands, and the decisions worth revisiting. It brings PokerNow exports into one product for exploring results, understanding player tendencies, and reviewing individual hands.
The result is a deployed platform spanning data collection, a normalized database, player profiles, financial reporting, an interactive replayer, and private study tools. I developed the product from the underlying poker semantics through the web experience, keeping the original records connected to the insights people see.
Project context and goals
Context
Poker and building software are two interests that came together in this project. Within a Discord poker community, each PokerNow session produced useful history: hands, wagers, player names, and a closing ledger. Much of that information remained separated by game, even when the same people played together repeatedly.
I wanted a place where players could move naturally between the big picture and the details. The dashboard introduces activity, results, and notable hands; the rest of the product helps answer what happened, how a player tends to play, and what deserves another look.
Inconsistent identities, actions, and financial records
The Problem
Combining exports meant resolving differences that could otherwise distort every chart. A person could appear under multiple identities, an action’s meaning depended on the preceding bets, and financial amounts needed consistent units. Even a familiar percentage could mislead if it counted the wrong opportunities.
I treated these as product requirements. Users needed a consistent history, statistics with understandable sample sizes, and a way to inspect the hands behind a result. Administrators needed review tools for ambiguity that could not safely be resolved automatically.
Preserve the evidence
Keep raw exports alongside the records and summaries derived from them.
Resolve player identities
Review aliases and PokerNow identities before combining a player’s history.
Report sample sizes
Pair statistics with their opportunities, reporting scope, and supporting hands.
Data ingestion and storage
Data foundation
The collection workflow begins with game links tracked in Discord and an acquisition queue. A TypeScript parser transforms hand-history JSON into games, hands, players, actions, cards, and pot awards. PostgreSQL stores these relationships through Prisma, while validation checks the imported records against their source files.
Two sources retain distinct responsibilities: hand histories describe the poker, and ledger exports describe session finances. Reviewed canonical identities connect both to the same player. Derived profiles and action-state snapshots then support a Fastify API and a Next.js interface, giving several product features a common foundation.
Data processing pipeline
- 01Collect
Game logs and settlement ledgers retain their source.
- 02Reconstruct
Parse hands, actions, seats, and street transitions.
- 03Reconcile
Resolve player identity and verify amount units.
- 04Explore
Serve profiles, statistics, replay, and study tools.
Raw evidence → normalized PostgreSQL records → API → Next.js interface
Applications, shared packages, and storage
Codebase architecture
The codebase separates collection, domain processing, API services, and the web application. The Discord bot records game links; the downloader retrieves source files; parsing and import scripts write structured records through shared database packages.
The Next.js interface requests poker data through a gateway to the Fastify API. Shared modules provide consistent statistics and player-analysis definitions. Private study notes follow a separate route to a user-specific store, so they remain separate from poker-data imports.
StackHUD codebase and data connections
How a game becomes structured data
apps/discord-bot1. Register a gameThe bot records a shared PokerNow game URL. A download queue tracks the source game so the same session can be collected and processed consistently.
workers/downloader2. Preserve the original exportsRetrieve hand-history JSON and ledger CSV. Keep the original files so a parsed hand or financial result can be checked against its source.
packages/pokernow-parser3a. Reconstruct the pokerTurn the log into seats, cards, streets, ordered actions, and pot awards. Interpret each action in the context of the preceding wagers.
packages/ledger-units3b. Reconcile the moneyRead buy-ins and cash-outs, normalize amount units, and preserve source rows. These records define session finances independently of the hand log.
packages/db · Prisma4. Store connected recordsPrisma writes the normalized records to PostgreSQL. Games connect to hands and actions; reviewed canonical players connect aliases, statistics, and financial results.
How a page retrieves its information
apps/web · Next.js5. Request a viewA profile, comparison, ranking, or replay requests the data needed for the selected player, hand, or reporting filters. Shared client hooks manage loading and cached responses.
/api/data6a. Forward poker-data requestsThe Next.js gateway forwards allowed requests to the API service. Filters travel with the request.
apps/api7. Query and calculateRead normalized records and return statistics, sample counts, player summaries, or the actions required to reconstruct a hand.
packages/dbShared poker recordsThe same PostgreSQL records power several views. A statistic and its supporting hands remain connected to the same source history.
/api/study6b. Load private study workResolve the signed-in user before reading or saving their review material.
packages/study-store.tsUser study storeA separate per-user JSON store keeps saved hands, notes, and review status out of the shared poker-data import path.
The collection path writes the poker database; the application path reads it. Study notes have a separate storage path tied to the signed-in user.
Player profiles and statistics
Player analysis
A player profile combines results, volume, playing tendencies, and identity history. General statistics provide an entry point, while detailed preflop and postflop views expose specific situations. The goal is to make a pattern explorable without requiring users to reconstruct it across separate game files.
Play-style analysis adds cumulative winnings, showdown and non-showdown results, rolling win rates, sizing patterns, and comparisons with the player pool. Opportunity counts give conditional statistics context. Changing a rolling window changes the recent-performance view while preserving the underlying cumulative totals.
View full size A player’s activity and key statistics in one view.
Compare player statistics and sample sizes
Player comparisons
The comparison panel supports selecting two to four players using names, aliases, or PokerNow identities. It places financial results, preflop tendencies, postflop tendencies, and playing volume side by side.
Conditional statistics include their numerators and opportunity counts. Sample-quality labels help distinguish supported patterns from limited evidence. Observed-pattern summaries and profile links provide a starting point for deeper analysis; comparisons should use matching games, stakes, and table sizes.
Rank players using explicit reporting criteria
Leaderboards
Leaderboards combine financial outcomes, volume, and playing statistics in a sortable table. Users can rank by net profit, BB per 100 hands, average profit per game, hands, games, or supported betting statistics.
Search, reporting-period, stake, minimum-hand, and confidence filters narrow the population before interpreting a ranking. Opportunity counts remain visible for conditional rates so a high percentage can be assessed alongside its underlying sample.
View full size Step through a real nine-player hand
Hand replay
Hand search connects broad questions to concrete examples. Players can look for situations and action sequences, then open the relevant hand rather than interpreting an aggregate in isolation. Evidence links can jump to the action that matters, including hands that would be missed by a biggest-pot view.
The replayer reconstructs the board, wagers, stacks, and action timeline as the hand unfolds. That presentation depends on the same contextual action semantics used by the statistics. Keeping those interpretations aligned makes the replay a useful way to inspect the analysis.
Try the actual replayer below with a recorded single-board hand. Nine players are seated, five put money in voluntarily before the flop, and two continue to a showdown worth $8,083. Pocket jacks make four of a kind against a full house made with pocket aces.
Drag the timeline and select an action. Arrows step through the hand; double arrows jump to the start or showdown.
View full size Ledger reconciliation and financial reporting
Financial accounting
Financial reporting starts with ledger buy-ins and cash-outs. The import path normalizes amounts, retains source rows, and produces player results for each game. Those results feed the ledger, financial leaderboards, and longer-term player summaries.
Identity reconciliation matters here as much as it does for playing statistics: an alias should not split someone’s history, and a shared name should not combine different people. Reviewable mappings and accounting checks make those relationships explicit before they become lifetime totals.
Financial normalization and reconciliation
- 01Source amounts
Read each game's chip and currency context.
- 02Normalize units
Apply verified scale consistently to financial amounts.
- 03Reconcile
Check buy-ins, cash-outs, balances, and ledger totals.
- 04Review outcomes
Present session results with traceable evidence.
View full size Saved hands, practice, and equity analysis
Study workflow
My Study supports saving and reviewing decisions found during analysis. Players can save hands, write private notes, organize tags and filters, track review status, and export review packets. Practice asks users to record their reasoning before revealing the outcome, preserving the distinction between a good result and a good decision.
The equity workbench supports another kind of investigation: comparing weighted ranges with board cards, blockers, and dead cards. It reports exact or reproducibly sampled results where supported. Together, these tools turn an interesting hand into something the player can investigate and revisit.
View full size Product scope and results
Outcome
StackHUD is live, with a public dashboard and previews leading into member features. An inspected local corpus snapshot contained 339,635 hands; local validation recorded more than 5.7 million actions and 994 ledger imports. These describe the inspected dataset, not current live usage or a count of registered users.
The central achievement is the connection across the product: a session leads to a player, a statistic leads to supporting hands, and a replay leads to a saved review. Building that chain taught me to design data definitions and user interactions together. The interface is most useful when its explanations remain connected to evidence.

