How ariffurrhmn/personal-finance-manager works
Project Type and Purpose
• This is a monolithic desktop application (“Personal Finance Manager”) written in Python, using Tkinter for the GUI and SQLite for data persistence. Its purpose is to let individual users register/log in, manage accounts, record transactions, set budgets and savings goals, and view financial reports with charts.
File Structure Analysis
• Top-level files:
• Complete_app.py – the single entry-point script containing UI setup, business logic, and integration with the database and visualization components
• finance_app.db – the SQLite file storing all tables: User, Account, Category, Transactions, SavingGoal, Budget
• finance_app.log – application log file for debugging and error tracking
• SampleUsers.txt – seed/test credentials
• README.md – project documentation
• There are no sub-directories—this is a classic “all-in-one” desktop application without separate frontend/backend services.
Key Architectural Components
a. UI Layer (Tkinter)
• Windows/Screens: Login/Register, Dashboard, Account Management, Transaction Entry, Budget Setup, Savings Goals, Report Viewer
• Navigation Handlers invoke controller functions when buttons/menu items are clicked
b. Application Logic / Controllers
• Authentication Module (hashlib & secrets for password hashing and verification, email verification stubs)
• Account Management Module (create/edit/delete accounts, balance calculations)
• Transaction Module (CRUD operations on Transactions table, category assignment, transfer logic)
• Budget Module (CRUD budgets, spend-vs-limit checks)
• SavingsGoals Module (progress tracking, deadline management)
• Reporting Module (gathers data, calls Matplotlib to render charts, exports data)
• Logging Module (writes to finance_app.log)
c. Data Layer (SQLite)
• Tables: User, Account, Category, Transactions, SavingGoal, Budget
• Data Access Objects (DAOs) or direct sqlite3 calls embedded in Complete_app.py
d. Visualization Component (Matplotlib)
• Chart renderer invoked by Reporting Module to produce bar charts, pie charts, progress indicators
e. External Services (none)
• All data is local. No web services or external APIs.
Relationships & Data Flow
• The user’s actions on the Tkinter UI generate events → Controller functions process input → Controller calls Data Layer functions to query/update the SQLite DB → Data Layer returns results → Controller updates UI or passes data to Matplotlib → Matplotlib returns chart object → Controller embeds chart in UI canvas or saves to file → Logging Module writes any errors or info to finance_app.log.
Architectural Patterns and Principles
• Layered Architecture: UI, Controllers (business logic), Data Access
• Single-process, synchronous flow
• Separation of concerns between modules (authentication, account, transaction, etc.)
• Use of MVC-like pattern: Tkinter views, controller functions, and model = SQLite tables
• Modular design: distinct feature modules (budget, savings goals, reporting)