CyberFinance is a full-stack personal finance management application that allows users to securely manage income and expenses through a Flask-powered dashboard backed by a relational MySQL database.
This project was created as a CS50x final project by Tanmay Jain.
https://dub.sh/finance-dashboard
A simple, focused form for adding income or expense transactions with type, description, amount, category and date.
Compact summary card showing totals (income, expenses, balance) alongside a chronologically ordered transactions table
- Secure user authentication (register / login / logout)
- Passwords stored as hashes
- Add, edit, and delete transactions (income & expense)
- Per‑user data isolation — each user sees only their own data
- Categorised transactions and transaction history with dates
- Clean, responsive UI suitable for desktops and mobile devices
- Backend: Python, Flask
- Database: MySQL
- Frontend: HTML, CSS, JavaScript
- Libraries: CS50 SQL Library, Flask-Session, Werkzeug, python-dotenv
- Deployment: PythonAnywhere
.
├── app.py # Flask application entrypoint
├── schema.sql # MySQL database schema
├── requirements.txt # Python dependencies
├── static/ # CSS, JS, images
│ ├── styles.css
│ └── script.js
├── templates/ # Jinja2 templates (login, register, dashboard, add, edit)
└── screenshots/ # Demo images (optional)
-
Clone the repository
git clone https://github.com/TanmayJain-dev/Flask-Finance-Tracker.git cd Flask-Finance-Tracker -
Create and activate a virtual environment (recommended)
python -m venv venv source venv/bin/activate # macOS / Linux venv\\Scripts\\activate # Windows (PowerShell)
-
Install dependencies
pip install -r requirements.txt
-
Configure environment variables
Create a .env file (or export variables) with your DB credentials. Example (MySQL):
DB_USERNAME=your_user
DB_PASSWORD=your_password
DB_HOST=127.0.0.1
DB_NAME=finance_db- Initialize the database
- MySQL (example):
-- run inside your MySQL client
SOURCE schema.sql;- Run the application
export FLASK_APP=app.py
export FLASK_ENV=development # optional
flask runOn Windows PowerShell:
$env:FLASK_APP = "app.py"
flask runOpen http://127.0.0.1:5000 in your browser.
users
|
| 1:N
|
transactions
Two primary tables:
-
users
- id (PK)
- username (unique)
- hash (password hash)
-
transactions
- id (PK)
- user_id (FK -> users.id)
- type ("income" | "expense")
- description
- amount (decimal)
- category
- date (DATE)
- Passwords are hashed using a secure algorithm before being stored.
- Each user can only access their own transactions (row‑level isolation enforced by application logic).
- Secrets and DB credentials are provided via environment variables; never commit them to source.
- Flask + CS50 SQL library keeps the codebase compact and easy to understand for learning and extension.
During development, I worked through several challenges:
- Designing a relational database structure for users and transactions
- Implementing secure authentication and password hashing
- Managing database connections during deployment
- Configuring Flask applications for production hosting using PythonAnywhere
- Separating sensitive credentials from source code using environment variables
These challenges helped me understand how backend applications are structured beyond local development.
- Add charts and visual analytics (Chart.js)
- Add transaction filtering, search and export (CSV)
- Support recurring transactions and budget planning
- Improve tests and CI workflow
Tanmay Jain — https://github.com/TanmayJain-dev
MIT

