How timothylee58/bajet-buddy works
BajetBuddy is a Malaysian spending-intervention product: users evaluate a contemplated purchase against financial context, receive a behavioral verdict, and can follow up with tracking, advice, or rewards. The repository also documents receipt and voice capture, subscription detection, macroeconomic alerts, persona/gamification, and embedded lending and insurance. The graph preserves these branches; several are represented at their exact route or subsystem path because their implementation was not sampled. Dashed links indicate documented product flow or frontend/API integration whose call site was not shown.
Main entry points: check.py Check Endpoint · lending/services.py Lending Referrals · insurance/services.py Micro-insurance · (app) Web App
Components 25
User Experience
- Web App
apps/web/app/(app) - Purchase Check
apps/web/components/features/check/CheckScreen.tsx
Spending Intervention
- API Router
apps/api/app/main.py - Check Endpoint
apps/api/app/api/routes/check.py - Check Logic
apps/api/app/services/check_agent_service.py - Chat Check
apps/api/app/services/chat_check_service.py - Nudge Generator
apps/api/app/nudge_agent/service.py - Risk Scoring
apps/api/app/risk_engine
Financial Insights
- Receipt Capture
apps/api/app/services/ocr_service.py - Voice Entry
apps/api/app/services/voice_parse_service.py - Recurring Spend
apps/api/app/services/recurring_service.py - Macro Sentinel
apps/api/app/services/sentinel_service.py - Sentinel Engine
apps/web/lib/sentinel/engine.ts
Behavior & Rewards
- Persona Engine
apps/api/app/services/persona_service.py - FOMO Negotiator
apps/api/app/services/fomo_service.py - Spending Freeze
apps/api/app/services/freeze_service.py - Rewards & XP
apps/api/app/services/gamification_service.py - Pet Companion
apps/api/app/services/pet_companion_service.py - Agent Game Master
lib/agents/game-master.ts
Embedded Finance
- Lending Referrals
apps/api/app/lending/services.py - Loan Partner
apps/api/app/lending/partner_adapters/mock_cimb_adapter.py - Micro-insurance
apps/api/app/insurance/services.py - Insurance Partner
apps/api/app/insurance/partner_adapters/mock_etiqa_adapter.py - Supabase
apps/api/app/core/database.py
Other components
- User
Connections 24
- User → Web App: uses
- Web App → Purchase Check: opens check
- Purchase Check → Check Endpoint: submits purchase
- API Router → Check Endpoint: routes requests
apps/api/app/main.py - Check Endpoint → Check Logic: invokes
apps/api/app/api/routes/check.py - Check Endpoint → Chat Check: invokes
apps/api/app/api/routes/check.py - Check Logic → Nudge Generator: generates advice
- User → Receipt Capture: scans receipt
- User → Voice Entry: speaks expense
- User → Recurring Spend: reviews subscriptions
- User → Macro Sentinel: receives alerts
- Sentinel Engine → Macro Sentinel: models impact
- User → Persona Engine: gets persona
- User → FOMO Negotiator: negotiates purchase
- User → Spending Freeze: sets freeze
- User → Rewards & XP: earns rewards
- User → Pet Companion: uses companion
- User → Lending Referrals: seeks loan offer
- Lending Referrals → Loan Partner: requests offers
apps/api/app/lending/services.py - User → Micro-insurance: requests coverage
- Micro-insurance → Insurance Partner: requests quote
apps/api/app/insurance/services.py - Micro-insurance → Supabase: stores policies
apps/api/app/insurance/services.py - Lending Referrals → Supabase: persists applications
apps/api/app/lending/services.py - User → Agent Game Master: chats with