Office Bets

Fictional billions, real bragging rights

April 2026, Active billions.nbnstack.com

Overview

Office Bets is a scoreboard app for tracking fictional billion-dollar wagers between coworkers. High-stakes bets between people who will never actually pay out. Every bet has sides, a declared winner when it settles, and a running ledger of who is up or down across the full history of the bit.

It replaced a shared Excel workbook with a Power BI dashboard on top of it that had outgrown the joke. A live URL that everyone can pull up is easier to share, easier to update, and more satisfying to look at when someone loses a fictional billion dollars.

What It Does

  • Scoreboard: Running net totals for each player across all settled bets. At a glance, who is up the most billions and who owes the most.
  • Open bet ticker: Active bets with descriptions, players involved, and stakes. Everyone can see what is currently in play.
  • Charts: Visual breakdown of wins, losses, and net position per player across the full history.
  • Admin management: Password-protected UI for creating bets, assigning players and sides, and resolving settled bets with a winner.
  • Public read access: Anyone with the link can view the scoreboard and open bets without logging in. Writes require the admin session.

Stack

  • Backend: Node.js 25 with Express 4. Single entry point with all API routes and a shared PostgreSQL connection pool.
  • Database: PostgreSQL 16. Schema covers players, bets, bet sides, and admin accounts. Migrations run automatically on startup with no manual database management required.
  • Frontend: Vanilla HTML, CSS, and JavaScript. No frameworks, no bundler. Shared styles and utilities across the public scoreboard and admin views.
  • Auth: Session-based admin login with scrypt password hashing via Node's built-in crypto module.
  • Hosting: Docker on SourPatchNAS. App and database run as separate containers with a health check dependency. Publicly accessible at billions.nbnstack.com via Cloudflare tunnel.

Why Build It

The Excel version worked but required someone to open it, make updates, and share the file. The Power BI layer on top was overbuilt for a running office joke. A purpose-built app with a live URL is easier for everyone and more appropriate for something that exists purely for fun.

It was also a clean excuse to build something end-to-end with Node and a vanilla frontend, no abstraction layers, and run it as a real deployed service.