Skip to content

Vatsal1208/financial-advisor-system

Repository files navigation

Financial Advisor System

Overview

A Python-based Financial Advisor app that supports multi-user login and personalized financial tracking. Users can register, log in, add income and expenses, view their transaction history, generate financial summaries, and save their data to a MySQL database. The project uses CSV files per user and MySQL tables linked by foreign keys to keep data separated and secure.

Features

  • User registration and login with unique usernames and passwords
  • Passwords securely hashed using bcrypt
  • Individual user transaction data stored in user-specific CSV files
  • Persistent storage of users and transactions in MySQL database
  • Database schema includes users table and TransactionsData table linked by foreign key with cascade delete
  • Simple and easy to use menu navigation
  • Input validation for financial entries
  • Automatic creation of database tables on first run
  • Data synchronization between CSV and database for each user

Technologies Used

  • Python 3.11.0
  • MySQL 8.0.43 with SQLAlchemy 2.0.44
  • bcrypt for password hashing
  • python-dotenv for environment variable management
  • Built-in CSV module for file storage
  • Datetime module for date management

Installation

  1. Install Python 3.11.0 if not already installed
  2. Ensure MySQL server is installed, running and connected
  3. Create a MySQL database named budget_app
  4. Install required Python packages:
   pip install sqlalchemy pymysql python-dotenv bcrypt
  1. Create a .env file in the project root using .env.example as a template:
   DB_USERNAME=root
   DB_PASSWORD=your_password
   DB_HOST=localhost
   DB_NAME=budget_app

How to Run

Navigate to the project folder in your terminal and run:

python main.py
  • Register a new user or login with existing credentials
  • Use the menu to add income, expenses, view transactions, calculate summary, or save data
  • Each user's records are isolated in a CSV file and corresponding database entries
  • The system enforces data integrity using foreign keys and cascades deletions automatically
  • To exit, choose the exit option from the menu

Project Structure

your-project/
├── .env                 ← your credentials
├── .env.example         ← template
├── .gitignore
├── database.py
├── entry_model.py
├── file_store.py
├── main.py
├── user.py
├── requirements.txt
├── budget_app.sql
└── saves/               ← auto-created, stores user CSV files

Security

  • Passwords are hashed using bcrypt before storing in the database
  • Database credentials are stored in a .env file and never committed to version control
  • The saves/ folder containing user CSV files is excluded from Git via .gitignore

Note

  • Ensure MySQL server is running before starting the application
  • Never share or commit your .env file

About

A Python-based multi-user financial tracking app with MySQL and CSV storage

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages