Take control of your finances with Expense Tracker Pro, a comprehensive full-stack web application designed for complete financial management. Featuring user authentication, interactive analytics dashboard, budget tracking, recurring transactions, dynamic categories, and professional support pages, this project is a powerful solution for personal and small business financial tracking.
Expense Tracker Pro allows you to log expenses and income, categorize transactions dynamically, set budgets with progress tracking, manage recurring bills, visualize financial data with interactive charts, and access comprehensive support resources. Built with modern technologies and professional UI/UX, it's perfect for personal finance management or as a foundation for financial SaaS applications.
- Purpose: A comprehensive financial management solution and demonstration of modern full-stack development
- Status: Feature-complete with advanced analytics, open to contributions and further enhancements
- Frontend: React, React Router, Chart.js (pie and bar charts), Bootstrap-like CSS
- Backend: Flask, Flask-JWT-Extended, SQLAlchemy, Flask-CORS
- Database: MySQL with dynamic category management
- DevOps: Docker, Docker Compose, Gunicorn
- Deployment: Heroku, Netlify, Vercel, Render
- Security: JWT authentication, password hashing, rate limiting
- Secure user registration and login with JWT tokens
- Password change functionality
- Account deletion with data cleanup
- Rate limiting and security headers
- Expense Tracking: Add, edit, delete expenses with dynamic categories
- Income Management: Track multiple income sources with full CRUD
- Dynamic Categories: User-managed categories stored in database
- Budget Management: Set budgets per category with visual progress bars
- Recurring Transactions: Manage bills, subscriptions, and regular payments
- Professional Dashboard: KPI metrics with trend indicators
- Interactive Charts: Pie charts for expense breakdown, bar charts for income vs expenses
- Real-time Analytics: Live data updates and comprehensive financial overview
- Reports Page: Monthly income vs expense comparisons
- Settings Page: Profile management, data export, account controls
- Dark Theme: Professional purple-themed UI throughout
- Responsive Design: Mobile-first approach with adaptive layouts
- Export Functionality: CSV downloads for expenses and incomes
- Help Center: Comprehensive FAQ and user guides
- Privacy Policy: Detailed data protection and privacy information
- Terms of Service: Legal terms and conditions
- Contact Page: Support form and business information
- Containerized: Full Docker support for consistent environments
- Production Ready: Gunicorn, environment variables, error handling
- API Documentation: RESTful endpoints with JWT protection
- Database Management: SQLAlchemy ORM with migration support
- Docker and Docker Compose installed.
- Node.js and npm for the frontend.
- Python 3.12+ with
pip.
- Clone the repository:
git clone https://github.com/Alex-Muhscience/expense-tracker.git cd expense-tracker - Set up environment variables:
- Create a
.envfile in thebackendfolder withJWT_SECRET_KEY=your-secret-key.
- Create a
- Build and run with Docker:
docker-compose up --build
- Access the app:
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- Set up environment variables securely (do not commit secrets).
- Ensure database is set up (e.g., MySQL on cloud provider like AWS RDS or PlanetScale).
- For HTTPS, use a reverse proxy or platform that provides SSL certificates.
The backend is a Flask app using Gunicorn for production.
-
Heroku:
- Create a new Heroku app.
- Set config vars (environment variables):
DB_USER,DB_PASSWORD,DB_HOST,DB_PORT,DB_NAME,JWT_SECRET_KEY,LOG_LEVEL=INFO,CORS_ORIGINS=https://your-frontend-domain.com. - Add a
Procfilein the backend directory:web: gunicorn app:app - Push the backend code to Heroku git or connect GitHub repo.
-
Render:
- Create a new Web Service.
- Connect your repository, set build command to
pip install -r requirements.txt, start command togunicorn app:app. - Set environment variables as above.
-
Using Docker:
- Build the image:
docker build -t expense-backend ./backend - Run with:
docker run -p 5000:5000 --env-file .env expense-backend - For orchestration, use Docker Compose with production environment.
- Build the image:
The frontend is a React app built with npm run build.
-
Netlify:
- Build the app:
npm run build(createsbuild/folder). - Upload the
buildfolder to Netlify or connect the repo. - Set build command:
npm run build, publish directory:build. - Update API calls to point to the production backend URL.
- Build the app:
-
Vercel:
- Connect the repository to Vercel.
- Vercel will automatically detect React and build it.
- Set environment variables if needed, and update API base URL.
-
GitHub Pages (for static hosting):
- Use
gh-pagespackage to deploy the build folder.
- Use
- Create a
.envfile in the backend directory for local development. - For production, use the platform's environment variable settings.
- Example
.env:DB_USER=your_db_user DB_PASSWORD=your_db_password DB_HOST=your_db_host DB_NAME=expense_tracker JWT_SECRET_KEY=your_secret_key LOG_LEVEL=INFO CORS_ORIGINS=https://your-frontend.com
- For production, use a managed MySQL service like AWS RDS, Google Cloud SQL, or PlanetScale.
- Run migrations if needed (currently using SQLAlchemy auto-create).
- Use Heroku logs or add logging to external services like LogRocket for monitoring.
- Test cases included:
- Successful user registration and login.
- Adding an expense with valid data.
- Fetching expenses for an authenticated user.
- Invalid input handling (e.g., negative amount).
- CSV export functionality.
- Run tests manually by interacting with the app or add unit tests with
unittestin the future.
Interested in enhancing this project? Fork the repository, submit a pull request, or open an issue. Suggestions for features like budget alerts or mobile optimization are welcome!
This project is licensed under the MIT License—see the LICENSE file for details.
- Built with the help of open-source tools like React, Flask, and Docker.
- Inspired by the need for simple, effective financial tracking solutions.
- GitHub Repository
- Open an issue or submit a pull request to collaborate!
Let’s make expense tracking cooler together! 🚀