Mentor Status Service
Component Detail
Service Layer
low complexity
Shared Component
mobile
0
Dependencies
1
Dependents
4
Entities
0
Integrations
Description
Riverpod service that manages peer mentor status transitions (active ↔ paused) via the REST API, enforcing atomic writes and handling backend validation errors such as expired certifications.
mentor-status-service
Sources & reasoning
The Mentor Status Service is the single service layer responsible for all peer mentor status lifecycle transitions. It is shared between pause-function and resume-function since both features mutate the same peer_mentor_statuses record via the same REST endpoint and require the same coordinator notification dispatch logic.
No source references — this artifact was included based on reasoning alone (see above).
Responsibilities
- Execute atomic status transition from paused to active on the backend
- Clear paused_at and reset status field in peer_mentor_statuses
- Handle certification-expiry validation error returned by backend
- Dispatch coordinator push notification after successful reactivation
- Support offline outbox for status transitions on network failure
Interfaces
pauseMentor(userId)
resumeMentor(userId)
getMentorStatus(userId)
handleCertificationExpiredError()
notifyCoordinatorOnResume(userId)
Relationships
Related Data Entities (4)
Data entities managed by this component