A comprehensive expense management application built with FastAPI backend and Streamlit frontend, featuring real-time analytics and MySQL database integration for efficient personal finance tracking.
expense-tracking-system/
├── frontend/ → Streamlit UI components and pages
├── backend/ → FastAPI server and API endpoints
├── tests/ → Unit tests and integration tests
├── db_schema/ → Database schema/diagram without the sql file
├── requirements.txt → Python dependencies
└── README.md → Project documentation
git clone https://github.com/your-username/expense-tracking-system.git
cd expense-tracking-systempip install -r requirements.txtcd backend
fastapi dev server.pyServer may be available at: http://localhost:8000
cd frontend
streamlit run app.pyApp may be available at: http://localhost:8501
┌─────────────────────┐
│ Streamlit UI │ ← User Interface (Add/Update, Analytics)
│ (Frontend) │
└─────────┬───────────┘
│
▼
┌─────────────────────┐
│ FastAPI Server │ ← REST API Endpoints
│ (Backend) │
└─────────┬───────────┘
│
▼
┌─────────────────────┐
│ MySQL Database │ ← Data Storage (Expenses, Categories)
│ (Data Layer) │
└─────────────────────┘
Key Components:
- Frontend Layer: Interactive Streamlit interface
- API Layer: RESTful FastAPI endpoints
- Data Layer: MySQL database with CRUD operations
- Analytics: Real-time expense categorization and reporting
| Component | Description | Status |
|---|---|---|
| MySQL Database Setup | Reference: 15.3_and_15.4_IMP.py |
Complete |
| CRUD Operations | db_helper.py implementation |
Complete |
| Database Unit Tests | Test coverage for db_helper.py |
Complete |
| Endpoint | Description | Status |
|---|---|---|
| Add/Update Expenses | Fetch expenses by date for population | Complete |
| Postman Testing | API endpoint validation | Complete |
| Analytics by Category | Category-wise expense breakdown | Complete |
| Postman Testing | Category analytics validation | Complete |
| Analytics by Month | Monthly expense trends | In Progress |
| Postman Testing | Monthly analytics validation | Pending |
| Component | Description | Status |
|---|---|---|
| Logging System | server.py and db_helper.py logging |
Complete |
| Screen | Description | Status |
|---|---|---|
| Add/Update Screen | Expense entry and modification interface | Complete |
| Analytics by Category | Visual category-wise reports | Complete |
| Analytics by Month | Monthly trend visualization | In Progress |
Vertical Development Approach: We follow a complete feature-to-feature development cycle:
| # | Feature | Implementation |
|---|---|---|
| 1 | Add/Update Screen | Frontend ➜ Backend ➜ Testing |
| 2 | Analytics by Category | Frontend ➜ Backend ➜ Testing |
| 3 | Analytics by Month | Frontend ➜ Backend ➜ Testing |
This ensures each feature is fully functional before moving to the next, enabling continuous testing and user feedback.
| Layer | Technology | Purpose |
|---|---|---|
| Frontend | Streamlit | Interactive web interface |
| Backend | FastAPI | High-performance API server |
| Database | MySQL | Reliable data persistence |
| Testing | Postman | API endpoint validation |