Skip to content

guyromb/brokemode

Repository files navigation

BrokeMode

Emergency budgeting app that activates 'survival mode' when funds hit critical thresholds, locking non-essential spending and surfacing $1 meal plans with local free resources

Build Type Monetization Score License Top Pick

Built for: Individuals living paycheck-to-paycheck, gig workers, service industry employees, and those experiencing temporary financial distress who need emergency-level financial triage

πŸš€ Live Demo β€’ πŸ“¦ GitHub β€’ πŸ› Report Bug β€’ πŸ’‘ Request Feature


⚠️ What's Built vs What's Left

This MVP was autonomously generated by MVP Factory v11 using a free-tier AI API (NVIDIA / Kimi K2.5). Simple logic runs for real. Complex external dependencies are stubbed so the app always works.

What's real and working right now:

Layer What it does
βœ… Frontend UI Fully interactive β€” forms submit, responses render, auth guard works
βœ… Input validation Every API route checks required fields, returns 400 on bad input
βœ… Calculations & scoring Algorithms (risk scores, percentages, rankings, text analysis) run in pure TypeScript
βœ… Rule-based logic Classification, tier detection, flag rules β€” all real code
βœ… Auth flow Email+password client validation β†’ localStorage token β†’ dashboard guard

What's stubbed and why:

Feature Current State Why it's stubbed How to fix it
πŸ—„οΈ Database persistence In-memory arrays (resets on restart) No DB provisioned in free tier See Step 1 below
πŸ€– AI/LLM responses Hardcoded plausible strings NVIDIA free API has strict rate limits during bulk builds See Step 2 below
πŸ” Real authentication localStorage demo token No JWT/session infra provisioned See Step 3 below
πŸ“§ Email / notifications Logged + returns {sent: true} No email service configured See Step 4 below
πŸ’³ Payments Returns demo status Stripe not configured See Step 5 below

Step 1 β€” Add a real database (15 min setup)

# Option A: Supabase (Postgres, free tier)
npm install @supabase/supabase-js
# In each route: import { createClient } from '@supabase/supabase-js'
# Replace the mock array with: const { data } = await supabase.from('table').select()

# Option B: PlanetScale (MySQL, free tier)
npm install @planetscale/database

Look for // TODO: replace with DB comments in src/app/api/**/route.ts

Step 2 β€” Enable real AI responses

// In any API route, replace the hardcoded AI string with:
const res = await fetch('https://integrate.api.nvidia.com/v1/chat/completions', {
  method: 'POST',
  headers: { 'Authorization': `Bearer ${process.env.NVIDIA_API_KEY}`,
             'Content-Type': 'application/json' },
  body: JSON.stringify({
    model: 'moonshotai/kimi-k2.5',
    messages: [{ role: 'user', content: yourPrompt }],
    max_tokens: 1024
  })
});
const { choices } = await res.json();
return NextResponse.json({ result: choices[0].message.content });

Add NVIDIA_API_KEY=your_key to .env.local

Step 3 β€” Replace demo auth with real sessions (NextAuth.js)

npm install next-auth
# 1. Create src/app/api/auth/[...nextauth]/route.ts with your provider
# 2. Replace localStorage.setItem("auth_token",...) in auth/page.tsx with signIn()
# 3. Replace localStorage.getItem("auth_token") in dashboard/page.tsx with useSession()

Step 4 β€” Add email (Resend β€” free 3000 emails/mo)

npm install resend
# Replace the { sent: true } mock in notification routes with:
# await resend.emails.send({ from: 'you@domain.com', to: email, subject, html })

Step 5 β€” Add payments (Stripe)

npm install stripe @stripe/stripe-js
# Replace demo payment routes with real Stripe checkout sessions

All the UI is already wired up. Every form already calls the right API route. You only need to swap the stubbed returns for real implementations.


🎯 The Problem

Traditional budgeting apps shame users in poverty or ignore the reality of 'waiting for payday' survival scenarios where every cent and hour matters

  • ❌ Decision fatigue when choosing between food and gas
  • ❌ Overdraft fees cascading into debt spirals
  • ❌ Lack of knowledge about local emergency resources
  • ❌ Budgeting apps that assume stable income

✨ Features

πŸ”₯ Feature 1

Critical threshold 'Broke Mode' activation using Plaid webhooks that automatically categorizes transactions as 'essential' vs 'non-essential' and hides non-essential spending categories with visual lockout UI

⚑ Feature 2

Dynamic $1-2 meal plan generator using scraped local grocery prices from Kroger/Albertsons APIs with nutritional calculation and ingredient substitution logic for maximum calories per dollar

🎨 Feature 3

Real-time free resource mapper using Google Maps Places API to locate food banks, community fridges, and emergency shelters with walking/transit directions and operating hours validation

πŸ” Feature 4

Harsh spending lockout mechanism with 24-hour cooling-off period for non-essential purchases requiring manual override confirmation and emergency contact notification

πŸ“Š Feature 5

Payday countdown calculator with daily survival budget allocation algorithm that divides remaining funds by days until next deposit and suggests daily spending caps

πŸ€– Feature 6

Overdraft prediction engine using transaction pattern analysis to warn 48 hours before potential negative balance based on recurring bill schedules and current burn rate

πŸ”§ Implementation Guide

A step-by-step breakdown of how each feature is built. Use this as your dev roadmap.

πŸ”₯ 1. Critical threshold 'Broke Mode' activation using Plaid webhooks that automatically categorizes transactions as 'essential' vs 'non-essential' and hides non-essential spending categories with visual lockout UI

What it does: Critical threshold 'Broke Mode' activation using Plaid webhooks that automatically categorizes transactions as 'essential' vs 'non-essential' and hides non-essential spending categories with visual lockout UI

How to implement:

Step What to do
1. API Route Create src/app/api/critical-threshold-broke-mode-activation-using-plaid-webhooks-that-automatically-categorizes-transactions-as-essential-vs-non-essential-and-hides-non-essential-spending-categories-with-visual-lockout-ui/route.ts with a POST handler
2. Input Schema Accept { userId?, ...featureParams } in the request body
3. Server Logic Process the request, call external APIs if needed, return JSON
4. UI Component Create src/components/CriticalthresholdBrokeModeactivationusingPlaidwebhooksthatautomaticallycategorizestransactionsasessentialvsnonessentialandhidesnonessentialspendingcategorieswithvisuallockoutUISection.tsx
5. Wire up Call /api/critical-threshold-broke-mode-activation-using-plaid-webhooks-that-automatically-categorizes-transactions-as-essential-vs-non-essential-and-hides-non-essential-spending-categories-with-visual-lockout-ui from the component using fetch on form submit

Potential enhancements:

  • ⚑ Cache repeated lookups with unstable_cache or Redis
  • πŸ”’ Add rate limiting to /api/critical-threshold-broke-mode-activation-using-plaid-webhooks-that-automatically-categorizes-transactions-as-essential-vs-non-essential-and-hides-non-essential-spending-categories-with-visual-lockout-ui (e.g. Upstash Ratelimit)
  • πŸ“± Make the UI section responsive-first (mobile breakpoints)
  • πŸ“Š Log feature usage to analytics (Plausible / PostHog)
  • πŸ§ͺ Add an integration test for the API route

⚑ 2. Dynamic $1-2 meal plan generator using scraped local grocery prices from Kroger/Albertsons APIs with nutritional calculation and ingredient substitution logic for maximum calories per dollar

What it does: Dynamic $1-2 meal plan generator using scraped local grocery prices from Kroger/Albertsons APIs with nutritional calculation and ingredient substitution logic for maximum calories per dollar

How to implement:

Step What to do
1. API Route Create src/app/api/dynamic-1-2-meal-plan-generator-using-scraped-local-grocery-prices-from-kroger-albertsons-apis-with-nutritional-calculation-and-ingredient-substitution-logic-for-maximum-calories-per-dollar/route.ts with a POST handler
2. Input Schema Accept { userId?, ...featureParams } in the request body
3. Server Logic Process the request, call external APIs if needed, return JSON
4. UI Component Create src/components/Dynamic12mealplangeneratorusingscrapedlocalgrocerypricesfromKrogerAlbertsonsAPIswithnutritionalcalculationandingredientsubstitutionlogicformaximumcaloriesperdollarSection.tsx
5. Wire up Call /api/dynamic-1-2-meal-plan-generator-using-scraped-local-grocery-prices-from-kroger-albertsons-apis-with-nutritional-calculation-and-ingredient-substitution-logic-for-maximum-calories-per-dollar from the component using fetch on form submit

Potential enhancements:

  • ⚑ Cache repeated lookups with unstable_cache or Redis
  • πŸ”’ Add rate limiting to /api/dynamic-1-2-meal-plan-generator-using-scraped-local-grocery-prices-from-kroger-albertsons-apis-with-nutritional-calculation-and-ingredient-substitution-logic-for-maximum-calories-per-dollar (e.g. Upstash Ratelimit)
  • πŸ“± Make the UI section responsive-first (mobile breakpoints)
  • πŸ“Š Log feature usage to analytics (Plausible / PostHog)
  • πŸ§ͺ Add an integration test for the API route

🎨 3. Real-time free resource mapper using Google Maps Places API to locate food banks, community fridges, and emergency shelters with walking/transit directions and operating hours validation

What it does: Real-time free resource mapper using Google Maps Places API to locate food banks, community fridges, and emergency shelters with walking/transit directions and operating hours validation

How to implement:

Step What to do
1. API Route Create src/app/api/real-time-free-resource-mapper-using-google-maps-places-api-to-locate-food-banks-community-fridges-and-emergency-shelters-with-walking-transit-directions-and-operating-hours-validation/route.ts with a POST handler
2. Input Schema Accept { userId?, ...featureParams } in the request body
3. Server Logic Process the request, call external APIs if needed, return JSON
4. UI Component Create src/components/RealtimefreeresourcemapperusingGoogleMapsPlacesAPItolocatefoodbankscommunityfridgesandemergencyshelterswithwalkingtransitdirectionsandoperatinghoursvalidationSection.tsx
5. Wire up Call /api/real-time-free-resource-mapper-using-google-maps-places-api-to-locate-food-banks-community-fridges-and-emergency-shelters-with-walking-transit-directions-and-operating-hours-validation from the component using fetch on form submit

Potential enhancements:

  • ⚑ Cache repeated lookups with unstable_cache or Redis
  • πŸ”’ Add rate limiting to /api/real-time-free-resource-mapper-using-google-maps-places-api-to-locate-food-banks-community-fridges-and-emergency-shelters-with-walking-transit-directions-and-operating-hours-validation (e.g. Upstash Ratelimit)
  • πŸ“± Make the UI section responsive-first (mobile breakpoints)
  • πŸ“Š Log feature usage to analytics (Plausible / PostHog)
  • πŸ§ͺ Add an integration test for the API route

πŸ” 4. Harsh spending lockout mechanism with 24-hour cooling-off period for non-essential purchases requiring manual override confirmation and emergency contact notification

What it does: Harsh spending lockout mechanism with 24-hour cooling-off period for non-essential purchases requiring manual override confirmation and emergency contact notification

How to implement:

Step What to do
1. API Route Create src/app/api/harsh-spending-lockout-mechanism-with-24-hour-cooling-off-period-for-non-essential-purchases-requiring-manual-override-confirmation-and-emergency-contact-notification/route.ts with a POST handler
2. Input Schema Accept { userId?, ...featureParams } in the request body
3. Server Logic Process the request, call external APIs if needed, return JSON
4. UI Component Create src/components/Harshspendinglockoutmechanismwith24hourcoolingoffperiodfornonessentialpurchasesrequiringmanualoverrideconfirmationandemergencycontactnotificationSection.tsx
5. Wire up Call /api/harsh-spending-lockout-mechanism-with-24-hour-cooling-off-period-for-non-essential-purchases-requiring-manual-override-confirmation-and-emergency-contact-notification from the component using fetch on form submit

Potential enhancements:

  • ⚑ Cache repeated lookups with unstable_cache or Redis
  • πŸ”’ Add rate limiting to /api/harsh-spending-lockout-mechanism-with-24-hour-cooling-off-period-for-non-essential-purchases-requiring-manual-override-confirmation-and-emergency-contact-notification (e.g. Upstash Ratelimit)
  • πŸ“± Make the UI section responsive-first (mobile breakpoints)
  • πŸ“Š Log feature usage to analytics (Plausible / PostHog)
  • πŸ§ͺ Add an integration test for the API route

πŸ“Š 5. Payday countdown calculator with daily survival budget allocation algorithm that divides remaining funds by days until next deposit and suggests daily spending caps

What it does: Payday countdown calculator with daily survival budget allocation algorithm that divides remaining funds by days until next deposit and suggests daily spending caps

How to implement:

Step What to do
1. API Route Create src/app/api/payday-countdown-calculator-with-daily-survival-budget-allocation-algorithm-that-divides-remaining-funds-by-days-until-next-deposit-and-suggests-daily-spending-caps/route.ts with a POST handler
2. Input Schema Accept { userId?, ...featureParams } in the request body
3. Server Logic Process the request, call external APIs if needed, return JSON
4. UI Component Create src/components/PaydaycountdowncalculatorwithdailysurvivalbudgetallocationalgorithmthatdividesremainingfundsbydaysuntilnextdepositandsuggestsdailyspendingcapsSection.tsx
5. Wire up Call /api/payday-countdown-calculator-with-daily-survival-budget-allocation-algorithm-that-divides-remaining-funds-by-days-until-next-deposit-and-suggests-daily-spending-caps from the component using fetch on form submit

Potential enhancements:

  • ⚑ Cache repeated lookups with unstable_cache or Redis
  • πŸ”’ Add rate limiting to /api/payday-countdown-calculator-with-daily-survival-budget-allocation-algorithm-that-divides-remaining-funds-by-days-until-next-deposit-and-suggests-daily-spending-caps (e.g. Upstash Ratelimit)
  • πŸ“± Make the UI section responsive-first (mobile breakpoints)
  • πŸ“Š Log feature usage to analytics (Plausible / PostHog)
  • πŸ§ͺ Add an integration test for the API route

πŸ€– 6. Overdraft prediction engine using transaction pattern analysis to warn 48 hours before potential negative balance based on recurring bill schedules and current burn rate

What it does: Overdraft prediction engine using transaction pattern analysis to warn 48 hours before potential negative balance based on recurring bill schedules and current burn rate

How to implement:

Step What to do
1. API Route Create src/app/api/overdraft-prediction-engine-using-transaction-pattern-analysis-to-warn-48-hours-before-potential-negative-balance-based-on-recurring-bill-schedules-and-current-burn-rate/route.ts with a POST handler
2. Input Schema Accept { userId?, ...featureParams } in the request body
3. Server Logic Process the request, call external APIs if needed, return JSON
4. UI Component Create src/components/Overdraftpredictionengineusingtransactionpatternanalysistowarn48hoursbeforepotentialnegativebalancebasedonrecurringbillschedulesandcurrentburnrateSection.tsx
5. Wire up Call /api/overdraft-prediction-engine-using-transaction-pattern-analysis-to-warn-48-hours-before-potential-negative-balance-based-on-recurring-bill-schedules-and-current-burn-rate from the component using fetch on form submit

Potential enhancements:

  • ⚑ Cache repeated lookups with unstable_cache or Redis
  • πŸ”’ Add rate limiting to /api/overdraft-prediction-engine-using-transaction-pattern-analysis-to-warn-48-hours-before-potential-negative-balance-based-on-recurring-bill-schedules-and-current-burn-rate (e.g. Upstash Ratelimit)
  • πŸ“± Make the UI section responsive-first (mobile breakpoints)
  • πŸ“Š Log feature usage to analytics (Plausible / PostHog)
  • πŸ§ͺ Add an integration test for the API route

πŸ—οΈ How It Works

User Request
      β”‚
      β–Ό
  Next.js Edge ──► API Route ──► Business Logic ──► Data Store
      β”‚                               β”‚
  React UI ◄────────────────── Response / JSON
      β”‚
  Real-time UI Update

🎯 Who Is This For?

Attribute Details
Audience Individuals living paycheck-to-paycheck, gig workers, service industry employees, and those experiencing temporary financial distress who need emergency-level financial triage
Tech Level 🟑 Medium
Pain Level High
Motivations Survive until next paycheck without overdrafts β€’ Maintain dignity while accessing assistance
Price Willingness free-only

πŸ§ͺ Validation Results

MVP Factory Validation Report β€” 2026-03-02
═══════════════════════════════════════════════════════

βœ… PASS  Market Demand             β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘ 9/10
βœ… PASS  Competition Gap           β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘ 8/10
βœ… PASS  Technical Feasibility     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘ 7/10
βœ… PASS  Monetization Potential    β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘ 6/10
βœ… PASS  Audience Fit              β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘ 9/10

─────────────────────────────────────────────────────
         OVERALL SCORE  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘ 8/10
         VERDICT        🟒 BUILD β€” Strong market opportunity
         TESTS PASSED   5/5
═══════════════════════════════════════════════════════

Why this works: Exceptional social proof (1247 upvotes) validates severe pain point. Unique 'survival mode' angle with psychological guardrails differentiates from YNAB/Mint which optimize abundance, not scarcity. Technical complexity is manageable with Plaid integration. Monetization via ethical ads (credit unions, gov assistance) avoids extracting from the poor while maintaining accessibility. Massive TAM (78% of Americans live paycheck-to-paycheck).

Unique angle: πŸ’‘ Only budgeting app that treats extreme poverty as a temporary emergency state requiring 'triage mode' rather than shame, with harsh lockout mechanisms and local survival resource integration

Competitors analyzed: YNAB (You Need A Budget), Mint (Intuit Credit Karma), PocketGuard

πŸ› οΈ Tech Stack

Next.js 14 App Router + TypeScript + TailwindCSS + Lucide-react
Layer Technology Purpose
πŸ–₯️ Frontend Next.js 14 App Router React framework
🎨 Styling TailwindCSS Utility-first CSS
πŸ”— Backend Next.js API Routes Serverless endpoints
πŸ’Ύ Data Server-side logic Business processing
πŸš€ Deploy Vercel Edge deployment

πŸš€ Getting Started

Web App / SaaS

# Clone & install
git clone https://github.com/guyromb/brokemode.git
cd brokemode
npm install

# Start development
npm run dev
# β†’ http://localhost:3000

# Build for production
npm run build
npm start

Environment Variables (create .env.local)

# Add your keys here
NEXT_PUBLIC_APP_NAME=BrokeMode

πŸ“Š Market Opportunity

Signal Data
πŸ”΄ Problem Severity High
πŸ“ˆ Market Demand 9/10
πŸ† Competition Gap 8/10 β€” Blue ocean 🌊
πŸ’° Monetization 6/10
🎯 Model πŸ†“ Free with Google AdSense
πŸ“£ Source reddit community signal

🀝 Contributing

Contributions are welcome! Here's how:

  1. Fork the repo
  2. Create your branch: git checkout -b feature/amazing-feature
  3. Commit: git commit -m 'Add amazing feature'
  4. Push: git push origin feature/amazing-feature
  5. Open a Pull Request

πŸ“„ License

MIT License β€” see LICENSE for details.


Discovered from reddit Β· Built 2026-03-02 Β· Powered by MVP Factory v11

Autonomously researched, validated & generated β€” zero human code written

About

BrokeMode - Emergency budgeting app that activates 'survival mode' when funds hit critical thresholds, locking non-essential spending and surfacing $1 meal plans with local free resources

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors