A modern, full-stack web application for tracking personal income and expenses with beautiful visualizations and responsive design.
- 🔐 User Authentication - Secure registration and login system
- 💵 Transaction Management - Add, view, and delete income/expense transactions
- 📊 Data Visualization - Interactive charts showing monthly trends
- 📱 Fully Responsive - Works seamlessly on desktop, tablet, and mobile devices
- 🎨 Modern UI - Beautiful glass-morphism design with smooth animations
- 📈 Dashboard Analytics - Real-time income, expense, and balance tracking
- 🗑️ Transaction History - View all transactions with filtering options
- Flask - Python web framework
- SQLAlchemy - ORM for database management
- Flask-Login - User session management
- Werkzeug - Password hashing and security
- HTML5 - Structure
- Tailwind CSS - Styling framework
- JavaScript - Interactive functionality
- Chart.js - Data visualization
- Jinja2 - Template engine
- SQLite - Lightweight database (can be upgraded to PostgreSQL/MySQL)
Before running this application, make sure you have:
- Python 3.8 or higher
- pip (Python package manager)
- Virtual environment (recommended)
- Clone the repository
git clone https://github.com/cyb3erasad/Python-Expense-Tracker.git
cd expense-tracker- Create a virtual environment
# Windows
python -m venv venv
venv\Scripts\activate
# macOS/Linux
python3 -m venv venv
source venv/bin/activate- Install dependencies
pip install -r requirements.txt- Create requirements.txt (if not exists)
Flask==2.3.0
Flask-SQLAlchemy==3.0.3
Flask-Login==0.6.2
Werkzeug==2.3.0- Set up environment variables
# Windows
set FLASK_APP=app.py
set FLASK_ENV=development
set SECRET_KEY=your-secret-key-here
# macOS/Linux
export FLASK_APP=app.py
export FLASK_ENV=development
export SECRET_KEY=your-secret-key-here- Initialize the database
python
>>> from app import app, db
>>> with app.app_context():
>>> db.create_all()
>>> exit()- Run the application
flask run- Access the application
Open your browser and navigate to:
http://localhost:5000
expense-tracker/
│
├── app.py # Main application file
├── models.py # Database models
├── routes.py # Route handlers
├── requirements.txt # Python dependencies
│
├── templates/ # HTML templates
│ ├── base.html # Base template with navigation
│ ├── home.html # Landing page
│ ├── login.html # Login page
│ ├── register.html # Registration page
│ ├── dashboard.html # Main dashboard with charts
│ ├── add_transaction.html # Add transaction form
│ └── transactions.html # Transaction history
│
├── static/ # Static files (if needed)
│ ├── css/
│ ├── js/
│ └── images/
│
└── instance/ # Database file
└── expense_tracker.db
- Navigate to the homepage
- Click "Register"
- Fill in username, email, and password
- Submit the form
- Click "Login" from the homepage
- Enter your email and password
- Access your dashboard
- Click "Add Transaction" from the navigation
- Select transaction type (Income/Expense)
- Enter amount, description, and date
- Submit the form
- See your current month's income, expenses, and balance
- View monthly trends with interactive charts
- Analyze spending patterns
- View all transactions in the History page
- Delete unwanted transactions
- Filter and search (coming soon)
- Total Income - Sum of all income transactions for current month
- Total Expense - Sum of all expense transactions for current month
- Balance - Difference between income and expenses
- Monthly Bar Chart - Compare income vs expenses across all months
- Doughnut Chart - Visual breakdown of income vs expenses
- Mobile First - Optimized for mobile devices
- Card Layout - Mobile-friendly transaction cards
- Bottom Navigation - Easy access on mobile
- Touch Friendly - Large buttons and touch targets
- Password hashing using Werkzeug
- User session management with Flask-Login
- CSRF protection
- Secure database queries with SQLAlchemy
- Bottom navigation bar for easy access
- Card-based transaction view
- Touch-optimized buttons
- Responsive charts
- Swipe gestures support (future)
- Export transactions to CSV/PDF
- Category-based expense tracking
- Budget setting and alerts
- Multi-currency support
- Recurring transactions
- Data backup and restore
- Advanced filtering and search
- Email notifications
- Dark mode toggle
- API for mobile app integration
This project is licensed under the MIT License - see the LICENSE file for details.
ASAD NADEEM
- GitHub: @cyb3erasad
- Email: cyb3rasad@gmail.com
- Flask documentation
- Tailwind CSS for the styling framework
- Chart.js for beautiful charts
- The open-source community
Made with ❤️ and Python