Service Layer low complexity mobilebackend
1
Dependencies
1
Dependents
3
Entities
0
Integrations

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.

Feature: Digital Peer Mentor Certificate

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

Dependencies (1)

Components this component depends on

Dependents (1)

Components that depend on this component

Related Data Entities (3)

Data entities managed by this component