Inspiration

We've all been there: you see "Dinner with friends" on your calendar and think "I'll keep it cheap," then end up splitting a $120 bill. Budgeting apps tell you what you already spent, but nobody warns you what's coming. We wanted to flip that script: what if your calendar could predict your spending before it happens? And what if you could bet your friends you'd actually stick to your budget? That's BudgetBrawl — budgeting meets social accountability, powered by AI.

What it does

BudgetBrawl connects to your Google Calendar, scans your upcoming events, and uses AI to predict how much each one will cost you. Going to brunch? The AI knows that's a $30 hit. Concert on Friday? Expect $75. Then it gets competitive: challenge a friend to a virtual $5 bet on whether you'll stay under budget. If you do, you win the pot. If you don't, your friend takes it. It turns saving money into a social game with real stakes.

Key features:

  • Google Calendar sync with automatic event detection
  • AI-powered spending predictions per event (via Snowflake Cortex)
  • Friend system with challenge invitations
  • Virtual wallet with stake-locking and automated payouts
  • Win/loss tracking and per-friend stats
  • Interactive charts: prediction vs. actual spending, balance over time

How we built it

  • Backend: FastAPI (Python) with Snowflake as both the database and the AI layer — we use Snowflake Cortex's COMPLETE('mistral-large2', ...) to generate spending predictions directly where the data lives, no external LLM APIs needed
  • Frontend: React 18 + TypeScript + Vite, styled with a glassmorphism UI, animated page transitions, and Recharts for data visualization
  • Auth: Google OAuth for frictionless sign-in and calendar access
  • State machine: Challenges follow a full lifecycle — pending, active, pending report, resolved/auto-forfeited — with an APScheduler background job handling timeouts automatically

Challenges we ran into

  • Snowflake Cortex availability — Cortex LLM functions are only available in specific regions (us-west-2, us-east-1), which caught us off guard during initial setup
  • Snowflake column casing — Snowflake returns all column names in UPPERCASE, which caused silent bugs until we standardized every dict access to uppercase keys across the entire backend
  • TypeScript strict mode + dependency drift — Different team members got different recharts/framer-motion type definitions depending on when they ran npm install, causing builds to pass on one machine and fail on another. We learned the hard way why you commit your package-lock.json
  • Merge conflicts during rapid iteration — With multiple people pushing UI changes and feature branches simultaneously, we spent real time resolving conflicts cleanly without losing each other's work
  • Google OAuth token management — Storing and encrypting refresh tokens securely (Fernet encryption at rest) while keeping the UX seamless took careful coordination between the auth flow and calendar sync

Accomplishments that we're proud of

  • Snowflake as the full stack — Using Snowflake for storage and AI inference is unconventional, and it works. No separate LLM billing, no API key juggling, no extra infrastructure
  • The challenge state machine — A complete lifecycle with automatic forfeit handling, wallet transactions, and edge case coverage. It just works
  • The UI — Glassmorphism cards, rainbow gradient background, smooth page transitions — it looks polished for a hackathon project
  • Per-friend win/loss stats — You can see your record against each friend, adding a real competitive layer
  • End-to-end flow — From Google sign-in to calendar sync to AI prediction to friend challenge to payout — the full loop is wired up

What we learned

  • Snowflake Cortex is a legitimate option for AI-powered apps when your data is already in Snowflake — the latency is reasonable and the DX is surprisingly smooth
  • Lock files matter in team projects — one missing package-lock.json cost us hours of debugging "works on my machine" issues
  • Designing a state machine on paper first (pending → active → resolved) saves massive debugging time later
  • Google OAuth has a lot of moving parts (scopes, refresh tokens, redirect URIs, consent screens) — budget time for auth, always

What's next for Budget Brawl

  • Real bank integration — Connect to actual spending data (Plaid) so you don't have to self-report
  • Smarter predictions — Feed historical spending data back into Cortex to improve accuracy over time
  • Group challenges — Challenge multiple friends on the same event
  • Leaderboards — Weekly/monthly rankings among friend groups
  • Mobile app — React Native wrapper for on-the-go budget tracking
  • Notification system — Reminders when a challenge is about to expire or when a friend challenges you

Built With

Share this project:

Updates