Why I Built a Simple Spending Tracker
Building a Spending Tracker That Actually Changed My Habits
Most people don’t have a money problem.
They have a visibility problem.
I realized this when I couldn’t confidently answer a simple question:
“Where did my money go this month?”
As a heavy MPESA user living a nearly cashless life, my finances were a blur of digital transactions, Ksh 10 here, Ksh 200 there, with no clear picture of where it was all going. The small, frequent drains were invisible, yet they added up.
So I did what any developer facing a personal pain point eventually does:
I built my own Spending Tracker, specifically for MPESA.
This is the story of why I built it, how it works, and how its intentional simplicity led to real behavioral change.
The Problem With Most Finance Apps
Most budgeting tools fail in one of three ways:
- Too Complex – Burdened with dozens of features you never use, creating friction instead of clarity.
- Too Restrictive – They force you into predefined categories and rigid rules that don't fit your actual life.
- Too Opaque – Your sensitive financial data lives in a black box on someone else's server.
I didn't want another budgeting app. I wanted a mirror for my spending.
My requirements were simple:
- Fast – Logging an expense should take seconds.
- Honest – Show me the raw truth, without judgment or gamification.
- Transparent – I control my data and understand how it's processed.
- Adaptable – It should evolve as my financial awareness grows.
The solution was to strip the problem down to its core: awareness first, optimization later.
What This Tracker Does (And What It Doesn't)
This tool is an exercise in minimalism. It's built to do one thing exceptionally well: make your spending visible.
What It Does Well
- Track Daily Expenses in Seconds: Minimal input for maximum consistency.
- AI-Powered Transaction extraction: Automatically extracts transactions from raw MPESA statement text.
- Smart Budgeting: Uses AI to suggest personalized budget categories based on your actual spending patterns on Onboarding.
- Clear Visibility: Shows totals by day, week, and month in an unobstructed dashboard.
- Data Portability: Your data stays simple, accessible, and under your control.
What It Avoids (Intentionally)
- Over-engineered budgeting rules
- Gamification and badges
- Pushy notifications
- Complex financial forecasting
- Lock-in to a single bank or service (beyond MPESA for now)
The philosophy is clear: you cannot manage what you cannot see. This tool is designed to give you that sight.
How It Works: A Technical Overview
The system is built as a self-contained, easy-to-deploy stack using Docker.
Architecture
The docker-compose.yml file defines two core services:
-
Backend (
skamau123/spending-tracker-services:latest)- A Spring Boot API that handles all the logic.
- Runs on port
8080. - By default, uses a persistent SQLite database (no setup needed).
-
Frontend (
skamau123/spending-tracker-frontend:latest)- A Next.js application providing the clean, fast interface.
- Runs on port
3000. - Communicates directly with the backend.
AI Integration
The magic happens via integration with the Groq API, which provides blazing-fast inference on open-source LLMs. This powers the statement parsing and intelligent budgeting features. You can choose from models like llama-4-maverick or moonshotai/kimi-k2-instruct based on your needs.
How to Run It Yourself
Want to host your own personal finance mirror? It's straightforward.
Prerequisites
- Docker
- Docker Compose
- A Groq API Key (Get a free one from console.groq.com)
Step-by-Step Setup
-
Clone the repository:
git clone https://github.com/stanweb/spending-tracker-docker-compose.git cd spending-tracker-docker-compose -
Configure environment: Create a
.envfile in the project root and add your details:# Frontend Configuration (Required) GROQ_API_KEY=<your_groq_api_key_here> NEXT_PUBLIC_BACKEND_API_BASE_URL=http://backend:8080/api GROQ_MODEL=moonshotai/kimi-k2-instruct-0905 # Backend Database (Optional - only if switching from default SQLite) # SPRING_DATASOURCE_URL=jdbc:mysql://host.docker.internal:3306/db_name # SPRING_DATASOURCE_USERNAME=your_user # SPRING_DATASOURCE_PASSWORD=your_password -
Launch the application:
docker-compose up -d -
Start tracking: Open your browser and go to http://localhost:3000. The backend API will be available at http://localhost:8080.
Your data is persisted in a Docker volume named tracker_sqlite, so it survives container restarts.
The Real Impact: Changed Habits
Building this tool was a technical project, but using it was a personal one. The constant, gentle visibility it provided led to natural, unforced changes:
- Patterns Emerged: I could finally see my true "essential" spending versus the automated leaks.
- Better Questions: Instead of "Where did my money go?", I started asking "Is this where I want it to go?"
- Reduced Friction: The simple act of seeing a category total rise each week created a subtle, internal pressure to slow down.
The app didn't budget for me. It gave me the clarity to budget for myself. It turned finance from a source of anxiety into a series of conscious, manageable choices.
Try it for yourself. Sometimes the most powerful tools are the ones that do less, but do it with purpose.