Skip to content

Debt-Simplification & Settlement Optimization Engine (Graph Logic) #445

@SatyamPandey-07

Description

@SatyamPandey-07

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions