A web app for families to track their expenses and income together. Built with Python Flask and SQLite, with a dark mode dashboard interface.
| Layer | Technology |
|---|---|
| Backend | Python + Flask |
| Database | SQLite |
| Frontend | HTML, CSS, Vanilla JS |
| Charts | Chart.js |
| Auth | Werkzeug + Flask Sessions |
expense-tracker/
├── app.py Flask server and API routes
├── database.py Database queries
├── models.py Data models
├── requirements.txt Python dependencies
├── expenses.db SQLite database, auto created on first run
├── static/
│ ├── style.css Styles
│ └── app.js Frontend logic
└── templates/
├── login.html Login and register page
└── dashboard.html Main dashboard
Install dependencies:
pip install -r requirements.txtRun the app:
python app.pyOpen your browser and go to:
http://127.0.0.1:5000
- Go to the login page and click Register
- Enter your name, username and password
- Choose Create a Family and give it a name
- You will get a 6 character invite code — share it with your family members
- Other members register by choosing Join a Family and entering the code
- Secure login with hashed passwords and 7 day persistent sessions
- Family group system using invite codes — each family's data is completely separate
- Add and delete expenses with categories, types, tags and dates
- Track monthly income per member with income categories
- Set a monthly budget with a live progress bar that warns when you are close to the limit
- Charts showing spending by category and a 6 month spending trend
- Family overview showing each member's income and expenses side by side
- Admin and member roles — admins can manage all entries, members manage their own
| Table | Purpose |
|---|---|
| families | Stores family groups and invite codes |
| users | Stores members, hashed passwords and roles |
| expenses | All expense entries |
| income | All income entries |
| budget | Monthly budget limit per member |
If you need to start fresh, stop the server and run:
del expenses.db
python app.pyThe database will be recreated automatically.
- The database file is created automatically the first time you run the app
- Only the family admin can see the invite code in the Family tab
- Admins can delete any entry, members can only delete their own