π° Expense Split Application
A full-stack web application to manage and split expenses among groups, similar to Splitwise. This project is built using Spring Boot (Backend) and HTML, CSS, JavaScript (Frontend).
π Features
π€ User Management: Create and manage users
π₯ Group Management: Create groups and add members,
πΈ Expense Management: Add expenses within groups, Split expenses among members
π Settlement System: Track balances, Settle debts between users
π Net Balance Calculation: Optimized settlement logic to minimize transactions
π οΈ Tech Stack
πΉ Backend-- Java, Spring Boot, Spring Web, Spring Data JPA, REST APIs
πΉ Frontend-- HTML, CSS, JavaScript
πΉ Database-- (Configured via application.properties, likely MySQL or H2)
βοΈ Backend Architecture
The backend follows a layered architecture:
- Controller Layer
Handles HTTP requests:UserController, GroupController, ExpensesController, TransactionController
- Service Layer
Contains business logic:Expense splitting logic, Balance calculation, Settlement optimization
- Repository Layer
Uses Spring Data JPA:Interfaces for database operations
- Entity Layer
Main entities:User, Group, Expenses, Split, Transactions, Members
- DTOs
Request & Response objects, Clean API structure
- Exception Handling
Global exception handler
Custom exceptions:UserNotFoundException, GroupNotFoundException, SplitNotFoundException
π API Endpoints (Overview)
π€ User APIs Create User Get Users
π₯ Group APIs Create Group Add Members Get Group Details
πΈ Expense APIs Add Expense Split Expense Get Expense Details
π Transaction APIs Settle Payments Get Balance Summary
π§ Core Logic Expense Splitting Equal split among group members Tracks who owes whom Net Settlement Minimizes number of transactions Converts multiple debts into optimized payments
πΉ Backend--
Navigate to project folder
cd Expense-Split
Run Spring Boot app:
mvn spring-boot:run
Server runs at:
πΉ Frontend--
Open index.html in browser
OR
Serve using Live Server (recommended)
π§ͺ Testing--
Postman collection available in project
Test all APIs using provided endpoints
π Future Enhancements
π Authentication & Authorization (JWT)
π± Mobile responsive UI improvements
π Advanced analytics (charts)
π§ Notifications & reminders
π³ Payment integration
π€ Contribution
Feel free to fork this repository and contribute!