Service Layer medium complexity backend
0
Dependencies
0
Dependents
2
Entities
0
Integrations

Description

Orchestrates all business logic for course browsing, registration, and completion tracking. Acts as the intermediary between the UI layer and CourseRepository, enforcing enrollment rules, triggering certification status updates on completion, and coordinating with push notification delivery for reminders.

Feature: Course Registration

course-service

Sources & reasoning

HLF explicitly requires in-app course registration as part of their certification workflow (line 114), and Barnekreftforeningen shares the need for onboarding and follow-up training (line 123). The priority matrix (line 155) marks this SHOULD Phase 3, confirming v1.1 per third-phase normalization. The feature is foundational to certification-training and directly enables the certificate and renewal reminder features.

  • Kursadministrasjon og sertifisering: Påmelding til kurs i appen, automatisk påminnelse ved utløp, digitale sertifikater. Det fysiske kortet er et «adelsmerke» og skal leve parallelt.
  • Kursadministrasjon (delt med HLF) for opplæring av nye likepersoner og oppfølgingskurs.
  • Kursadministrasjon / sertifisering | ✓ | - | - | ✓ | ✓ | SHOULD (HLF + Barnekreft) | 3

Responsibilities

  • Fetch and filter available courses based on user role and organizational context
  • Validate enrollment eligibility and process registration requests
  • Record course completions and emit events to the certification workflow
  • Coordinate with notification services to send enrollment confirmations and reminders
  • Expose course enrollment state for display in profile and certification screens

Interfaces

getAvailableCourses(userId: string, filter?: CourseFilter): Promise<Course[]>
registerForCourse(userId: string, courseId: string): Promise<RegistrationResult>
completeCourse(userId: string, courseId: string): Promise<CompletionResult>
getEnrollmentStatus(userId: string, courseId: string): Promise<EnrollmentStatus>
getUserCourseHistory(userId: string): Promise<CourseEnrollment[]>

Related Data Entities (2)

Data entities managed by this component