Inspiration

It started with a conversation none of us expected to have.One of our teammates — a software engineer earning a decent salary — admitted he had been paying only the minimum on his credit card for eleven months straight. He knew exactly what he was doing wrong. He had three budgeting apps on his phone. He had watched YouTube videos about compound interest. He understood, mathematically, that at 36% annual interest his debt was growing faster than he was paying it down.He just couldn't make himself stop.That moment crystallized everything. The problem was never information. India's Gen Z has more access to financial education than any generation before them. Yet 66% are over-allocated to debt, and small loans going 90+ days overdue have hit 26%. The entire fintech industry responded by building prettier graphs of the same problem.

What it does

DebtDojo is an AI-powered commitment contract app built specifically for India's debt generation. The flow is simple and deliberately uncomfortable. You set a debt goal — pay off a specific amount, make zero new credit card charges this month, or bring your EMI ratio below 30% of income. You stake Dojo Coins on that goal, which are locked the moment you confirm. Then Sensei Roku, our AI coach, enters the picture. Roku is not a dashboard. He is a character — a wise, strict, occasionally dry red panda in a dojo kimono who carries an abacus and keeps a Debt Log of every financial mistake he has ever witnessed. He chats with you daily, reacts to your spending confessions, and gives you specific, actionable advice rather than generic encouragement. At the end of the period, you upload your bank statement PDF. Gemini 2.5 Flash reads the entire document, categorizes every transaction, and runs a balance consistency verification — mathematically walking through every row to confirm the running balance matches the transactions. Pass your goal and your stake returns with a bonus. Fail and it is donated to charity. Either way, the verdict is real, verifiable, and final.

How we built it

The stack came together around one constraint: everything had to feel production-grade, not like a hackathon prototype. We built on Next.js with the App Router, using Tailwind for styling across a UI we designed before writing a single line of backend code. Clerk handles authentication with Google and Apple sign-in, protecting all routes behind a middleware layer. The AI layer is entirely Gemini 2.5 Flash, doing three distinct jobs: powering Roku's conversational coaching with full chat history context, parsing bank statement PDFs as inline document data and extracting structured transaction JSON, and generating personalized financial insights based on the actual parsed data. Getting the balance consistency verification prompt right took four separate iterations — the model needed very explicit step-by-step instructions to reliably walk the running balance math row by row. For the stakes system we built on Solana devnet. An escrow keypair holds the user's stake from the moment they confirm a goal. On verdict, the escrow either returns funds to the user wallet or transfers to a charity wallet address — all verifiable on the Solana explorer. No intermediary, no trust required. Supabase stores goals and parsed statement data, linked to Clerk user IDs.

Challenges we ran into

The most unexpected technical wall was bs58 version 6 silently breaking keypair loading. The bs58.decode function moved to bs58.default.decode and our escrow wallet simply refused to initialize with no useful error message. The fix — switching entirely to Uint8Array.from(JSON.parse()) with array-format keys — took three hours to diagnose and thirty seconds to fix. Gemini 2.5 Flash started returning 503 overload errors mid-build. We added exponential backoff retry logic and a silent fallback to Gemini 2.0 Flash, which stabilized everything. The hardest challenge was not technical at all. Making Roku feel like a genuine character rather than a chatbot with a custom system prompt required more iteration than any part of the codebase. The difference between an AI that gives good advice and one that people actually want to open every day is almost entirely in the personality design. We rewrote the system prompt seven times.

Accomplishments that we're proud of

Gemini reading a real bank statement PDF, catching a deliberately tampered running balance, and returning a structured JSON verdict with the exact row discrepancy flagged — that moment in testing made the whole team stop and stare at the screen. The full loop working end to end: Clerk auth, goal creation, Solana stake lock, Roku chat, PDF parse, balance verification, verdict, insights — all in a single cohesive product that does not feel like five different integrations bolted together. And honestly, Roku himself. A red panda in a dojo kimono with a Debt Log is the kind of mascot that makes people remember the product a week later.

What we learned

Loss aversion is not just a psychology concept to cite in a pitch. It is a design principle that changes every decision — what you show first, what language you use, what the failure state looks and feels like. Building around it forced us to make choices that no budgeting app would make. We learned that prompt engineering for reliable structured JSON output from LLMs is genuinely its own discipline. Temperature, explicit output format instructions, step-by-step reasoning directives, and fallback parsing all matter more than we expected. Solana transaction building without smart contracts — using a server-controlled escrow keypair — is significantly more accessible than we assumed going in. The web3.js API is clean and the devnet tooling is excellent.

What's next for DEBT DOJO

The immediate next step is integrating India's RBI Account Aggregator framework — the regulated infrastructure that lets users share verified, cryptographically certified bank data with one-time consent. This eliminates the upload flow entirely and makes tampering technically impossible. Friend Duel Mode is already designed: two users, same goal, shared stake pool, winner takes 90% and the platform takes 10%. The social competition layer changes the retention curve entirely. On the infrastructure side, moving from Solana devnet to mainnet is a single environment variable change. The escrow architecture is already production-ready. The longer vision is expanding the commitment contract model beyond debt — savings goals, investment streaks, EMI-free months — and building Roku into a genuinely persistent financial companion who remembers your history, tracks your progress across goals, and gets harder on you as your Dojo Rank improves. DebtDojo started as a question about why smart people make bad financial decisions repeatedly. We think the answer is that consequences were always optional. We are making them mandatory.

Built With

Share this project:

Updates