Modern JavaFX + CLI application for managing wallets, transactions, budgets, goals, and reports on top of a lightweight SQLite store.
- Visual JavaFX dashboard with animated cards, charts, and quick navigation.
- Wallet, transaction, budget, and goal management with double-click editing and contextual dialogs.
- CLI companion (
CLIApp) for scripted workflows or headless environments. - Shared service layer backed by SQLite, keeping GUI and CLI in sync.
- JDK 21 or newer.
- Maven 3.9+ with
mvnon yourPATH. - No external database required; an embedded SQLite file (
GG_Personal_Finance.db) is created automatically.
mvn clean javafx:runUse mvn javafx:run for quicker iterations when you do not need a clean build. A VS Code task named Run GUI (JavaFX) is also available.
mvn clean exec:java -Dexec.mainClass="gitgud.pfm.CLIApp"Subsequent runs can drop the clean phase. The Run CLI VS Code task mirrors this command.
mvn clean packageProduces two runnable artifacts in target/:
pfm-gui.jar– JavaFX desktop app.pfm-cli.jar– CLI application.
Run the packaged binaries with:
java -jar target/pfm-gui.jar
java -jar target/pfm-cli.jar- Start the GUI and log in to the dashboard landing page.
- Use the sidebar to switch between Dashboard, Transactions, Reports, Goals, Wallets, and Budget views.
- Contextual buttons (e.g., Add Wallet, Add Goal) open dialogs sized for that workflow.
- Go to Wallets and click Add Wallet to define name, color, and opening balance.
- Double-click a wallet card to adjust balances, rename, or delete the wallet.
- Deleting a wallet permanently removes its linked transactions—the dialog highlights this in red so you can proceed confidently.
- In Transactions, press Add Transaction to categorize income/expenses against a wallet.
- The ledger displays wallet names alongside amounts; double-click any entry to edit.
- Filters and search inputs narrow the list; totals update automatically after each change.
- Open Budget, then click New Budget.
- Choose a period (weekly/monthly/yearly/custom), optionally bind it to a wallet or category, set spending limits, and confirm.
- Double-click a budget row to edit its dates, targets, or associations; use the delete action to retire obsolete budgets.
- Progress indicators compare actual transaction totals against the budget limit so you can react before overspending.
- Navigate to Goals and pick Add Goal to define the target amount, starting balance, deadline, and priority.
- Assigning a wallet keeps progress tied to a funding source; otherwise goals stay account-wide.
- Double-click to edit; the controller recomputes progress from recorded transactions, so the status bars remain accurate.
Use the Reports view to visualize income vs. expenses, category splits, and wallet health. Most charts support hover tooltips for raw values.
Launch the CLI binary or mvn exec:java -Dexec.mainClass="gitgud.pfm.CLIApp" to:
- List wallets, budgets, goals, categories, and transactions.
- Add or edit data interactively with prompts mirroring the GUI fields.
- Export totals for scripting or automated testing.
| Layer | Responsibilities | Key Classes |
|---|---|---|
| JavaFX UI | FXML-defined layouts (dashboard.fxml, wallets.fxml, etc.) plus main.css styling. |
App, FXML files, CSS |
| Controllers | Handle user events, animations, and dialog flows for each screen. | DashboardController, WalletsController, TransactionsController, BudgetController, GoalsController, SidebarController, etc. |
| Services | CRUD abstraction for each aggregate plus shared AccountDataLoader facade. |
WalletService, TransactionService, GoalService, BudgetService, AccountDataLoader |
| Models | POJOs representing domain entities. Wallets, budgets, and goals inherit from FinancialEntity. |
Wallet, Budget, Goal, Transaction, Category |
| Persistence | SQLite connection + schema bootstrapper. | Database, DatabaseInitializer |
Data Flow:
- UI actions bubble to controllers (e.g.,
WalletsController). - Controllers call
AccountDataLoader, which coordinates the specialized services. - Services execute SQL via shared
Databaseconnection; schema is created on first launch. - Observer callbacks in
AccountDataLoadernotify controllers so the UI refreshes after mutations.
CLI flows reuse the same loader/services so both interfaces stay consistent.
- Fields:
id,name,balance. - Constructors:
FinancialEntity(String id, String name, double balance)– assigns the base state.
- Core Methods:
getId()/setId()– unique identifier (UUID-like helper viaIdGenerator).getName()/setName()– display label for UI components.getBalance()/setBalance()– current numeric value in the entity’s native currency.addToBalance(double amount)/subtractFromBalance(double amount)– utility helpers used when reconciling transactions.toString()– debug-friendly summary (ClassName{id='...', ...}).
- Extra Fields:
color(hex string used for card gradients). - Constructors:
- No-arg default for ORM mappers.
Wallet(String color, double balance, String name)– auto-generates an ID and stores UI tint + starting balance.
- Methods:
getColor()/setColor().
- Extra Fields:
limitAmount,startDate,endDate,PeriodType(WEEKLY,MONTHLY,YEARLY,CUSTOM), optionalwalletId, optionalcategoryId. - Constructors: overloads for account-wide budgets, wallet-specific budgets, or category-focused budgets. All generate IDs through
IdGeneratorand default toPeriodType.MONTHLYwhen unspecified. - Methods: standard getters/setters plus
isAccountWide()andisCategoryBudget()convenience checks.
- Extra Fields:
target,priority,createTime,deadline, optionalwalletId, computedtxCountandprogressfields populated byGoalService. - Constructors:
- Default reflection constructor.
Goal(String name, double target, double current, String deadline, double priority, String createTime)for GUI flows.Goal(String name, double target, String deadline, double priority, String createTime)for CLI flows where current balance is derived later.
- Methods: getters/setters for each field, enabling controllers to display priority sorting and progress bars.
- Maven’s
cleangoal wipes thetarget/directory to prevent stale class files from polluting a build; omit it to speed up iterative development. - FXML
fx:idandonActionbindings wire view elements to their controller methods (e.g.,onAction="#switchToSecondary"callsswitchToSecondary()inPrimaryController).
For questions or enhancements, open an issue or reach out to the maintainers.