NBA Trade Forcer
Describe a trade in plain English. Get a legally valid one back.
THE STORY
The 2023 NBA CBA dropped and suddenly nobody's trades worked anymore. Hard caps, aggregation bans, apron tiers — real complexity that ESPN's Trade Machine just bounces you off of with a red error screen and no explanation. I wanted to describe a trade in plain English and get back something that actually worked. Most fan trade tools treat salary matching as an afterthought. The CBA enforcement is the whole product here — the thing that makes every result you get back trustworthy.
KEY DECISIONS
Salary matching thresholds shift at $7.5M and $30M. First apron teams can't aggregate. Second apron teams have hard restrictions on virtually all exceptions. Every AI-generated trade passes through this engine — invalid trades are filtered out entirely, not surfaced with a warning.
Two modes: Override OFF returns only trades that pass CBA validation AND value parity checks — closer to what a real GM would accept. Override ON (default) returns all CBA-legal trades regardless of value balance, maximizing results for users who just need a legal path.
Most fans think in "what if," not TPE windows and player option clauses. The prompt is the entire UI — just describe what you want. Claude handles the translation to structured trade proposals.
A value parity filter using Ringer player rankings scores each trade leg and surfaces trades a real GM might consider. It's the layer between "this is legal" and "this could actually happen."
Vercel for the frontend, Render for FastAPI, Supabase for data. In-memory rate limiting (3 req/IP/min) controls Anthropic API costs without needing Redis. Total monthly cost: $0.
RESULT
Shipped a fully functional, publicly accessible web application at nba-trade-forcer.vercel.app. Built and validated a CBA compliance engine covering salary matching, apron restrictions, and aggregation rules. Running at $0/month with rate limiting to control AI costs.
STACK