How onkar69483/personal_finance_management-java-swing works
1. This is a Java Swing desktop application, not a web app. The runtime is a local GUI client that talks directly to a MySQL database over JDBC.
2. The entry point is src/personalfinancemanagement/PersonalFinanceManagement.java. From there the app boots into the authentication and main UI flow.
3. The presentation layer is split into Swing screens under src/Login and src/Home. Login.java and SignUp.java handle account access, while HomePage.java is the main post-login dashboard. The .form files show these screens were built with NetBeans GUI Builder.
4. UI layout is NetBeans-centric and uses AbsoluteLayout, so the screens are positioned as fixed desktop forms rather than responsive web-style views.
5. src/Database/DatabaseManager.java is the central persistence boundary. It is the likely JDBC abstraction for all CRUD operations against the MySQL backend, including users, accounts, incomes, expenses, and budget-related records.
6. src/Database/UserSession.java represents application state for the authenticated user. That session object is the bridge between login and all later screens, so the home dashboard and transaction actions can be scoped to the current user.
7. The database schema lives in Database_Setup/PFMS_Backend.sql. That file is the authoritative backend contract and should be treated as the source of truth for tables and relationships.
8. src/Chart/IncomeExpenseChart.java is the reporting subsystem. It uses XChart to render monthly financial visuals such as income vs. expense and savings trends, which the README calls out as a major feature.
9. The home/dashboard screen is the app’s aggregation layer. Based on the README, it combines account summaries, recent transactions, income/expense entry points, savings progress, and charts into one main workspace.
10. Date selection is supported through the bundled JCalendar library under lib/jcalendar-1.4. This is a UI dependency, not a core business layer, but it affects transaction entry flows because financial records are date-driven.
11. External dependencies are packaged locally in lib/: MySQL Connector/J for database access, XChart for visualization, and JCalendar for date picking. The app is therefore self-contained at the source level but expects these JARs at runtime.
12. The repo is organized like a classic NetBeans desktop project: source code in src, IDE metadata in nbproject, DB bootstrap in Database_Setup, and UI assets in images and src/Icon.
13. The main data flow is: user logs in or signs up → UserSession captures identity → DatabaseManager reads/writes MySQL data → HomePage displays summaries and transaction history → IncomeExpenseChart renders monthly analytics from the same persisted records.
14. For an architecture diagram, the key boundaries are: desktop UI screens, session/state handling, database access layer, chart/reporting module, and the external MySQL database plus bundled third-party UI/library dependencies.
Main entry points: HomePage.java Home page · DatabaseManager.java Database manager · Login.java Login · Login.form NetBeans UI
Components 14
Desktop app
Swing client and in-repo application code
- App entry · Launches the desktop client and enters the auth flow
src/personalfinancemanagement/PersonalFinanceManagement.java - Login · Existing-user sign-in form
src/Login/Login.java - Sign Up · New-account registration form
src/Login/SignUp.java - Home page · Main post-login workspace and summary screen
src/Home/HomePage.java - Charts · Monthly income, expense, and savings visualizations
src/Chart/IncomeExpenseChart.java - NetBeans UI · Generated Swing forms and absolute-positioned desktop layouts
src/Login/Login.form - UI assets · Images and icon resources used by the desktop screens
images
Data backend
Persistence boundary and database contract
- User session · Authenticated-user context shared across screens
src/Database/UserSession.java - Database manager · Central JDBC access for CRUD against the MySQL backend
src/Database/DatabaseManager.java - SQL schema · Authoritative table and relationship setup for the backend
Database_Setup/PFMS_Backend.sql - MySQL DB · Runtime persistence backend
Bundled libs
Third-party runtime dependencies packaged with the project
- Connector/J · MySQL JDBC driver bundled for database connectivity
lib/mysql-connector-j-8.0.32.jar - XChart · Chart rendering library bundled for analytics visuals
lib/xchart-3.8.7.jar - JCalendar · Bundled date-selection UI component used in entry flows
lib/jcalendar-1.4
Connections 18
- App entry → Login: opens · Bootstraps into the authentication screen
- App entry → Sign Up: opens · Can route to account creation
- Login → User session: creates · Stores the authenticated user context
- Sign Up → Database manager: creates account · Persists new user records through the database layer
- Login → Database manager: verifies · Checks credentials against stored user data
- Login → Home page: enters · Successful auth transitions to the dashboard
- User session → Home page: scopes · Provides current-user context to the main workspace
- Home page → Database manager: reads/writes · Loads summaries and persists finance records
- Home page → Charts: feeds data · Supplies persisted records for analytics rendering
- Charts → XChart: renders with · Uses the chart library for visual output
- Home page → JCalendar: dates · Uses date-picker UI for transaction entry
- Database manager → Connector/J: connects via · Relies on the MySQL JDBC driver
- Database manager → SQL schema: aligns with · Implements the repository's SQL contract
- Database manager → MySQL DB: persists to · Reads and writes the live database
- NetBeans UI → Login: builds · Generated Swing form backing
- NetBeans UI → Sign Up: builds · Generated Swing form backing
- NetBeans UI → Home page: builds · Generated Swing form backing
- Home page → UI assets: uses · Loads desktop UI imagery and icons