Bankroll40 docs

Release spec v0.1.0: the ledger that runs your discipline

Version: 2 · 2026-10-02 · what ships first, what waits, and how we know it is done

v0.1.0 is the smallest version the owner can use for a real week at Okada and online, from the phone's browser, with the discipline running on its own. No native builds, no MCP, no voice memos yet. Those are v0.2.0 and v0.3.0 and are listed below so nothing is forgotten, only sequenced.

Platform web (Expo web target), installable to the home screenBackend Cloudflare Worker, D1, R2Users the owner and the Manila circleEstimate 24 to 30 h AI session time

Goal

A player logs every cash session and tournament in seconds, in any currency, and the app works out their stake, pauses the rebuy at the stop-loss and holds the next session through the cool-off without being asked. The owner's own Metro Poker Manila week, fifteen bullets and a Day 2, must fit without a workaround.

In v0.1.0

Area What ships Acceptance rows
Sign-in and setup Email magic link plus Google and Apple through better-auth; passkeys if better-auth's plugin works on the web target on day one, otherwise v0.2.0 . The eight-question sign-up and the suggested setup accepted in one tap A1 (web only), D12
Pots and money Pots per currency, deposits, withdrawals, transfers with stored FX, home-currency total, daily ECB rates by cron with manual override M1 to M5
Cash sessions Live session with timer, buy-ins, notes, end; past session form; online sessions with site, hands, tables; offline outbox for the live session S1, S2
The rules Default rule set per pot; stake suggestion with automatic move-down; the promotion bar on Home; stop-loss warn and pause with a typed note to continue; cool-off hold; rules edited cold only D1 to D5, D8, D10
Tournaments Events with bullets per flight, days played, bags, close with finish and cash; per-event ROI; open events shown as in play; re-entry cap with a typed note; monthly budget check; max buy-in today S3, S4, D6, D7, D11
Receipts Photo attached to a buy-in, cash-out, tournament day or transaction, resized and EXIF-stripped on the phone, uploaded straight to R2 with a signed URL; gallery on the session P1, P2, P3
Stats and export Hours, bb/h or bb/100, hourly, standard deviation, sessions won, by stake, venue, site and month; bankroll line; CSV export of everything A3
Profile Avatar, cover, handle, home currency, headline numbers P5 (private by default)
Screens The nine cash and tournament screens plus sign-up and setup, in both themes from the shared tokens ADR-0004
Delivery Everything through the pipeline from main; the owner logs a real session with the tunnel off and it syncs on leaving V1, V2, V3

Not in v0.1.0, and where it goes

Waits for What
v0.2.0 MCP endpoint with OAuth for claude.ai and personal tokens; voice memos with transcription; the journal timeline; weekly breaks-against-results report; pre-session check-in; receipt amount reading; share card
v0.3.0 Native iOS and Android builds through EAS; push notifications for cool-off and session cap; biometric lock; store listings
v0.4.0 Groups and shared venue lists; staking splits; CSV import from Poler and Poker Analytics; hand-history import

Build order

Worker API on D1Expo app, web targetVerifySchema, sign-inPots, FXSessions, rulesTournamentsReceipts to R2Nine screensoffline outboxStats, export, profileA real session at Okadav0.1.0 build orderOne merge request per box, tests included; main deploys after every merge.
Worker API on D1Expo app, web targetVerifySchema, sign-inPots, FXSessions, rulesTournamentsReceipts to R2Nine screensoffline outboxStats, export, profileA real session at Okadav0.1.0 build orderOne merge request per box, tests included; main deploys after every merge.
v0.1.0 build order — one merge request per box, each with its tests; the owner's real session at Okada is the last box and the exit criterion.

Interfaces fixed in this release

Interface Shape Why fixed now
Money integer minor units plus ISO 4217 code on every row; rates frozen per row Everything downstream reads it; changing it later rewrites history
Rules @bankroll40/rules pure functions with the default rule set; the same code runs on the phone and the Worker The engine must give one answer in both places
Schema @bankroll40/schema Drizzle tables as in the spec; migrations numbered and applied by the pipeline v0.2.0 adds columns, never renames
API /api/* JSON with the session cookie from better-auth; every write records its actor MCP in v0.2.0 reuses the same handlers behind the OAuth gate
Media media row per object, R2 key under the user's prefix, signed URLs Voice memos in v0.2.0 are another kind, nothing else changes

Done means

  1. Every acceptance row listed above is verified on the live web app, by the evidence named in the contract.
  2. The owner has logged one live cash session and one tournament event, including a bullet past the re-entry cap, from a phone at a venue.
  3. app carries a signed tag v0.1.0, the docs spec is bumped to reference it, and the tracking issue has an outcome note.