https://github.com/aswath0001/expense-tracker
Expense Tracker is a financial management application that helps users monitor their spending by recording and categorizing expenses. It provides insights through date-based filtering and visual reports to improve budgeting.
https://github.com/aswath0001/expense-tracker
java postman springboot sql
Last synced: 6 months ago
JSON representation
Expense Tracker is a financial management application that helps users monitor their spending by recording and categorizing expenses. It provides insights through date-based filtering and visual reports to improve budgeting.
- Host: GitHub
- URL: https://github.com/aswath0001/expense-tracker
- Owner: aswath0001
- Created: 2025-08-18T04:31:35.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2025-08-25T12:02:49.000Z (7 months ago)
- Last Synced: 2025-08-25T13:28:56.683Z (7 months ago)
- Topics: java, postman, springboot, sql
- Language: Java
- Homepage:
- Size: 87.9 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Expense Tracker
A robust, scalable,and production-ready expense tracking system built with Spring Boot and MySQL. It supports full financial tracking, user management, split expenses, and real-time balance calculations.
Setup Instructions
Clone the Repository
git clone https://github.com/aswath0001/expense-tracker.git
cd expense-tracker
π Features Overview
1. π€ User Management
β
User Registration β Create new users with email validation
β
Get All Users β Retrieve full list of users
β
Get User by ID β Fetch specific user details
β
Update User β Modify user data
β
Delete User β Remove users with relationship handling
2. πΈ Expense Management
β
Create Expenses β Add new expense records
β
View All Expenses β Full expense history
β
Get Expense by ID β Retrieve specific expense
β
Update Expenses β Modify existing records
β
Delete Expenses β Remove records cleanly
β
Date Range Filtering β Filter expenses by date
β
Title-based Search β Find expenses by name/title
3. π° Income Tracking
β
Record Income β Add income entries
β
View All Income β Complete income log
β
Get Income by ID β Specific income details
β
Update Income β Edit income data
β
Delete Income β Remove entries
4. π₯ Split Expense System
β
Create Splits β Divide expenses among users
β
View All Splits β See all divisions
β
Get Split by ID β Fetch a specific split
β
Settle Splits β Mark splits as settled
β
Delete Splits β Remove records
β
Payer-based Filtering β See what each user owes
β
Payee-based Filtering β See what each user receives
5. π Balance Management
β
Automatic Balance Updates β Real-time balance changes
β
User Balance Tracking β Current financial position
β
Transaction History β Full record of income, expenses, and splits
ποΈ Database Structure
π Core Tables
user β User accounts, balance tracking
expense β Expense records with categories and timestamps
income β Income records with source tracking
split_expense β Shared expenses across users
expense_participant β Links participants in splits
π Key Relationships
Users can create multiple expenses and income entries
Expenses can be split between multiple users
Automatic balance sync between users
Referential integrity using foreign keys
π§ Technical Architecture
βοΈ Backend
Spring Boot 3.x β Modern Java framework
Spring Data JPA β ORM and repository pattern
RESTful APIs β Clean, maintainable, scalable
CORS Enabled β Cross-origin resource sharing
Error Handling β Centralized and descriptive
ποΈ Database
MySQL β Relational database integration
Auto-increment IDs β Primary key management
Foreign Key Constraints β Referential integrity
Transaction Management β ACID-compliant operations
Lazy Loading β Efficient resource use
β
Data Validation
Unique email enforcement
Proper data type validation
Foreign key constraints for relationships
Real-time balance sync logic
π Workflow Example
A user creates an expense: βΉ1000 Dinner
Split with 3 friends β βΉ333.33 each
Automatic balance update:
Payerβs balance: -βΉ666.67
Each payeeβs balance: +βΉ333.33
Splits are marked as settled when paid
π¦ Production-Ready Features
β
Database migrations with schema updates
β
Proper HTTP status codes & error responses
β
Full input validation
β
Optimized SQL queries via JPA
β
Scalable codebase and modular design
π οΈ Getting Started
Prerequisites
Java 17+
Maven
MySQL Server
Configure application.properties
spring.datasource.url=jdbc:mysql://localhost:3306/expense_db
spring.datasource.username=root
spring.datasource.password=your_password
spring.jpa.hibernate.ddl-auto=update
Run the Application
mvn spring-boot:run