-
Notifications
You must be signed in to change notification settings - Fork 55
Description
Type: Feature | Difficulty: Level 3 | Tags: Backend, Graph-Theory, Collaboration
Description: Implement a "Simplify Debts" feature for Workspaces (similar to Splitwise). If Person A owes B, and B owes C, the system should automatically optimize the graph to show A owes C, reducing the number of total transactions.
Core Requirements:
Backend Logic: Implement a Settlement Minimization Algorithm (greedy or max-flow based) to simplify intra-workspace IOUs.
Settlement Model: Create a Settlement model to track payments, confirmations (accept/reject), and balance adjustments.
Real-Time Ledger: Use Socket.io to broadcast settlement requests to members.
Frontend: A "Settlement Center" with a visual graph or list of optimized payments needed to reach "Zero Balances."
Files to be changed: services/settlementService.js,
models/Settlement.js
, models/Split.js,
routes/splits.js
public/workspace-feature.js
server.js
public/index.html