A full-stack personal expense tracking system built using Streamlit (frontend), FastAPI (backend), and MySQL (database). This app allows you to add, view, delete, and analyze expenses with a user-friendly interface and dynamic charts.
- Add multiple expenses per day with category and notes
- View and manage expenses by date
- Delete expenses (individually or in bulk)
- Dashboard with pie charts and bar graphs
- Monthly trend analysis with percent change from previous days
- Clean UI with reset and auto-refresh logic
| Layer | Tool |
|---|---|
| Frontend | Streamlit |
| Backend | FastAPI |
| Database | MySQL |
| Visualization | pandas, matplotlib |
project_expense_management/
│
├── Backend/
│ ├── server.py # FastAPI main backend
│ ├── db_helper.py # MySQL queries and DB logic
│ └── server.log # Log output
│
├── Frontend/
│ ├── app.py # Streamlit main app
│ ├── insert.py # Add expense tab
│ ├── view_manage.py # View/Delete tab
│ ├── dashboard.py # Dashboard analytics
│ ├── analytics.py # API calls to analytics endpoint
│
├── requirements.txt # Python dependencies
├── tests/ # Test structure (pytest)
└── README.md # You're here
https://github.com/itsmoksh/Expense-Management-System.git
cd project_expense_managementpip install -r requirements.txt- Create a database named
expense_db(or your choice). - Create the
expensestable:
CREATE TABLE expenses (
id INT AUTO_INCREMENT PRIMARY KEY,
expense_date DATE,
amount DECIMAL(10,2),
category VARCHAR(50),
notes TEXT
);- Update your MySQL credentials in
db_helper.py
cd Backend
uvicorn server:app --reloadcd ../Frontend
streamlit run app.py- Pie chart: category-wise breakdown
- Bar chart: month-wise spending
- Metric: % change from previous day
- Add user authentication
- Export filtered data as CSV/Excel
MIT License – free to use and modify.