Design: Bill Splitter System
Design focuses on the core logic and architecture for split strategies and participant management. UI design, payment processing, and user authentication are out of scope.
Functional Requirements
FR1: Allow users to split a bill among multiple participants using different strategies: equal, exact, and percentage.
FR2: Equal split divides the total amount equally among all participants.
FR3: Exact split allows specifying the exact amount each participant pays.
FR4: Percentage split allows specifying the percentage of the total amount each participant pays.
FR5: Validate that the sum of exact amounts or percentages matches the total bill amount.
FR6: Support adding, updating, and removing participants and their split details.
FR7: Provide a summary of each participant's payable amount.
FR8: Handle bills with up to 100 participants.
Non-Functional Requirements
NFR1: The system should respond within 200ms for split calculations.
NFR2: Support concurrent updates from multiple users on the same bill with consistency.
NFR3: Ensure data accuracy and validation to prevent incorrect splits.
NFR4: Availability target of 99.9% uptime.
NFR5: Memory usage should be optimized for mobile and web clients.