Inspiration

Every college student knows the monthly allowance cliff: money arrives on the 1st, disappears through dozens of frictionless UPI taps, late-night snacks, and social FOMO outings, and leaves you scrambling by the 22nd.

Traditional expense trackers don't solve this—they are financial autopsies that only report what you spent after the money is already gone. Decades of behavioral economics show that knowing basic arithmetic isn't enough when students face decision fatigue, hyperbolic discounting, and digital payment numbness. We built StopBucks to intervene before the impulse tap—translating 12 peer-reviewed behavioral finance studies into a calm, zero-guilt daily operating system for college and university students.

What it does

StopBucks replaces guilt-driven budgeting with six tightly integrated behavioral modules—accessible immediately via our Instant Guest Sandbox (preloaded with 30 days of realistic student data, zero signup required):

  • Daily Safe-to-Spend Runway (Mental Accounting): Grounded in Richard Thaler's Mental Accounting, StopBucks never misleads a student into thinking their full allowance is spendable. It automatically reserves unavoidable fixed bills (mess, hostel Wi-Fi, gym) and ring-fences Invest-in-Self capital (books, courses, fitness) first—so personal growth never shrinks your daily allowance:

$$\text{True Disposable Pool} = \text{Monthly Budget} - \text{Fixed Bills Reserved} - \text{Invest-in-Self Protected}$$

The remaining pool dynamically recalculates across the days left in the month, paired with an interactive Daily Burn vs. Linear Pace curve and a Behavioral Trigger Breakdown.

  • Pain-of-Paying Reframer: Grounded in Prelec & Loewenstein (1998), a global topbar toggle smoothly rolls every figure across the entire app between Currency (INR / HKD / USD), Work Hours (dividing cost by the student's hourly time value), and 4-Year Cost (showing graduation-day compounded opportunity cost at 8% p.a.: $\text{Amount} \times 1.08^4$).
  • Smart Quick Log: Natural-language expense entry powered by the Google Gemini API (e.g., "paid 220 for late night momos via upi"), extracting amount, payment mode, and psychological trigger automatically—with optimistic ledger updates and expandable inline context drawers.
  • Bias Radar & Privacy-First Weekly Coach: Four deterministic TypeScript detectors (0–100 scoring, zero AI hallucination) uncover why you spend: Present Bias / Late-Night Drift, Cashless Numbness, Early-Month Windfall Burn, and Social FOMO Ratio. Below it, our Gemini-powered Weekly Behavioral Coach generates one concrete, zero-guilt 3-day habit experiment using only aggregated bias scores and runway totals—raw personal transaction notes are never sent to the LLM.
  • 48-Hour Cool-Off Vault: Inspired by David Laibson's commitment-device research, students park impulse wants for 48 hours, preview their exact runway impact, and track Money Rescued once urgency fades. If they still choose to buy after cooling off, an atomic PostgreSQL RPC transitions the vault item and inserts the ledger transaction in a single database transaction.
  • Behavioral Dojo (12-Study Gamified Mastery Arena): A Duolingo-inspired 3-World × 9-Level interactive skill map with a 5-belt progression ladder, collectible mastery badges, synthesized Web Audio feedback, and a full 12-Study Research Library. Every level runs 5 interactive beats—including a Research Wager, an Interactive Model Lab, and a Live Wallet Mirror that runs the actual research paper directly against the student's own live transactions.

How we built it

  • Frontend & Motion: Built with Next.js (App Router), React, TypeScript, Tailwind CSS, and Framer Motion. We enforced strict fintech UI discipline: high-contrast light surfaces, 1px hairline borders, tabular-nums rolling odometer figures, layoutId sliding tab pills, and GPU-composited animations (transform and opacity only) respecting prefers-reduced-motion.
  • Pure Domain Engine: All financial and behavioral math lives in pure, framework-agnostic TypeScript modules under src/domain/ using integer minor-unit currency arithmetic (paise/cents) to eliminate floating-point rounding bugs.
  • Backend, Security & Persistence: Powered by Supabase (PostgreSQL + Magic Link Auth) with strict Row-Level Security (RLS) across 4 SQL migrations (profiles, transactions, vault_items, weekly_nudges, fixed_commitments, dojo_progress) and a SECURITY INVOKER PL/pgSQL RPC (resolve_vault_purchase) for atomic vault purchases.
  • AI & Audio: Google Gemini API via Next.js serverless routes for natural-language parsing and privacy-preserving weekly habit plans; procedural Web Audio API synthesis for zero-asset Dojo chimes and mastery audio.
  • Deployment & Testing: Deployed live on Vercel with a Vitest automated suite of 291/291 passing tests across 22 test files covering domain math, bias detectors, repositories, and Dojo arena flows.

Challenges we ran into

  • Keeping Financial Math Deterministic Alongside AI: LLMs are great at parsing messy student notes and framing empathetic experiments, but terrible at exact financial accounting. Separating all runway calculations and bias detectors into pure, unit-tested TypeScript while restricting Gemini strictly to parsing and aggregated coaching gave us reliability without sacrificing UX.
  • Eliminating Generic Template Feel Under Hackathon Time Pressure: Our initial dashboard looked too static and flat. Refactoring into a disciplined light-mode hierarchy with hairline borders, GPU-composited rolling odometers, smooth chart scrubbing, and tactile 3D Dojo nodes—without breaking a single test—required careful component isolation.
  • Preventing Race Conditions in Vault Purchases: Resolving a cooled-off item into an actual purchase touches both vault_items and transactions. Writing an atomic resolve_vault_purchase Postgres RPC guaranteed both tables succeed or roll back together while preserving the caller's RLS context.

Accomplishments that we're proud of

  • Grounding every single feature—and a 9-level interactive curriculum—in 12 peer-reviewed behavioral finance studies spanning nearly three decades (from Thaler 1999, Laibson 1997, and Prelec & Loewenstein 1998 to 2025–2026 studies on student financial stress and frictionless payments).
  • Shipping 291/291 passing automated tests with 0 TypeScript errors and 0 ESLint warnings in a full-stack production deployment.
  • Building a zero-signup Guest Sandbox and Live Wallet Mirror so judges and students can experience personalised behavioural insights within 5 seconds of opening the link.

What we learned

  • Behavioural design works best when it reduces friction for good habits (natural-language logging, ring-fenced self-investment) and adds tiny, respectful friction to impulse habits (48-hour vault, Work Hours & 4-Year Cost toggles).
  • Designing strict privacy boundaries—sending only aggregated numeric scores to an LLM instead of raw spending logs—actually produces sharper, more focused behavioural coaching.

What's next for StopBucks

  • Optional UPI / Bank SMS Auto-Categorization on mobile (Android/iOS PWA) so students can tag emotional triggers directly from a lightweight push notification.
  • Campus Peer Challenges & Accountability Circles inside Behavioural Dojo to combat Social FOMO with healthy shared streaks.
  • Expanded Research Worlds covering student loans, credit-card minimums, and early index-fund investing for graduating seniors.

Built With

Share this project:

Updates

Submission history