StudentSpend is a web-based expense tracking application designed to help students efficiently manage their expenses.
- User Authentication: Secure login using OTP-based authentication.
- Expense Tracking: Add, edit, and delete expenses with details like name, amount, category, date, and description.
- Dashboard: View total expenses, transaction count, and the category with the highest spending.
- Monthly Analytics: Track expenses month by month and view detailed transaction history.
- Responsive Design: Optimized for both desktop and mobile devices.
Expense-Tracker/
│
├── app.py # Main Flask application
├── engine/ # Core logic for database operations
│ └── test.py # Test script for verifying functionality
├── templates/ # HTML templates for the web interface
│ ├── login.html # Login page
│ ├── main.html # Dashboard page
├── static/ # Static assets (CSS, JS)
│ ├── styles/ # Stylesheet for the application
│ └── style.css
│ ├── js/
│ └── login.js # JavaScript for client-side functionality
├── logs/
│ └── err.log # Error log
├── worklog/ # Work log (if applicable)
├── pycache/ # Compiled Python files
├── README.md # Project documentation
└── requirements.txt # Python dependencies
- Clone the repository:
git clone https://github.com/your-username/Expense-Tracker.git
cd Expense-Tracker- Install dependencies:
pip install -r requirements.txt-
Configure the database:
- Update the
DB_CONNinconfig.pywith your MySQL database credentials. - Ensure the required tables (
user_spend,user_information, etc.) are created in the database.
- Update the
-
Configure email settings:
- Update
MAIL_USERNAMEandMAIL_PASSWORDinconfig.pywith your email credentials.
- Update
-
Run the application:
python app.py- Access the application at http://localhost:8080
POST /send-otp- Generate and send an OTP to the user’s email.POST /verify-otp- Verify the OTP for login.POST /register- Register a new user.
GET /api/get-transactions- Fetch transactions for the authenticated user.POST /api/add-expense- Add a new expense.DELETE /api/delete-expense- Delete an expense.
GET /api/user-info- Fetch user details.GET /api/get-card-data- Fetch dashboard card data for a specific month and year.
- Backend: Flask (Python)
- Frontend: HTML, CSS, JavaScript
- Database: MySQL
- Email Service: Flask-Mail
- Logging: Custom error logging to
logs/err.log
- Add analytics for yearly expense trends.
- Implement user-defined categories for better customization.
- Add support for exporting data to CSV or PDF.
- Enhance security with additional authentication mechanisms.
- Font Awesome for icons.
- Google Fonts for the Inter font.