A powerful, full-stack desktop application for tracking personal finances with an intuitive user interface and robust backend architecture. Built with modern Java technologies to demonstrate enterprise-level software development practices.
- Secure Authentication - User registration and login system
- Email Validation - Built-in email format validation using Apache Commons Validator
- User Profile Management - Track user creation dates and account information
- CRUD Operations - Full create, read, update, and delete functionality for transactions
- Transaction Categorization - Organize expenses and income by custom categories
- Transaction Types - Support for both income and expense tracking
- Date Tracking - Record transaction dates with precise timestamp logging
- Pagination Support - Efficiently handle large transaction histories with paginated API responses
- Custom Categories - Create personalized expense/income categories
- Color Coding - Visual identification with customizable color schemes
- Category Management - Full CRUD operations for transaction categories
- User-Specific Categories - Each user maintains their own category library
- Balance Summary - Real-time display of current balance, total income, and total expenses
- Recent Transactions - Quick view of latest financial activities
- Responsive UI - Adaptive layout with custom CSS styling
src/
βββ config
β βββ BCryptConfig
β βββ SecurityConfig
β
βββ controllers/ # REST API endpoints
β βββ UserController
β βββ TransactionController
β βββ TransactionCategoryController
β
βββ services/ # Business logic layer
β βββ UserService
β βββ TransactionService
β βββ TransactionCategoryService
β
βββ repositories/ # Data access layer (JPA)
β
βββ models/ # JPA entities
β βββ User
β βββ Transaction
β βββ TransactionCategory
β
βββ DTO/ # Data Transfer Objects
β
βββ exceptions/ # Custom exception handling
β
βββ repositories/ # repositories
β
βββExpenseTrackerApplicatoin.java # main app
src/
βββ animations/
β βββ LoadingAnimationPane
β
βββ components/
β βββ CategoryComponent
β βββ TransactionComponent
β
βββ controllers/
β βββ DashboardController
β βββ LoginController
β βββ SignUpController
β
βββ dialogs/
β βββ CreateNewTransactionCategoryDialog
β βββ CreateOrEditTransactionDialog
β βββ CustomDialog
β βββ ViewChartDialog
β βββ ViewOrEditTransactionCategoryDialog
β βββ ViewTransactionDialog
β
βββ models/
β βββ MonthlyFinance
β βββ Transaction
β βββ TransactionCategory
β βββ User
β
βββ utils/
β βββ ApiUtil # HTTP client for backend communication
β βββ SqlUtil # Data operations wrapper
β βββ Utility # contains application constants
β βββ ViewNavigator # Scene management
β
βββ views/ # JavaFX UI components
β βββ LoginView
β βββ SignUpView
β βββ DashboardView
βββ JavaFXApplication.java
| Technology | Purpose |
|---|---|
| Spring Boot 3.x | Core framework for REST API development |
| Spring Data JPA | Object-relational mapping and database operations |
| Hibernate | JPA implementation for entity management |
| Lombok | Reduce boilerplate code with annotations |
| Jakarta Validation | Input validation and data integrity |
| MySQL/PostgreSQL | Relational database (configurable) |
| Technology | Purpose |
|---|---|
| JavaFX 23 | Rich desktop UI framework |
| GSON | JSON parsing and serialization |
| Apache Commons Validator | Email and input validation |
| Custom CSS | Styled UI components |
- Maven - Dependency management and build automation
- Git - Version control
- Postman/Insomnia - API testing (recommended)
Before running this application, ensure you have:
- Java Development Kit (JDK) 25 or higher
- Maven 3.8+
- MySQL 8.0+ or PostgreSQL 14+
git clone https://github.com/AbdullahAbdelaziz122/smart-spend-expense-tracker.gitCREATE DATABASE expense_tracker;
CREATE USER 'expense_user'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON expense_tracker.* TO 'expense_user'@'localhost';
FLUSH PRIVILEGES;Navigate to backend/src/main/resources/application.properties:
# Database Configuration
spring.datasource.url=jdbc:mysql://localhost:3306/expense_tracker
spring.datasource.username=expense_user
spring.datasource.password=your_password
# JPA Configuration
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect
# Server Configuration
server.port=8080cd backend
mvn clean install
mvn spring-boot:runThe backend API will be available at http://localhost:8080
Update frontend/src/main/java/org/example/utils/ApiUtil.java if needed:
private static final String SPRINGBOOT_URL = "http://localhost:8080";cd frontend
mvn clean javafx:runGet All Endpoints: https://l23i72f0hh.apidog.io
POST /api/v1/user/register
Content-Type: application/json
{
"name": "John Doe",
"email": "john@example.com",
"password": "securePassword123"
}POST /api/v1/user/login
Content-Type: application/json
{
"email": "john@example.com",
"password": "securePassword123"
}GET /api/v1/user/{userId}GET /api/v1/user?email=john@example.comPOST /api/v1/transaction
Content-Type: application/json
{
"name": "Grocery Shopping",
"amount": 125.50,
"type": "EXPENSE",
"date": "2024-01-15",
"userId": 1,
"categoryId": 3
}GET /api/v1/transaction/{userId}GET /api/v1/transaction/recent/user/{userId}?page=0&size=5PUT /api/v1/transaction
Content-Type: application/json
{
"id": 10,
"name": "Updated Transaction",
"amount": 150.00,
"type": "EXPENSE",
"date": "2024-01-16",
"categoryId": 4
}DELETE /api/v1/transaction/{transactionId}POST /api/v1/transaction-category
Content-Type: application/json
{
"userId": 1,
"categoryName": "Food & Dining",
"categoryColor": "FF5733"
}GET /api/v1/transaction-category/user/{userId}PUT /api/v1/transaction-category
Content-Type: application/json
{
"categoryId": 5,
"categoryName": "Updated Category Name",
"categoryColor": "00FF00"
}DELETE /api/v1/transaction-category/{categoryId}CREATE TABLE user (
id BIGINT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
email VARCHAR(255) NOT NULL UNIQUE,
password VARCHAR(255) NOT NULL,
created_at DATE NOT NULL
);CREATE TABLE transaction_category (
id BIGINT PRIMARY KEY AUTO_INCREMENT,
user_id BIGINT NOT NULL,
category_name VARCHAR(255) NOT NULL,
category_color VARCHAR(50) NOT NULL,
FOREIGN KEY (user_id) REFERENCES user(id) ON DELETE CASCADE
);CREATE TABLE transactions (
id BIGINT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
amount DOUBLE NOT NULL,
transaction_date DATE,
created_at DATETIME NOT NULL,
type VARCHAR(50),
user_id BIGINT NOT NULL,
category_id BIGINT NOT NULL,
FOREIGN KEY (user_id) REFERENCES user(id) ON DELETE CASCADE,
FOREIGN KEY (category_id) REFERENCES transaction_category(id)
);- MVC (Model-View-Controller) - Separation of concerns in REST API
- Repository Pattern - Data access abstraction with Spring Data JPA
- Service Layer Pattern - Business logic encapsulation
- DTO Pattern - Data transfer between layers
- Dependency Injection - Using Spring's IoC container
- Exception Handling - Global exception handling with custom exceptions
- MVC Pattern - Separation of UI, controllers, and models
- Singleton Pattern - ViewNavigator for scene management
- Utility Pattern - Helper classes for common operations
- Observer Pattern - JavaFX property bindings and listeners
- β Input validation on both frontend and backend
- β Custom exception handling for error management
- β Email format validation
- β User-category ownership verification
- β Password Hashing Using BCrypt
- π§ JWT Authentication - Add token-based authentication for API security
- π§ HTTPS/TLS - Enable secure communication in production
- π§ Input Sanitization - Additional XSS and SQL injection prevention
- π§ Rate Limiting - Protect against brute force attacks
- Data Visualization - Charts and graphs for spending patterns
- Budget Management - Set monthly/category budgets with alerts
- Recurring Transactions - Automated tracking of subscriptions
- Export Functionality - PDF/Excel reports generation
- Multi-Currency Support - Handle international transactions
- Search & Filters - Advanced transaction filtering
- Mobile App - React Native or Flutter companion app
- Cloud Deployment - AWS/Azure hosting with CI/CD pipeline
- JWT-based authentication
- Redis caching for performance
- Docker containerization
- Comprehensive test coverage (80%+)
- API documentation with Swagger/OpenAPI