{"id":51633560,"url":"https://github.com/quarterback/caponomics","last_synced_at":"2026-07-13T11:02:10.847Z","repository":{"id":369482987,"uuid":"1289760519","full_name":"quarterback/caponomics","owner":"quarterback","description":"Salary Cap Imagineering","archived":false,"fork":false,"pushed_at":"2026-07-05T14:16:07.000Z","size":103,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-05T16:08:55.312Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/quarterback.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-07-05T07:01:28.000Z","updated_at":"2026-07-05T07:01:32.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/quarterback/caponomics","commit_stats":null,"previous_names":["quarterback/caponomics"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/quarterback/caponomics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quarterback%2Fcaponomics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quarterback%2Fcaponomics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quarterback%2Fcaponomics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quarterback%2Fcaponomics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quarterback","download_url":"https://codeload.github.com/quarterback/caponomics/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quarterback%2Fcaponomics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35420322,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-13T02:00:06.543Z","response_time":119,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-07-13T11:02:07.085Z","updated_at":"2026-07-13T11:02:10.836Z","avatar_url":"https://github.com/quarterback.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cap Buffet\n\n**Salary Cap Imagineering** — a sport-agnostic salary-cap *system constructor* and compliance\nchecker. Think \"the NBA Trade Machine, but for cap-*system construction*.\" Compose a cap system out\nof reusable mechanic modules (hard cap, aprons, luxury tax, floor, max-contract rules, exceptions,\nrevenue→cap formula…), load any roster, and see the cap sheet + whether it's legal and what\npenalties apply.\n\nBecause roster data and rulesets are fully decoupled, you can **mix and match across leagues** —\n*\"What would a second apron look like in the NFL? What if NBA teams had to use the hockey cap?\"* —\nand instantly find out.\n\n\u003e It's a **calculator, not a prescription.** It computes the *consequences* of whatever rules you\n\u003e invent and passes no judgment on whether a cap design is good or fair. Financials are arbitrary —\n\u003e set the cap to $40 if you want. A minor league, the A-League, the CFL, a fantasy league — any\n\u003e scale works.\n\n## Run it\n\n```bash\nnpm install\nnpm run dev        # dev server (Vite)\nnpm run build      # static build → dist/\nnpm run preview    # serve the built app\nnpm test           # engine unit tests (Vitest)\n```\n\nFully client-side (React + TypeScript + Vite). No backend — all cap math runs in the browser and it\ndeploys as a static site.\n\n## Deploy (Vercel / Netlify)\n\nIt's a static SPA, so hosting is zero-infrastructure. Config for both platforms is committed:\n\n- **Vercel** — Import the repo at [vercel.com/new](https://vercel.com/new). `vercel.json` sets the\n  Vite framework preset, `npm run build`, `dist/` output, and SPA fallback. Nothing to configure.\n- **Netlify** — \"Add new site → Import an existing project\" at\n  [app.netlify.com](https://app.netlify.com/start). `netlify.toml` sets the build command, publish\n  dir, Node version, and SPA redirect.\n\nEither platform auto-builds on every push to the branch. The build is portable (relative asset\npaths via `base: './'`), so it also works from a GitHub Pages project subpath if you'd rather host\nthere.\n\n## How it's built\n\nThe extensibility spine is a flat catalog of small **mechanic modules**, each keyed by a string\n`kind`. Inventing a mechanic = add one module + one catalog entry.\n\n- `src/engine/` — the pure, framework-free engine. `evaluateRuleset(league, ruleset) →\n  ComplianceReport`, run per team/year in three phases (environment → charge → validate).\n  - `module.ts` — the `CapModuleDef` interface + param schema (drives auto-generated forms).\n  - `catalog.ts` — `MODULE_CATALOG` / `MODULE_MAP` registry.\n  - `modules/` — one file per mechanic (`hardCap`, `luxuryTax`, `apron`, `maxContract`, …).\n  - `serialize.ts` — rulesets are plain JSON (save / load / share via URL hash).\n- `src/presets/` — the four majors plus MLS/NWSL/PWHL and a blank, each a `Ruleset` literal. The\n  fact that real leagues are *just presets* is the proof the generator is real.\n- `src/data/rosters/` — sample rosters (decoupled from rulesets; any roster runs against any system).\n- `src/ui/` — the React app shell (sidebar palette · workspace ruleset builder · compliance panel).\n\nThere's also a second surface built on the same spine: the **Expansion Draft** tab\n(`src/engine/expansion/`), a rules *constructor* for expansion-draft models. Compose protection\nschemes, exemptions, exposure minimums, selection limits, rounds, and financial windows from the\nsame kind of mix-and-match modules; load historical presets (NHL 2021, WNBA 2026 two-team, MLS,\nNBA 1988–2004, NFL 2002, MLB 1992/1997) or invent your own. It renders the model as a\nplain-language rulebook — with side-by-side comparison against any preset — and deliberately\nruns no \"who would get picked\" simulation. See `docs/expansion-draft-plan.md`.\n\n## Status\n\nMVP: **construct a cap system + check roster compliance**, plus the expansion-draft rules\nconstructor. A live trade/transaction sandbox, side-by-side system comparison, and the\ntransaction-derived modules (proration/dead money, buyouts, retention, exceptions) are\ndesigned-for but deferred. See `docs/mvp-plan.md`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquarterback%2Fcaponomics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquarterback%2Fcaponomics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquarterback%2Fcaponomics/lists"}