Expense Tracker is a modern, open-source platform to manage your expenses with conversational AI. Self-host and own your data, powered by FastAPI, Supabase, and LangGraph.
git clone <repo-url>
cd expense_tracker
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt- Sign up at Supabase
- Create a new project
- Go to Project Settings → API
- Copy your
SUPABASE_URLandSUPABASE_KEY - Create a
.envfile in the root:
SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_supabase_keyCreate the following tables in Supabase:
| Column | Type | Notes |
|---|---|---|
| user_id | uuid | Primary Key |
| user_name | text | |
| text | Unique | |
| password | text | Hashed |
| thread_id | uuid | Nullable |
| Column | Type | Notes |
|---|---|---|
| category_id | uuid | Primary Key |
| user_id | uuid | FK → user |
| name | text | |
| description | text | Nullable |
| Column | Type | Notes |
|---|---|---|
| expense_id | uuid | Primary Key |
| user_id | uuid | FK → user |
| category_id | uuid | FK → category |
| amount | float | |
| created_at | timestamptz | Default now() |
- Sign Up:
POST /auth/signup— Register a new user
- Sign In:
POST /auth/signin— Login and receive a token
- Start Conversation:
POST /user/start— Begin a chat session with a prompt
- Human Feedback Loop:
- If response contains
human_feedback: true, callPOST /user/continuewith your prompt to continue the conversation
- If response contains
POST /auth/signup— RegisterPOST /auth/signin— LoginPOST /user/start— Start conversationPOST /user/continue— Continue conversation (ifhuman_feedback: true)
POST /category/add— Add a new categoryGET /category/get— List your categories
POST /expense/add— Add an expenseGET /expense/get— List expenses (implement as needed)
- FastAPI — Modern Python web framework
- Supabase — Postgres DB & Auth
- LangGraph — Conversational AI workflow
- Pydantic — Data validation
- Docker (optional) — Containerization
# Signup
curl -X POST http://localhost:8000/auth/signup -H "Content-Type: application/json" -d '{"user_name": "alice", "email": "alice@example.com", "password": "password123"}'
# Signin
curl -X POST http://localhost:8000/auth/signin -H "Content-Type: application/json" -d '{"email": "alice@example.com", "password": "password123"}'
# Start conversation
curl -X POST http://localhost:8000/user/start -H "Authorization: Bearer <token>" -H "Content-Type: application/json" -d '{"prompt": "Track my coffee expense"}'Contributions welcome! Please open issues or PRs.
MIT