A graph-based expense settlement system that minimizes redundant transactions using a minimum cash flow algorithm.
PaySmart – Peer-to-Peer Expense Splitter with Debt Simplification
One-line Project Description:
A smart expense-sharing platform that reduces unnecessary payment chains by applying graph-based optimization to minimize total settlement transactions.
Peer-to-Peer Expense Splitter with Debt Simplification
Shared expenses among flatmates, travel groups, colleagues, and families often create complex debt chains. Most existing expense-sharing tools only calculate balances but fail to optimize settlements, leading to redundant transactions and confusion.
Common challenges:
- Complex debt loops among participants
- Redundant payment chains
- Lack of clarity on who owes whom
- Recurring expenses complexity
- Partial payment management
- Currency rounding edge cases
There is no intelligent optimization layer that simplifies settlements using graph-based algorithms.
- College students sharing rent
- Travel groups
- Flatmates
- Small teams
- Families managing shared expenses
- No transaction minimization
- No optimization algorithm
- No graph visualization
- No structured debt simplification
- Manual and inefficient settlement process
Debt complexity occurs because:
- Expenses are recorded separately
- Cross-payments create cycles
- No netting of balances
- No settlement optimization logic
This increases transaction count unnecessarily.
- Record all expenses clearly
- Compute net balance for each participant
- Apply a Minimum Cash Flow Algorithm
- Generate optimized settlement transactions
- Visualize before and after optimization
PaySmart intelligently reduces group payment complexity by minimizing the number of transactions required to settle debts.
Transform messy multi-party debt chains into the smallest possible number of transactions using a greedy graph-based optimization approach.
- Add participants
- Log shared expenses
- Equal and custom splits
- Net balance calculation
- Minimum transaction optimization
- Debt graph visualization (before & after)
- Partial payment handling
- Currency rounding safety
User → Frontend → Backend → Optimization Engine → Database → Response
- Frontend collects user inputs and displays results
- Backend processes expense and balance calculations
- Optimization Engine runs minimum cash flow algorithm
- Database stores users, expenses, transactions
- Response returns optimized settlements to UI
Entities:
- Users
- Groups
- Expenses
- Transactions
Relationships:
- One Group → Many Users
- One Expense → One Payer
- One Expense → Many Participants
- Transactions store optimized settlements
User-Generated Expense Data
Application Input
Structured financial transaction data
The system processes real-time user-generated expense data.
- Validate numeric inputs
- Handle rounding precision (2 decimal places)
- Normalize split shares
- Ensure total balance equals zero
Minimum Cash Flow Algorithm (Greedy Approach)
- Minimizes total transactions
- Efficient and deterministic
- Suitable for real-time execution
- Easy to scale for small-medium groups
- Linear programming optimization
- Network flow algorithms
- Cycle detection algorithms
- Reduction in transaction count
- Accuracy of settlement
- Algorithm execution time
- HTML
- CSS
- JavaScript / React
- Node.js / Express
- Algorithm-based optimization (No ML model)
- MongoDB / PostgreSQL
- Vercel / Localhost / Netlify
POST /add-expense
GET /balances
GET /optimize
(Add Postman or Thunder Client screenshots here)
Deliverables:
- Problem analysis
- Algorithm design
- UI wireframes
Deliverables:
- Expense logging API
- Balance calculation logic
Deliverables:
- User interface
- Expense entry forms
- Balance display table
Deliverables:
- Minimum cash flow algorithm
- Settlement reduction engine
Deliverables:
- Backend integration
- API connection to frontend
Deliverables:
- Hosted application
- Public GitHub repository
- User creates group
- Adds participants
- Logs expenses
- System calculates net balances
- Optimization engine runs
- Settlement plan generated
- Visualization displayed
Live Demo Link: (Add link here)
Demo Video Link: (Add link here)
GitHub Repository: https://github.com/RishiByte/PaySmart
- Functional expense logging system
- Optimized settlement engine
- Graph visualization
- API documentation
- Deployed demo
| Member Name | Role | Responsibilities |
|---|---|---|
| Rishi Bhardwaj | Backend & Algorithm | Optimization logic, APIs |
| Abhyuday Singh Dhapola | Frontend | UI design & visualization |
| Ipsit Debnath | Database & Testing | Schema design & API testing |
- Mobile responsive UI
- Multi-currency support
- Export settlement summary as PDF
- Payment gateway integration
- Blockchain-based transaction ledger
- AI-based expense categorization
- Multi-group support
- Greedy algorithm minimizes transaction count but not total transfer volume
- Designed for small-to-medium groups
- No real-time payment integration
- Reduces unnecessary financial transactions
- Improves settlement transparency
- Saves time in coordination
- Demonstrates practical graph optimization in real-world finance

