Bandogram
Paid shout-outs read over the PA at marching band competitions. Parents buy a short message from their phone, the host approves it and the announcer reads it between performances. The money goes straight to the host's own Stripe or Square account, and Goar Labs never touches it.
The problem
A marching band competition is a full stadium sitting through PA announcements between every performance. The boosters who host these events run on thin margins: concessions, programs and ads, all of which need inventory, volunteers or both.
A shout-out over the PA costs nothing to produce. "Good luck, Maya, from Mom and Dad" is pure margin for the band program. Nobody sold them because there was no way to take payment, check the message and get it into the announcer's hands during a fast-moving show. No off-the-shelf tool exists for this niche.
My role
Bandogram is a Goar Labs product, and I'm doing all of it: the product spec, the payment model, the Terms of Service and a written policy for showing minors' names, the visual identity, and the code.
I built it with Claude Code as a pair programmer, working from a written spec and a short list of hard rules the code isn't allowed to break. The foundation, both payment providers, the host admin dashboard and CI went from first commit to a merged branch in three days. Moving that fast only works if the rules are checks rather than intentions, which is most of what this case study is about.
Stack
App
App Router, strict TypeScript, one set of Zod schemas shared by the browser and the server.
Database and auth
Magic-link sign-in. Every table has row level security, and 9 migrations define the schema and its permissions.
Payments
Hosts connect their own account. Checkout is hosted by the provider, so card details never reach Bandogram.
Quality
173 tests, including a permissions suite run against a real database. Sentry scrubs messages and names before anything is sent.
Architecture
Host sales and Goar Labs' own billing live in separate modules that may not import from each other. A test fails the build if either one does. The order form, moderation and the announcer’s queue are the next part of the build.
Key features
- Two payment providers, one interfaceStripe and Square sit behind the same seven methods: connect, return, readiness, checkout, refund, webhook and disconnect. A parity test runs both through the same cases.
- A publish gate that checks the accountAn event can't go live until the host's account can actually take payments. The blockers are listed before the button, and the check runs again on the server at publish time.
- Tiers, not a priceEach event has tiers with their own price, character limit and queue placement, such as a standard shout-out and a capped spotlight.
- An admin dashboard built for one night a yearHosts touch it once a season, so problems show up where a host will notice them: an expired provider connection appears on the home screen, because the symptom is "sales stopped".
- Minors firstRecipients are mostly students. By default the public sees a first name and a section, never a full name next to a school.
- An audit trailEvery change, including each payment and refund the webhooks record, is written to an audit log with who did it, and why when it needs a reason.
Hard problems
Never touching the money, enforced by CI
If the money lands in the platform's account, the platform may be a money transmitter, owes identity checks on every host and eats the chargebacks. If it lands in the host's account, the platform is a software vendor. So Bandogram charges a flat fee per event and takes nothing from sales.
That decision is a CI check, not a promise. Any fee or fund-splitting field in the host-sales code fails the build. Writing the Square provider showed why the check has to be exact: the original test looked for app_fee_money, but the SDK spells it appFeeMoney. Bandogram also never requests the Square permission needed to split funds, so it can't take a cut, rather than merely choosing not to.
# Strip comments first: these fields are named in prose
# explaining why they must not be used.
if find lib/providers -name '*.ts' -print0 \
| xargs -0 -r perl -0pe 's{/\*.*?\*/}{}gs; s{//.*$}{}gm' \
| grep -nE 'application_fee_amount|applicationFeeAmount|app_fee_money|appFeeMoney|transfer_data|transferData|PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS'; then
echo "::error::A platform fee or fund-splitting field appears in lib/providers/."
exit 1
fiRow security doesn't protect columns
Published events have to be readable by anyone, because the order form is public. Row level security decides which rows someone can see, and says nothing about columns. A self-audit found that a signed-out stranger could read the announcer's access token for every published event, and that any member of a host's organization could read its Square tokens.
Both were reproduced against the database before fixing. The first fix silently did nothing: revoking one column only subtracts from a column grant, and these tables had table-level grants. Running the exploit again is the only reason that was caught. The working fix revokes the table and grants back only the safe columns.
revoke select, insert, update on events from anon, authenticated;
-- Everything the public form and the host console need.
-- Note the absentees.
grant select (
id, org_id, payment_acct_id, slug, name, event_date,
timezone, venue, opens_at, closes_at, status, …
) on events to anon, authenticated;A replayed webhook can't sell twice
Payment providers retry webhooks often and deliver them out of order. Two copies of the same event arriving together can both see "not processed yet" before either one finishes. So "already handled" has to be a fact in the database, not in memory.
The handler records the provider's event ID first, and a duplicate is acknowledged and dropped. A second unique constraint means one payment can only ever create one payment record, even if the first guard were bypassed.
create table provider_webhook_events (
id uuid primary key default gen_random_uuid(),
provider provider_type not null,
provider_event_id text not null,
event_type text not null,
received_at timestamptz not null default now(),
constraint provider_webhook_events_unique
unique (provider, provider_event_id)
);Tests that pass because nothing ran
The first real run of the permissions suite failed 11 of 31 tests. The policies were fine; the suite wasn't. The test users never got created, so every "can read your own data" test failed and every "can't read another host's data" test passed for the wrong reason. A security suite that fails open is worse than none, because it looks like proof.
Setup errors now stop the run. The suite signs each test user in once instead of on every test, so it stays under Supabase's sign-in rate limit, and it passed four consecutive clean runs before it counted.
Stripe changed under the plan
The spec assumed hosts would connect Stripe through OAuth. Stripe no longer offers that to new platforms, so onboarding moved to Stripe's newer account links. Before rebuilding it, I checked the money model in Stripe's test environment: the host still pays Stripe's fees, Stripe carries any negative balance and charges still go straight to the host.
One detail mattered more than the rest. The return from Stripe isn't signed, so Bandogram ignores what's in that URL and asks Stripe directly. Trusting an account ID from the URL would have let someone attach another organization's Stripe account to their own.
Results
The host side is built: sign-in, connecting Stripe or Square, creating events and tiers, the publish gate, refunds and the admin dashboard, with signature-checked, replay-safe webhooks underneath. Next are the screens parents and announcers use: the order form, moderation and the announcer's queue.
Bandogram is a small product with real consequences: other people's money, students' names and a live event that can't be paused while someone fixes a bug. It's the kind of work where I'd rather write the rule down, make the build enforce it, and then try to break it myself.
Building something that handles other people's money?
I design payments, permissions and audit trails that hold up, and prove it with tests.
Let's talk →