Description
There is no enrollment flow in the UI. Learners cannot enroll in a course from the frontend — clicking a course just opens the viewer but does not register the learner on-chain or in the backend.
What Needs to Be Done
- Add an "Enroll" button to the course detail / course card view
- On click:
- Call
CourseMilestone.enroll(learner, courseId) on-chain via the connected wallet
- Call
POST /api/enrollments to record enrollment in the backend
- After enrollment, redirect to the first lesson
- Show "Enrolled" badge if already enrolled (check
is_enrolled())
- Gate lesson content behind enrollment check
Acceptance Criteria
Files Affected
src/components/CourseCard.tsx
src/hooks/useEnrollment.ts (create)
server/src/routes/enrollments.routes.ts (create)
Labels
frontend, backend, integration, help wanted, Stellar Wave
Description
There is no enrollment flow in the UI. Learners cannot enroll in a course from the frontend — clicking a course just opens the viewer but does not register the learner on-chain or in the backend.
What Needs to Be Done
CourseMilestone.enroll(learner, courseId)on-chain via the connected walletPOST /api/enrollmentsto record enrollment in the backendis_enrolled())Acceptance Criteria
Files Affected
src/components/CourseCard.tsxsrc/hooks/useEnrollment.ts(create)server/src/routes/enrollments.routes.ts(create)Labels
frontend,backend,integration,help wanted,Stellar Wave