Skip to content

TPDL

A whole fantasy platform for one ten-team dynasty league, with its own projections and odds

TPDL, The People's Dynasty League, is a ten-team dynasty points league that runs on an app I built instead of a host site. It has live scoring, daily lineups, trades with pick protections and swap rights, a rookie lottery and live draft room, league chat and a commissioner's office. It is private to the league, installs as an app, and runs on free public data, most of it from ESPN.

Every projection in it starts from one house number. Rankings scale it for the time a player is expected to miss, and auto-set lineups and the matchup odds move it for the teammates missing that day.

Built with

  • Next.js 16
  • React 19
  • TypeScript
  • Tailwind v4
  • Supabase
  • ESPN API
  • Web Push
  • Vercel

TPDL is private to its ten teams. If you want a platform like it for your own league, with your rules and your scoring, email me.

The screens

Redrawn for this site from the real product, in its own type and colours, with sample data.

MatchupThe live head to head: both totals, each side's projected final and the chance of winning, with starters paired by lineup slot. Scores come from ESPN box scores every 20 seconds, and the win chance is a Student-t on the gap between the two projections.
StandingsEvery week counts twice, once against the opponent and once against the league median score. The top six make the playoffs and the top two seeds skip the first round. Trades can carry players, picks, pick protections and swap rights.
Daily lineupLineups are set by the day. Each row is one roster spot with the player's game and box score line, and one tap fills every slot with the highest projected players who have a game. Injured list and taxi squad players stay on the roster but do not score.
Rookie lotteryThe six teams that finish lowest enter a weighted draw for the top four picks, and the rest of the round follows the standings in reverse. The order is revealed from the last pick up, with each lottery team's odds at the first pick beside its name.
Player pageWhere a player ranks in the league's scoring, his fantasy points per game over the season, the last 30 days and the last five games, and every game with its box score line. The rest-of-season figure blends ESPN's projection with what he has done so far.
TPDLThe app icon and the league's name, set the way the app's own link card sets them.

Everything it does

102 features in 12 areas, written from the code.

Live matchup

The home tab: this week's head to head, scored while the games are on.

9 features

Starters paired by slot
Both lineups run side by side, point guard against point guard down to the three flex spots. Each cell shows the player's fantasy points, his game with its clock and NBA score, and his box score line once it is final.
Scores that keep themselves current
An open app refreshes every 20 seconds while a game is live and every 90 otherwise, and again when it returns to the foreground. New points flash green and a small plus figure rises beside the number.
Win chance
A bar splits the matchup between the two teams from their current points and what each still expects to score. It uses a Student-t distribution with five degrees of freedom, so a large lead reads as very likely but short of certain until the games are played.
Week projection
Each side's projected final is its points so far plus the expected points from every game its starters have left. A live game counts only its remaining share, and a blowout discounts starters who are likely done for the night.
League median
Every week is two results: the opponent, and the league's middle score. The card shows both teams against the median line, current or projected, and the League matchups view ranks every team against it.
Any day, any week, any game
A strip of the week's days shows both teams' points for each one and opens that day's lineups. A week picker lists every week with its dates and opponent, and any other matchup in the league opens the same way.
League matchups
One card per game this week with live totals, projected finals, games played and each side's win chance, yours first and outlined in green.
Numbers that pick up where you left off
Totals, bars and percentages start from the value this phone last showed and move to the current one. The last values are kept on the device for three days, so reopening the app does not count up from zero.
The edge cases of a game night
A player who fouls out or is ejected is marked while his game goes on. A healthy scratch reads DNP-CD, a two-week matchup over the All-Star break is explained in place, and a week with NBA Cup games still unscheduled says more games are coming.

Lineups and roster

Lineups are set by the day, and the app does as much of the routine work as a manager wants it to.

9 features

Daily lineups
Ten starting spots (five positions, a guard, a forward and three flex), a bench, two injured lists and a taxi squad. Tap a player's slot and every seat he can legally take lights up; tap one to move or swap.
Locks at tip-off
A player locks when his game starts. The lock follows the live feed or the scheduled tip time, whichever comes first, so it holds even when nobody has the app open to refresh the feed.
Auto-set
One button fills the lineup for a single day or the whole week from the projections. It seats the most restrictive positions first so a center never uses up a flex spot, then swaps in any benched player who beats a starter he can replace.
Morning auto-set
The commissioner can turn on a league-wide auto-set that runs each morning, with a switch per team. Locked players are never moved, and a manager who sets a lineup by hand takes his team off it.
Auto-sub
A manager can name a bench player as the backup for a starter who might sit. If the starter is ruled out before the backup's game tips, the backup takes the seat for that day and the manager is notified, whether or not the app is open.
Injured lists
The long-term list takes players out for seven days or three games or more, and a second list takes short absences. A healthy player left on either one locks the roster until he is moved: no adds, trades or lineup changes, and the Team page names him and the reason.
Taxi squad
Young players can sit on a taxi squad where they do not score. Eligibility is a league setting, by default fewer than three seasons of NBA experience, and a player past the limit has to come off.
Moves carry through the week
A change made on one day is applied to the later days of the week that were already set the same way. Days arranged differently are left alone, and editing a future day never alters today.
Averages on every row
The roster can show each player's day, or his averages for the season, the last 30 days, the last five games or last season, with the starters' total alongside.

Players and the wire

The free agent pool, and the rules around taking from it.

8 features

The whole pool
The list holds the 700 most rostered players, anyone trending outside that, and everyone on an NBA roster however few leagues have him, so a deep bench player who suddenly starts can be found and added.
Pick a day
Choosing today or one of the next six days narrows the list to players with a game that day and ranks them by that game's projection. Position filters and a free agents filter sit beside it.
Trending
Two sorts show who is being added and dropped across fantasy leagues, from ESPN's change in rostered share and Sleeper's add and drop counts for the last 24 hours.
One add flow
Add offers the first open spot the player can take: a lineup seat today, the bench, an injured list or the taxi squad. With no room it opens a drop sheet, and the add and drop go through together.
Weekly add limit
Each team gets a set number of adds per week, four by default. The count shows on the matchup and team screens and resets with each new fantasy week.
Rookie contracts
By default the first 20 picks of the latest rookie draft cannot be traded or dropped through week nine. Those players carry a lock tag wherever they appear, and the player page says when the contract ends.
Compare
Two players side by side, each stat as a mirrored bar scaled to the larger of the two values. Each player keeps one colour the whole way down, and there is no overall verdict.
Fantasy leaders
A podium and a ranked list of the top fantasy scorers by total or per game, for the season or the last 30 days. A ring chart splits one player's points by the league team that rostered him when he scored them, and what he scored unowned.

Player pages

9 features

Who he is
Team, position, age, height, weight and experience, the injury tag with ESPN's estimated return date, who rosters him, and tiles for his college or club, birthplace and draft slot.
Live card
While his game is on, a red-edged card carries the clock, the score, his fantasy points, his stat line and his shooting. It stays as a recap until the day turns over.
Fantasy points
His league rank by season total and per game, and his points per game over five windows: season, last 30 days, last five games, the rest-of-season projection and last season. The per-game rank needs at least half the games of the most-played player.
Per-game table
Fantasy points, minutes, seven counting stats and three shooting percentages for the season, the last 30 days and the last five games. Every finished season sits behind a toggle, with its totals coloured by percentile among that year's qualified players.
Game log
Every game with the result, the full line, makes and attempts from the field, from three and at the line, and a double-double or triple-double badge. Games he sat are listed with the reason.
Depth chart
His NBA team's projected starting five, which unfolds to the full chart with him marked.
Contract
His real NBA contract by season, with options and two-way deals, where this year's salary ranks among every contract on file, and his share of the salary cap.
History in the league
A dated timeline of every move he has made here: drafted, added, dropped, traded. A trade links to its trade tree.
News and actions
RotoWire updates and ESPN stories that mention him. The action buttons show only what applies right now: add, drop, propose a trade, show interest, or put him on the trade block with a note.

Standings, schedule, playoffs

7 features

Standings
Seed, record, games back and points for, with your row in green. A bye line and a playoff line are drawn into the table, and the desktop layout adds winning percentage, points against, differential and streak.
How standings work
A one-screen sheet explains the two results a week, the tiebreak on points for, games back, the playoff format and when the table updates.
Clinch marks
A letter after a team's name once it has locked the first seed, a bye or a playoff spot, or been eliminated. A possible tie on record always counts against clinched, because the tiebreak cannot be known ahead.
Schedule
Any week's games with their scores, and the median game beside them: every team's points against the league median, marked as a win or a loss.
Playoff bracket
One connected bracket: byes for the top two seeds, quarterfinals, reseeded semifinals, the final and a third-place game, with prizes shown where they are won. Before the playoffs it is drawn as a projection from today's standings and labelled that way.
Payouts and dues
The prize pool, how it splits between the payouts the league has set, and who has paid.
Key dates
The league's own dates and the NBA calendar on one timeline, from this season through the next tip-off.

Trades and picks

Dynasty trades carry more than players, so the builder handles picks, protections and swap rights.

9 features

Two-team builder
Players and picks from both rosters go into a deal with an optional message. An offer can be countered or edited in place, and a deal in progress survives a trip to a player's page and back.
Pick protections
The team a pick originally belongs to can protect it for the top one, three, four or six of its round. If it lands inside that range it stays home, and the picks list says ahead of time whether a protection would apply.
Swap rights
A team can grant the right to swap two picks of the same year and round. At the draft the holder takes the better of the pair.
Multi-team trades
Three or more teams, each asset with its own sender and receiver. Every team in the deal has to accept before anything moves.
Trade details
An offer opens to show who gets what, with each player's averages and the answer buttons. The open trade lives in the address, so Back returns to the same deal.
Trade block
Players and picks can be listed, players with a note. Other managers can make an offer from the listing or tap Show Interest, which notifies the owner.
Stepien rule
No team can go two drafts in a row without a first-round pick. A first that would break the rule is locked unless the same deal sends a first back, and the builder explains the lock.
Every pick, with where it is headed
A team's picks show their projected or official slot, the lottery chance for a first-rounder, any protection and whether it would apply, and who holds swap rights.
Deadline, and what happens on accept
Trades close at the league's deadline. A trade goes through when the last team accepts, players who already tipped off keep that day's points where they scored them, and the commissioner can reverse a deal.

Rookie lottery and draft

8 features

Draft hub
Before the lottery: every lottery team's chance at the first pick and at a top-four pick, and a table of its exact chance of landing each slot. A Simulate button runs one draw for fun and saves nothing.
Projected order
Every pick in the draft with its projected number and the team that ends up holding it once trades, protections and swap rights are applied.
The lottery
By default the six lowest finishers enter and four picks are drawn by weight; the rest of the round follows the standings in reverse. The commissioner runs it once, it cannot be re-rolled, and the order is revealed from the last pick up.
Live draft room
A board for all four rounds, the team on the clock with a countdown, and a Draft button on each prospect when it is your turn. Every pick is posted to league chat and the next team is notified.
Pick clock and auto-pick
The clock is two minutes by default. When it runs out the best available prospect by rank is taken automatically and marked as an auto pick.
Prospects
The class comes from ESPN's draft board once ESPN publishes it, and from NBA Draft Room's public big board before that. The commissioner can paste a ranked list or add one by hand, and those rows are kept and enriched.
From the draft to the roster
A drafted player goes to the taxi squad when there is room, and to the bench when there is not. A prospect who is not in the NBA player pool yet is linked when he appears, and his manager is told.
Mock draft and past drafts
The next class's board laid over the NBA's order by record, and every earlier league draft pick by pick with the player each one became.

Chat, messages and the live feed

8 features

League chat
Replies that quote what they answer, mentions with autocomplete on a team's handle or name, reactions on press and hold, GIF search, photos, and links that unfurl into cards.
Chat on every screen
Everywhere except the chat and direct message screens, chat rests as a bar above the tab bar with the latest message as a preview. Pulling it up opens the conversation over the page.
League events in the thread
Trades, adds, drops and trade block listings appear as compact cards between the messages, and draft picks and new members as one-line notes.
Announcements and polls
The commissioner can post an announcement, which is marked in the thread and sent as a push, and a poll with up to eight options and a closing time for the league to vote on.
Direct messages
One thread per pair of managers. Every two-team trade between them shows in that thread as a card, including when it is withdrawn, declined or accepted.
Live feed
Plays worth fantasy points as they happen, filtered to your team, your matchup or the whole league: who, what the play was and what it was worth, under the night's scores.
Down to the wire
At noon Eastern on a regular season week's last day, or an hour before an earlier tip, each matchup where the trailing team still has at least a 35% chance gets a card in chat with the score and win chance. The managers in those matchups get their own push, and the rest of the league is told which games are close.
Weekly recap
At 10am Eastern the morning after a week closes, one card sums it up: top scores, every result, the best players and single games, who beat their projection by the most, and the starters who played real minutes and still came up short.

History and reference

A record of the league's moves, and NBA reference pages beside it.

9 features

Transactions
Every move, newest first, filtered by kind and by team, and in League history by period. A pick that has been used shows the player it became.
Record book
League records such as the highest and lowest week, the biggest blowout, the closest win and the longest win streak, plus each franchise's overall record and a head-to-head grid.
League history
Nine tabs: a timeline, seasons, blockbuster trades, waiver gems, drafts, every trade, every move, teams and managers.
Trade trees
For any trade, everything each team got is followed forward: through later trades of the same asset, and from a pick to the player taken with it, until it is dropped or still held.
Manager stats
Leaderboards built from the raw transactions: who trades most, who works the wire, who holds on to the players they drafted, and which pairs of managers deal with each other most.
Manager pages
Another team's roster with a trade one tap away, how the roster is built, and a chart of age against production with every player drawn as his own face.
NBA standings and teams
NBA standings by league, conference and division, the playoff picture as it stands, and every team's depth chart.
Draft classes and origins
Every NBA draft since 2001 pick by pick, with how much of each class the league rosters. A second page groups active players by country, state, city, college or club.
News
A league-wide NBA news feed with the players in each story linked and tagged by who owns them.

Notifications

Push on the installed app, an inbox, and a switch for each of 18 kinds.

8 features

Per-type switches
Eighteen notification types in three groups, each with a line saying what it covers. The switches control push only: everything except chat, direct messages, tip-off reminders and big-night alerts is also kept in the inbox.
Inbox
Rows that arrived since the last visit are highlighted, and opening the inbox marks them read. On a desktop it is grouped by day with a filter by kind.
Injury calls
A manager is notified when one of his players is ruled out, listed doubtful or day-to-day, cleared, or changes NBA teams. The alerts come from ESPN's injury status and from the NBA's official injury report, which gives a specific call where ESPN says day-to-day.
Before first tip
Thirty minutes before the day's first game, every team gets a reminder to check its lineup, with a count of its players in action that day. It is sent once a day.
Lineup fixes
A morning nudge, sent only when a healthy bench player with a game could fill an open seat, replace a starter who cannot play, or out-project a starter by more than a point. Teams on auto-set are skipped.
Big nights
Live alerts for the players in your starting lineup, based on real stats rather than fantasy point thresholds, with something for scorers, big men, playmakers, defenders and role players. Each moment is sent once.
Trades, the draft and the league
Offers and replies, interest in your players, completed deals, adds and drops, mentions, lottery results, being on the clock, playoff rounds and the Monday result of your week.
Test and sound
A button sends a test notification to check the phone is set up, and in-app sounds can be turned off per device.

Commissioner office

Most of what the league can change about itself is changed in the app, by the commissioner.

9 features

League settings
Scoring for 15 stats, roster sizes, the weekly add limit, taxi eligibility, the median game, playoff teams and reseeding, the trade deadline, pick protections and swaps, lottery weights, buy-in and payouts.
Scoring that reaches back
Changing a scoring value re-scores every stored box score line and every past season's totals and ranks, and the save message reports how many lines were re-scored.
Season calendar
The weeks of the season, with their labels and dates, are editable.
Members and invites
Each team has its own invite link, with a share button, a QR code and a reset that makes a new link. A check-in list shows who has joined, installed the app and turned on notifications, with the people to chase at the top.
Fixing rosters
Edit any team's lineup, add, drop or move a player between teams, set a player's positions, move a draft pick, or change a team's add count. The commissioner follows every rule on his own team; the powers apply only from this screen.
Undoing things
Reverse a trade, which sends every asset back and tells the league, or undo an add or drop, which also stops it counting toward the week's adds. The commissioner can also reset a team's future lineups and override the score of a finalized matchup.
Pause
One switch stops every add, drop and trade league-wide. Lineups keep working.
Recap and notification previews
The weekly recap can be previewed and posted by hand. A second page lists every notification type, how many teams receive it and how each big-night alert reads on a lock screen.
Error codes
When an action fails unexpectedly the manager sees a short code. The commissioner's screen lists the most recent codes with the action that failed and the error message.

The app itself

An installed phone app first, with a desktop layout behind it.

9 features

Invite link sign-in
There are no passwords and no email. Opening a team's invite link signs that browser in and shows install steps written for the browser it opened in.
Installed app on a phone
On a phone the league is only the installed app: a phone browser is sent to the install page. Android gets a one-tap install and iPhone gets the Add to Home Screen steps.
Another device
The signed-in app can issue an eight-character code that signs in a computer or second phone. It works once, for ten minutes, and its alphabet leaves out the characters that are easy to misread.
Your devices
A list of everywhere the team is signed in. Any device can be removed, and it is signed out from its next request.
Updates with nothing to tap
A phone on an older version loads the new one when the app is opened, on the next page change, or after a few idle seconds. The idle reload waits while someone is typing or has a sheet open, and a toast says once that the app updated.
Native feel
Five bottom tabs with a sliding highlight that follows a finger dragged along the bar, swipes between tabs, pull to refresh, sheets that slide up, and sticky section headers. Only the content area scrolls.
Desktop layout
At 1024 pixels and wider the tabs become a sidebar, long pages split into two columns, sheets become centred dialogs, and Ctrl or Cmd K opens a search that jumps to any player or page.
Team identity
Each team has a name, a handle, one of 30 colours that stay unique across the league, and a photo with a pinch-to-zoom crop. The last six photos are kept to switch back to.
Share images
A link to the app unfurls into a league card. A team's invite link unfurls into its own card with the team's name and colour.

The math

The formulas are the ones the code runs, and each chart is computed from them.

  1. 01

    Project each player

    The house projection starts from ESPN's preseason number and hands weight to what the player has actually done. Recent games count more, with a half-life of 20 games. Each game is capped to a band around the projection that widens as games add up, so one 90-point night can't swing it but a real breakout comes through. A healthy scratch counts as three zero-point games.

    proj = w × form + (1 − w) × prior

    w = games / (games + 10)

    game weight = 0.5games ago / 20

    Share of the projection that comes from this season's games, by games played. Ten games is an even split.
  2. 02

    Price the week

    The matchup screen gives each side a live win chance from the points already scored plus the spread of what is left. That spread stacks three kinds of uncertainty: per-game noise of half a player's projection, the chance he sits a game (7% on any night, more with an injury tag), and a 15% error in the projections themselves, shared across the team.

    σ² = Σ (0.5 · proj)² · left + Σ exp² · q(1 − q) + (0.15 · remaining)²

    P(win) = T₅(lead / σ)

  3. 03

    Allow for blowups

    Fantasy weeks blow up and collapse more often than a bell curve allows, so the win chance uses a Student-t with five degrees of freedom instead of a normal. A team two standard deviations ahead reads as about 95% to win, not 98%: likely, not finished.

    Student-t, 5 dfNormal
    Win chance by lead, in standard deviations of the points still to play.
  4. 04

    Draw the lottery

    The rookie lottery draws four picks from six teams by weight, and the odds screen shows each team's exact chance at every pick. It works them out by walking every order the draws can fall in, not by simulating.

    RecordPick 1Pick 2Pick 3Pick 4Pick 5Pick 6
    Worst2423211813
    2nd24232118131
    3rd24232118121
    4th18192022183
    5th679144420
    6th4561075

    Percent. Blank means it cannot happen.

    Exact pick chances with the default weights of 24, 24, 24, 18, 6 and 4, worst record first.

Under the hood

The work nobody using it sees.

  1. 01

    Data from public endpoints

    There is no paid feed: ESPN's site API supplies the scoreboard, box scores, play-by-play, rosters and news, and its fantasy API supplies position eligibility, projections, injury status and rostered share. Sleeper's public API adds injury notes and add and drop counts, and only regular season games are ingested.

  2. 02

    One pull per 15 seconds, league-wide

    Every open app calls the same live route, so each job is claimed with a conditional update on a log row: the first caller moves the timestamp forward and the rest match nothing, which keeps ESPN to one fetch per 15 seconds however many phones are open. The same claim spaces out the schedule refresh (12 hours), the player pool (3 hours), news (2 hours) and week finalization (hourly).

  3. 03

    Scoring with the app closed

    Scheduled jobs in Postgres (pg_cron with pg_net) call the app's routes over HTTP: the live route each minute while a game is in progress, the injury report every five minutes and a database health check every 15. Other jobs check a condition in SQL and call the app once it is met: the tip-off reminder, the noon close-call post, the 10am recap, and the minutes around a tip that has an auto-sub waiting.

  4. 04

    The morning job

    One daily job refreshes the player pool and injury status, syncs draft prospects for this class and the next, links drafted prospects who have reached the NBA, pulls news, syncs the schedule five weeks ahead, finalizes finished weeks, advances the playoff bracket, archives a finished season, runs the league-wide auto-set and sends lineup nudges.

  5. 05

    Ingest that is safe to repeat

    The ingest skips games that have not tipped and finals already stored, treats a game as done only once its final box score is saved, and records every change in a player's fantasy points as an event. Late games that run past midnight Eastern keep scoring on the day they started, and the morning job re-reads the last three days of finals before it closes a week, to pick up stat corrections.

  6. 06

    Re-scoring

    Scoring weights live in the league's settings, and stored lines hold raw stats. A change to the weights recomputes fantasy points for every stored line, then past seasons' totals and ranks, so stored history matches the current rules.

  7. 07

    House projection

    A player's expected points per game blend ESPN's projection with what he has done this season, with the projection counting as ten games, so real production carries half the weight after ten. Each game is capped to a band around the starting point that widens as games add up, recent games count more with a 20-game half-life, and a healthy scratch counts as three zero-point games.

  8. 08

    Week projection and win probability

    For each team the model sums expected points from every remaining starter game and a variance for them: per-game noise at half the projection, a 7% chance a player sits a game that has not tipped (more when the NBA lists him probable, questionable or doubtful), and a shared 15% projection error. The win chance is the Student-t probability that one team's projected final beats the other's.

  9. 09

    Lottery odds and the draft clock

    The draw is weighted sampling without replacement over the league's weights, and the hub's table of each team's chance at each pick is exact: a recursion walks every possible sequence of draws and sums the probabilities. The pick clock is a timestamp in the database, checked by the live route and the draft page, and once it has passed the server takes the best available prospect by rank and starts the next clock.

  10. 10

    Trades in one transaction

    An offer is validated when proposed and again when accepted: ownership of every asset, the deadline, rookie contracts, roster locks, the Stepien rule, and the rules on protections and swaps. The move itself is a single Postgres function that locks the trade, re-checks each asset and each team's roster limit, and moves everything together or nothing at all.

  11. 11

    Protections and swaps resolved at the draft

    Who makes a pick is computed from its number: a protected pick that lands inside its range stays with the original team, then the holder of swap rights takes the better pick of the pair. One function does this for the draft board, the hub and every team's pick list, so they agree.

  12. 12

    League rules live on the server

    Lineup, roster, trade, draft and commissioner changes go through server actions (60 exported from one file), and each checks the rules itself: slot eligibility, locks, the add limit, injured list and taxi rules, the deadline, the pause switch. An unexpected failure is caught, logged with a short code and shown to the manager with that code.

  13. 13

    A lineup is a record of each day

    Lineups are stored per day, and a past day is read back as it was saved, so it does not change when a roster does. A starter traded after his game tipped stays in that day's lineup for the team he scored for.

  14. 14

    Auth without passwords

    The session is a cookie holding the team and a device session id, signed with HMAC-SHA256 and compared in constant time; each device has a row that can be revoked, and one-time device codes are stored only as a keyed hash. Row level security is on for every table, and all writes go through the server with the service key.

  15. 15

    The NBA injury report

    The app checks the NBA's official injury report, a PDF, and reads it only when a new one is out. It parses the text, matches rows to its players by name, and stores each call with the game date it applies to, so the call lapses once that game is played.

  16. 16

    Live plays from play-by-play

    The live feed turns ESPN's play-by-play into fantasy credits scored with the league's settings, with a made three and its assist as two credits on one play. Three nights of plays are kept, and the box scores stay the record.

  17. 17

    Push and the installed app

    Web push uses VAPID keys, sends to every device a team has registered and drops subscriptions that come back gone. The service worker handles push and notification taps and has no fetch handler, so page loads go straight to the network, and a version check keeps an old client from pulling new server data into old code.

  18. 18

    Built for small plans

    The app is set up for Vercel's Hobby plan and Supabase's smallest database: the big, slow-changing reads (every player row and the season views) are held in one copy per server and re-read only when a one-row stamp query says the data changed, or after 15 minutes. A health check times a small read and watches swap activity, and notifies the commissioner after two bad checks in a row.

  19. 19

    Checks instead of a test suite

    There is no unit test framework in the repo. A Playwright script, run after a production deploy, signs in as a manager, opens 13 pages read-only with server actions blocked, retries once after 30 seconds, and can put the previous deploy back if a page is broken; other scripts exercise lineup writes against a team and restore its rows, drive the manager actions against a local copy of the database, and audit saved lineups for illegal seats.

  20. 20

    A read-only API for FBI Basketball

    One versioned GET route exposes the league to FBI Basketball's tools, behind a bearer key compared in constant time. FBI never reads this database directly, so either side can change its internals.