Certificate Service
Component Detail
Description
Backend-aware service that fetches the current user's certification record from the REST API and exposes it to the UI layer. Determines certification completeness by verifying all required course_enrollments for the certification type are marked complete. Handles server-side certificate creation or update when enrollment requirements are fulfilled.
certificate-service
Sources & reasoning
Business logic layer required to coordinate between course enrollment state and certificate issuance. The server must create or update the certification record when enrollments are complete - this service encapsulates that logic and provides the UI with a clean data interface.
No source references — this artifact was included based on reasoning alone (see above).
Responsibilities
- Fetch certification record for current user from REST API
- Check course_enrollment completion status to determine certification eligibility
- Trigger certificate creation or update on the server when all enrollments are complete
- Cache certification record locally via Drift for offline reads
Interfaces
getCertification(String userId): Future<CertificationRecord?>
isCertificationEligible(String userId, String certType): Future<bool>
refreshCertification(): Future<CertificationRecord>
Relationships
Related Data Entities (3)
Data entities managed by this component