Skip to content

About

A secure, session-based personal finance dashboard built for Harvard's CS50 with full CRUD capabilities.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

Repository files navigation

💰 CyberFinance — Personal Finance Tracker

License Python Issues Live Demo

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.


🚀 Live demo

https://dub.sh/finance-dashboard


📸 Screenshots

Add Transaction

Add Transaction

A simple, focused form for adding income or expense transactions with type, description, amount, category and date.

Dashboard

Dashboard

Compact summary card showing totals (income, expenses, balance) alongside a chronologically ordered transactions table


✨ Features

  • 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

🛠 Technology stack

  • Backend: Python, Flask
  • Database: MySQL
  • Frontend: HTML, CSS, JavaScript
  • Libraries: CS50 SQL Library, Flask-Session, Werkzeug, python-dotenv
  • Deployment: PythonAnywhere

📂 Project structure

.
├── 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)

⚙️ Installation & local development

  1. Clone the repository

    git clone https://github.com/TanmayJain-dev/Flask-Finance-Tracker.git
    cd Flask-Finance-Tracker
  2. Create and activate a virtual environment (recommended)

    python -m venv venv
    source venv/bin/activate    # macOS / Linux
    venv\\Scripts\\activate   # Windows (PowerShell)
  3. Install dependencies

    pip install -r requirements.txt
  4. 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
  1. Initialize the database
  • MySQL (example):
-- run inside your MySQL client
SOURCE schema.sql;
  1. Run the application
export FLASK_APP=app.py
export FLASK_ENV=development   # optional
flask run

On Windows PowerShell:

$env:FLASK_APP = "app.py"
flask run

Open http://127.0.0.1:5000 in your browser.


🗄️ Database design (overview)

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)

🔒 Security & design decisions

  • 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.

🧩 Challenges & Learning

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.


🔭 Roadmap / Future improvements

  • 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

👨‍💻 Author

Tanmay Jain — https://github.com/TanmayJain-dev


📜 License

MIT

About

A secure, session-based personal finance dashboard built for Harvard's CS50 with full CRUD capabilities.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages