Driver Honorarium Service
Component Detail
Description
Blindeforbundet-specific service managing driver honorarium records and confidentiality declaration lifecycle. Persists honorarium amounts, tracks declaration acknowledgement, and links records to the parent expense and activity.
driver-honorarium-service
Summaries
The Driver Honorarium Service ensures Blindeforbundet meets its legal and organizational obligations when compensating volunteer drivers. By automating honorarium tracking and enforcing confidentiality declaration acknowledgement, the organization reduces compliance risk and administrative overhead associated with manual record-keeping. This directly protects the organization from audit failures and potential regulatory penalties. Accurate honorarium records also improve financial transparency, supporting trust with funders and enabling faster accounting exports at period close.
This is a medium-complexity backend and mobile service with a clear, bounded scope. It depends on the Expense Repository, so sequencing is important — the repository layer must be stable before honorarium logic is built on top of it. Testing should cover eligibility validation rules across all activity types, declaration timestamp accuracy, and period-based reporting queries. A key delivery risk is unclear business rules around eligibility; these must be confirmed with Blindeforbundet stakeholders before implementation to avoid rework in the validation logic.
The Driver Honorarium Service is a domain service running in both mobile and backend execution contexts. It wraps the expense-repository dependency and adds honorarium-specific business logic on top of raw expense persistence. The saveHonorarium interface should atomically persist the amount and declaration acknowledgement with a server-side timestamp to prevent client-side manipulation. getHonorariumsForPeriod will require efficient date-range queries on the underlying expense records — ensure Supabase indexes cover organizationId + timestamp.
validateEligibility should be driven by a configurable activity type allowlist to avoid hardcoded conditionals.
Responsibilities
- Persist driver honorarium amount linked to expense record
- Record confidentiality declaration acknowledgement with timestamp
- Retrieve honorarium records for reporting and accounting export
- Validate honorarium eligibility based on activity type
Interfaces
saveHonorarium(expenseId, amount, declarationAcknowledged)
getHonorariumByExpense(expenseId)
getHonorariumsForPeriod(organizationId, from, to)
validateEligibility(activityType)
Relationships
Related Data Entities (2)
Data entities managed by this component