KakeiBuddy Software Documentation

1. Introduction

KakeiBuddy is a mobile budgeting companion designed to help users track spending, form budgeting habits, complete financial missions, and receive AI-assisted coaching suggestions. The system includes a mobile app, backend API, local and server-side persistence, optional research workflows, and an AI policy component.

2. Purpose

The purpose of this document is to describe the software at a level suitable for developers, project evaluators, and stakeholders. It summarizes the system goals, users, functional requirements, non-functional requirements, architecture, modules, data handling, and deployment approach.

3. Scope

KakeiBuddy supports:

The system does not currently provide bank account integration, multi-user household budgets, or full financial planning automation.

4. Intended Users

Primary users:

Secondary users:

5. Product Perspective

KakeiBuddy is a mobile-first application. It uses local SQLite for transaction-level user data and a FastAPI backend for shared challenge templates, accepted challenges, aggregate summaries, AI coaching, and optional research records.

Screenshot slot: KakeiBuddy main dashboard

6. Functional Requirements

6.1 Onboarding

6.2 Transaction Management

6.3 Budget Summaries

6.4 Challenges And Rewards

6.5 AI Coach

6.6 Notifications

6.7 Research Mode

7. Non-Functional Requirements

Usability

The app should provide simple budgeting workflows with clear navigation through Home, Expenses, Challenge, Coach, and Profile tabs.

Privacy

Transaction-level data should remain local-first. Research export should use anonymous and aggregate data only unless future requirements explicitly change this boundary.

Reliability

The backend should use database startup checks and seed required reference data. The coach endpoint should continue returning suggestions even when the AI model is unavailable.

Maintainability

The codebase should keep API routes, services, models, and schemas separated. Mobile API behavior should stay centralized in utility modules.

Portability

The mobile app should run in Expo-supported environments. The backend should run locally, in Docker, and on Render.

8. System Architecture

KakeiBuddy uses three primary components:

User
  -> Expo Mobile App
  -> Local SQLite
  -> FastAPI Backend
  -> SQLite or PostgreSQL
  -> AI Coach Policy or Fallback Rules

9. Module Description

Mobile App Module

Responsible for user interface, local data entry, charts, onboarding, notifications, privacy settings, and API calls.

Backend API Module

Responsible for user records, challenge templates, accepted challenges, summaries, coach suggestions, research data, and admin access.

Database Module

Responsible for local SQLite tables on mobile and SQLAlchemy-managed tables on the backend.

AI Coach Module

Responsible for converting normalized budget state into suggested budget adjustments.

Research Module

Responsible for consent, instruments, responses, reflections, events, progress snapshots, and protected export.

10. Data Handling

KakeiBuddy separates transaction-level data from aggregate and research-safe data. Mobile SQLite stores raw transactions. Backend APIs receive selected records such as summaries, challenge metrics, consent, research responses, and anonymous events.

Private Mode limits synced metrics. Sync Mode permits selected aggregate sync behavior.

11. External Interfaces

Mobile interface:

Backend interface:

Deployment interface:

12. Deployment

The backend can run locally through Python, through Docker Compose, or through Render. Render configuration is stored in render.yaml and includes a web service plus PostgreSQL database.

The mobile app runs through Expo during development. Production mobile builds should configure EXPO_PUBLIC_API_URL to the deployed backend.

13. Risks And Constraints

14. Future Improvements