Design: Fine Calculation System
Design the core fine calculation logic, rule management, and API interfaces. Out of scope: payment processing, user authentication system.
Functional Requirements
FR1: Calculate fines based on different violation types (e.g., traffic, library, late payment).
FR2: Support multiple fine rules that can change over time.
FR3: Allow querying fine details for a given violation.
FR4: Provide an API to add new violations and calculate fines automatically.
FR5: Support user roles: admin (manage rules), user (view fines).
Non-Functional Requirements
NFR1: Handle up to 10,000 fine calculations per day.
NFR2: API response time p99 under 200ms.
NFR3: System availability 99.9%.
NFR4: Rules must be versioned and auditable.
