Inspiration

Every film ends with credits. Software doesn't. My own app declares 28 open-source dependencies, written by people I have never met, and like almost every project it pays none of them.

The obvious fix is to split money across the dependency list. I measured what that does on my app, for a $25 budget. It sends $9.83 to packages my code never imports and $20.54 to code that never reaches a user. The package my code imports most is the test runner, 64 times, every one of them in a test. And the person who wrote 89% of zod, the library that validates my app's data, gets 79 cents.

I wanted something that reads what the code actually does, and gets money to the people carrying it, above all the ones nobody else is paying.

What it does

Paste a public GitHub repository (JavaScript or TypeScript for now). Roll Credits:

  1. Reads the code. It fetches package.json, reads up to 150 source files, and records every import of each dependency with its file and line, counting shipped code and tests separately. A package nothing imports earns nothing.
  2. Finds the people. It follows each package to its GitHub repository, reads who actually commits there (bots dropped), and notes whether one person carries it and whether it already takes funding.
  3. Favours whoever is alone. A package is lifted by up to 3× as its maintenance concentrates on one person.
  4. Asks an AI agent. The agent reads the real import sites and judges how load-bearing each package is in this codebase, not by reputation. It can scale a weight between half and double. It never sees or sets an amount.
  5. Splits the budget. Plain code turns weights into integer cents that always sum to exactly what PayPal captured. A person is paid once, however many packages they maintain.
  6. Pays them through PayPal. You approve one PayPal payment. The server confirms the capture with PayPal, then sends a Payouts batch.
  7. Rolls the credits. Each name lights up as PayPal reports its payout as SUCCESS. A maintainer with no PayPal account shows as Waiting to be claimed, because PayPal holds the money for them.

The same reading has two views. Credits makes the argument, with the line of code behind every amount. Ledger, built with AG Grid, is for whoever has to defend the spend: sort, filter, a total row that shows both splits coming to the same budget, a bar for what reading the code moved, each package's first use linked to its exact line on GitHub, and CSV export.

From a coding agent. Roll Credits is also an MCP server. Add its address to any MCP client, then ask "Who should this project credit?" or "Credit the maintainers this project depends on with $10." The agent gets a brief with the evidence and a PayPal approval link. A person approves in PayPal, PayPal returns them to Roll Credits, and the payouts go out and the credits roll. The agent proposes, a person approves, and code decides every amount.

What it found

On my own app, for a $25 budget:

Split by dependency list Roll Credits
Packages the code never imports $9.83 $0.00
The test runner (64 imports, all in tests) $0.89 $0.00
The person who wrote 89% of zod $0.79 $9.96

On Express's own repository, one person is the top contributor to 9 of the 12 packages its code uses, so the whole budget goes to that one person.

Who it's for

Teams and companies that want to give back to the open source they run on, but don't know where money would matter. And coding agents, which install packages all day and never see a sponsor button.

How it's different

Tools like GitHub Sponsors and thanks.dev settle how money moves once you know who to pay. Roll Credits answers the question before that: given this codebase, which people does it actually rest on, and which of them has nobody paying them? It reads call sites rather than a dependency list, separates people working alone from staffed teams, and attaches evidence to every amount.

How I built it

  • PayPal: the JS SDK v6 (createPayPalOneTimePaymentSession) for checkout. Orders v2 to create and capture, with the repository sealed into the order's custom_id, so nothing sent after approval can redirect the money. Payouts for the batch, with a batch id derived from the order, so a retry is refused instead of paying twice. Webhooks verified against PayPal's signature on the raw request body. Transaction Search to reconcile each payout by its transaction id. Sandbox only: the app cannot reach live PayPal.
  • AI: Groq, openai/gpt-oss-120b with strict JSON-schema output, falling back to openai/gpt-oss-20b when the larger model is at its rate limit. Every reply is validated, clamped and cached for a week. Code from public repositories is untrusted input, so evidence lines are cleaned, truncated and fenced in the prompt.
  • AG Grid Community for the ledger: grouped columns, a pinned total row, quick filter, custom cell renderers and CSV export, themed with the Theming API to match the page.
  • MCP: a stateless Streamable HTTP server with two tools, tested with the official MCP client SDK.
  • Stack: Next.js, TypeScript in strict mode, Zod and Vitest, deployed on Vercel. 359 tests. The code that decides money has 100% statement and branch coverage, enforced by the build, and survives 2,000 randomised splits on every run.

Challenges I ran into

  • One field name broke every payout. Payouts calls the currency currency, while Orders calls it currency_code. My mocks shared my misunderstanding, so they passed. A real sandbox payout caught it, and a regression test now pins it.
  • Naming nobody. The rules ask entrants to respect privacy and publicity rights, so no real maintainer appears. Everyone is shown under a generated film-credit name made with a keyed hash, so it can't be matched back to an account by hashing a public contributor list.
  • Rate limits. One reading uses about half of Groq's per-minute token budget for a model, so a second reading within a minute lost the agent. A second model with its own allowance, plus a week-long cache, fixed it, and the screen says plainly when the agent sat out.
  • Reporting lag. In the sandbox, a payout can take hours to appear in Transaction Search. The app says the reporting hasn't caught up, rather than reporting a disagreement.

Accomplishments I'm proud of

  • A complete path from a pasted URL to sandbox money arriving, in one page and one link.
  • The argument is measured, not asserted: the comparison with a dependency-list split is computed on every reading.
  • A coding agent can credit the people a project depends on, with a person approving every payment.

What I learned

  • Mocks only test what you already believe about an API. The real sandbox is the test that matters.
  • A dependency list says little about what a codebase rests on. Import sites say a lot.
  • Give the model language (what a package does here) and keep it away from arithmetic.

What's next for Roll Credits

  • More ecosystems, starting with Python and PyPI.
  • Monthly credits through PayPal Subscriptions, so the roll runs every month.
  • A way for maintainers to prove they own their GitHub account and add a PayPal address, so their real name can replace the generated one, with their consent.
  • A GitHub Action that rolls the credits on every release.

Built With

  • ag-grid
  • github-api
  • gpt-oss
  • groq
  • mcp
  • next.js
  • paypal
  • paypal-js-sdk
  • paypal-orders-api
  • paypal-payouts
  • paypal-transaction-search
  • paypal-webhooks
  • react
  • typescript
  • vercel
  • vitest
  • zod
Share this project:

Updates

Submission history