Home  /  Case Studies  /  SundaySquares.org

SundaySquares.org: Charitable Football Raffles for Nonprofits

Role Founder / Solo Builder
Built With Claude
Year Jun 2026 – Present

A Thirty-Five-Year-Old Fundraiser, Run on Paper

A Knights of Columbus assembly near me has run a football raffle for more than 35 years. Each year about 200 paper booklets go out, each one a book of tickets. Every ticket lands on a 10×10 grid, every row and column gets a digit in a sealed draw, and at the end of each game the last digit of each team’s score picks the winning ticket. Then it repeats, every game, all season, from one ticket sold once.

The treasurer carries all of it: who sold which booklet, the draw, watching every game to find the winners, mailing checks, and the state’s raffle registration and annual report. California Penal Code §320.5 sets the terms. At least 90% of gross goes to charitable purposes, and raffle tickets cannot be sold online or by any electronic means. So the one thing this software must never do is digitize the sale. That constraint shaped every decision that followed.

Digitize Everything Around the Sale. Never the Sale.

SundaySquares is the treasurer’s back office, not a sales channel. Organizers create a raffle, print the booklets, and record in-person sales as volunteers make them. The platform runs the draw, syncs live scores, picks the winning tickets, and produces the report the treasurer needs. Patrons follow their tickets on a phone with nothing to download. No money moves through the platform, by design and by statute.

🎲
Provably Fair Draw
Row and column digits come from a committed, verifiable shuffle once the grid locks. The organizer cannot rig it, and patrons can check it.
🏈
Live Scores Pick Winners
Scores sync from the game feed. Winning tickets are determined automatically at the end of each game, all season, with notifications to patrons and organizers.
📋
Paper Tickets, Sold in Person
Printable booklets with QR codes, seller tracking, and offline payment recording (cash, check, or an in-person card reader). The sale itself stays where the law puts it.
📊
Treasurer’s Report
The 90/10 charitable split, prize schedule, and per-seller totals in one report, shaped around the state’s annual raffle filing.

Multi-Tenant, Real-Time, Gated by Tests

SundaySquares is a multi-tenant Next.js application with Supabase for Postgres, auth and realtime, Drizzle for schema and migrations, and hand-authored row-level security. It ships as a progressive web app so patrons never install anything. Every push runs the unit suite, a database harness that replays all migrations from scratch, and an end-to-end run before anything is promoted to production. The original online payment path was removed outright rather than left dormant, so the code cannot drift into the one thing the statute forbids.

Next.js 15 React 19 Supabase (Postgres, Auth, Realtime) Drizzle ORM Row-Level Security Tailwind 4 PWA GitHub Actions Vercel Claude Code
$0
Moves Through the Platform
90 / 10
Statutory Split, Built In
100
Tickets per Grid, All Season
2026
First Live Season

The most important product decision here was what not to build. Every comparable product monetizes the money flow. The statute made that decision for us, and the product is better for it: because the platform never touches a sale, nothing it does can put a council out of compliance. The harder call was the second one, removing the payment code entirely instead of leaving it switched off. Switched-off code gets switched back on eventually.

← Back to All Case Studies