A comprehensive, all-in-one, full-stack financial management application built with React, TypeScript, and Spring Boot. Track accounts, transactions, debts, and visualize your financial health through an intuitive dashboard interface with a RESTful API backend.
- Real-time Net Worth Calculation: Track total assets minus debts
- Spending Visualization: Interactive pie charts showing expense breakdown by category
- Quick Account Summary: View all account balances at a glance
- Debt Progress Tracking: Monitor debt payoff progress with visual indicators
- Create and manage multiple financial accounts (checking, savings, credit cards, investments)
- Account Growth Charts: Visualize balance changes over time based on transaction history
- Monthly Growth Metrics: Track month-over-month account performance with percentage changes
- Transfer Between Accounts: Seamlessly move money between accounts with automatic transaction creation
- Real-time balance updates with transaction integration
- Record income and expenses with detailed categorization
- Advanced Filtering: Filter by month, category, and transaction type
- Monthly Overview: Track total income, expenses, and net income
- Support for recurring transactions (weekly, monthly, yearly)
- Automatic account balance updates
- Quick-add transaction forms with category selection
- Track multiple debts (loans, credit cards, mortgages)
- Visual Progress Bars: See payment progress for each debt
- Payment Processing: Make payments that automatically update remaining balance
- Calculate and display overall debt progress
- Separate views for active and paid-off debts
- Monthly payment tracking and totals
- Create custom categories for better expense tracking
- Category-based spending analysis
- Used across all transactions for consistent organization
- React 18 with TypeScript for type-safe component development
- React Router for seamless navigation
- Recharts for interactive data visualizations
- Tailwind CSS for modern, responsive styling
- Lucide React for consistent iconography
- shadcn/ui components for polished UI elements
- Vite for fast development and optimized builds
- Spring Boot 3.x for RESTful API development
- Jakarta Persistence (JPA) with Hibernate for ORM
- SQLite lightweight embedded database
- Spring Data JPA for simplified data access
- Bean Validation for DTO validation
- CORS configuration for frontend integration
- DTO Pattern: Separation of API contracts from domain models
- Repository Pattern: Data access abstraction
- Service Layer: Business logic encapsulation
- RESTful Design: Standard HTTP methods and status codes
.
βββ frontend/
β βββ src/
β βββ components/
β β βββ charts/ # Data visualization components
β β βββ dashboard/ # Dashboard widgets
β β βββ forms/ # Form components for data entry
β β βββ layout/ # Layout components
β β βββ ui/ # Reusable UI components
β βββ pages/ # Main application pages
β βββ services/
β β βββ api.ts # API service layer
β βββ types/
β β βββ api.ts # TypeScript type definitions
β βββ lib/
β βββ utils.ts # Utility functions
β
βββ backend/
βββ src/main/java/com/example/finances/
βββ controller/ # REST endpoints
β βββ AccountController.java
β βββ TransactionController.java
β βββ DebtController.java
β βββ CategoryController.java
β βββ UserController.java
βββ service/ # Business logic layer
β βββ AccountService.java
β βββ TransactionService.java
β βββ DebtService.java
β βββ CategoryService.java
β βββ UserService.java
βββ repository/ # Data access layer
β βββ AccountRepository.java
β βββ TransactionRepository.java
β βββ DebtRepository.java
β βββ CategoryRepository.java
β βββ UserRepository.java
βββ model/ # JPA entities
β βββ Account.java
β βββ Transaction.java
β βββ Debt.java
β βββ Category.java
β βββ User.java
βββ dto/ # Data Transfer Objects
β βββ CreateAccountDTO.java
β βββ CreateTransactionDTO.java
β βββ CreateDebtDTO.java
β βββ TransactionResponseDTO.java
βββ config/
βββ DataInitializer.java # Database initialization
GET /accounts- Get all accountsGET /accounts/{id}- Get account by IDGET /accounts/user/{userId}- Get accounts by userPOST /accounts- Create new accountPUT /accounts/{id}- Update accountDELETE /accounts/{id}- Delete account
GET /transactions- Get all transactionsGET /transactions/{id}- Get transaction by IDGET /transactions/user/{userId}- Get user's transactionsGET /transactions/account/{accountId}- Get account's transactionsGET /transactions/category/{categoryId}- Get transactions by categoryPOST /transactions- Create new transactionPUT /transactions/{id}- Update transactionDELETE /transactions/{id}- Delete transaction
GET /debts- Get all debtsGET /debts/{id}- Get debt by IDGET /debts/user/{userId}- Get user's debtsGET /debts/user/{userId}/active- Get active debtsGET /debts/user/{userId}/paid-off- Get paid-off debtsGET /debts/user/{userId}/total-remaining- Get total remaining debtPOST /debts- Create new debtPOST /debts/{id}/payment- Make payment on debtPUT /debts/{id}- Update debtDELETE /debts/{id}- Delete debt
GET /categories- Get all categoriesGET /categories/{id}- Get category by IDPOST /categories- Create new categoryPUT /categories/{id}- Update categoryDELETE /categories/{id}- Delete category
- Node.js 18+ and npm
- Java 17+
- Maven 3.6+
- Navigate to backend directory
cd backend- Build the project
mvn clean install- Run the application
mvn spring-boot:runThe API will be available at http://localhost:8080
Database Initialization: On first run, the application automatically creates:
- SQLite database file (
finances.db) - Initial schema with all tables
- Default user (ID: 1)
- Sample categories (Other, Rent, Groceries, Shopping, Transportation, Restaurants)
- Default chequing account
- Navigate to frontend directory
cd frontend- Install dependencies
npm install- Start development server
npm run dev- Build for production
npm run buildThe application will be available at http://localhost:5173
- Frontend: User fills out transaction form with amount, description, category
- API Call:
POST /transactionswithCreateTransactionDTO - Validation: Spring validates DTO with Bean Validation annotations
- Service Layer:
- Fetches related entities (Account, User, Category, optional Debt)
- Creates Transaction entity
- Calculates and updates account balance
- Repository: Persists transaction to SQLite database
- Response: Returns saved transaction with all relationships populated
- Frontend Update: Refreshes transaction list and updates charts
Balances are calculated in real-time based on transaction history:
- Income transactions: Add to account balance
- Expense transactions: Subtract from account balance
- Transfers: Create paired transactions (expense in source, income in destination)
Separates API contracts from domain models to:
- Prevent over-fetching of lazy-loaded relationships
- Provide clean API interfaces
- Enable validation at the API boundary
- Avoid circular serialization issues
public class CreateTransactionDTO {
@NotNull(message = "Amount is mandatory")
@DecimalMin(value = "0.01", message = "Amount must be positive")
private Double amount;
@NotBlank(message = "Description is mandatory")
private String description;
@Pattern(regexp = "^(income|expense)$")
private String type;
}Spring Data JPA repositories provide:
- Automatic CRUD operations
- Custom query methods with naming conventions
- Complex queries with
@Queryannotations - Type-safe data access
public interface DebtRepository extends JpaRepository<Debt, Integer> {
Optional<List<Debt>> findByUserId(User userId);
@Query("SELECT d FROM Debt d WHERE d.userId = :user AND d.amountPaid < d.totalOwed")
List<Debt> findActiveDebtsByUser(@Param("user") User userId);
}Encapsulates business logic:
- Transaction management
- Validation beyond basic constraints
- Calculated fields (debt progress, remaining balance)
- Cross-entity operations (transfers, debt payments)
- Pages: Route-level components managing data fetching and state
- Forms: Reusable form components with validation
- UI Components: Atomic, styled components from shadcn/ui
- Charts: Recharts integration for data visualization
Uses React hooks for local state:
useStatefor component stateuseEffectfor data fetching on mount- No global state library needed for current scope
Full TypeScript coverage:
- API types match backend DTOs
- Type-safe API service layer
- Compile-time error detection
Lightweight embedded database ideal for:
- Single-user applications
- No separate database server needed
- File-based storage
- Zero configuration
-- Users table (single user in this version)
CREATE TABLE users (
user_id INTEGER PRIMARY KEY AUTOINCREMENT
);
-- Accounts with cascade delete
CREATE TABLE accounts (
account_id INTEGER PRIMARY KEY AUTOINCREMENT,
user_id INTEGER NOT NULL,
account_name TEXT NOT NULL,
account_balance REAL NOT NULL,
FOREIGN KEY (user_id) REFERENCES users(user_id) ON DELETE CASCADE
);
-- Transactions with multiple relationships
CREATE TABLE transactions (
transaction_id INTEGER PRIMARY KEY AUTOINCREMENT,
account_id INTEGER NOT NULL,
user_id INTEGER NOT NULL,
category_id INTEGER,
debt_id INTEGER,
amount REAL NOT NULL,
description TEXT NOT NULL,
transaction_date DATE NOT NULL,
type TEXT NOT NULL CHECK (type IN ('income', 'expense')),
recurrence TEXT CHECK (recurrence IN ('weekly', 'monthly', 'yearly')),
FOREIGN KEY (user_id) REFERENCES users(user_id) ON DELETE CASCADE,
FOREIGN KEY (account_id) REFERENCES accounts(account_id) ON DELETE CASCADE,
FOREIGN KEY (category_id) REFERENCES categories(category_id) ON DELETE SET NULL,
FOREIGN KEY (debt_id) REFERENCES debts(debt_id) ON DELETE SET NULL
);Historical balances calculated by:
- Starting with current balance
- Working backwards through transactions to find initial balance
- Building forward timeline showing balance after each transaction
- Displaying last 12 data points in line chart
Payment flow:
- Validate payment amount > 0
- Check payment doesn't exceed remaining balance
- Update
amountPaidfield - Automatically calculate
remainingBalanceandpaymentProgress - Return updated debt with calculated fields
Transfer creates two transactions:
- Expense in source account with description "Transfer to [destination]"
- Income in destination account with description "Transfer from [source]"
- Both use "Other" category by default
- Maintains audit trail of money movement
DataInitializer component runs on startup:
- Checks if data exists (
userRepository.count()) - Creates default user if none exists
- Sets up initial categories
- Creates default chequing account
- Uses
@PostConstructfor automatic execution
- Budget planning and forecasting with AI suggestions
- Bill reminders and push notifications
- Multi-currency support with exchange rates
- Data export (CSV, PDF reports)
- Investment portfolio tracking with real-time quotes
- Goal setting with progress tracking
- Multi-user support with authentication
- Mobile responsive improvements
- Dark mode theme
- Advanced reporting and analytics dashboard
- Scheduled/recurring transaction automation
- Bank account integration (Plaid API)
cd backend
mvn testcd frontend
npm testThis is a personal project, but suggestions and feedback are welcome!
This project is for educational and portfolio purposes.
Built with modern full-stack technologies: React + TypeScript + Spring Boot + SQLite