> ## Documentation Index
> Fetch the complete documentation index at: https://memberpulseptyltd.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# UJ-M-013: Enroll in Course

> Member enrolls in an online course to begin learning

## Journey Overview

| Attribute      | Value                                           |
| -------------- | ----------------------------------------------- |
| **Journey ID** | UJ-M-013                                        |
| **Actor**      | Member                                          |
| **Goal**       | Enroll in a course to start learning            |
| **Trigger**    | Member finds course of interest                 |
| **Outcome**    | Member has course access and can begin learning |

## Preconditions

* Course exists and is published
* Member meets any prerequisites
* For paid courses: Member can make payment
* For member-only courses: User has active membership

## Journey Flow

```mermaid theme={null}
flowchart TD
    A[Browse courses] --> B[View course details]
    B --> C{Meets prerequisites?}
    C -->|No| D[Show prerequisite requirements]
    C -->|Yes| E{Course pricing?}
    E -->|Free| F[Click Enroll]
    E -->|Paid| G[Add to cart / Checkout]
    E -->|Included in membership| F
    F --> H[Enrollment created]
    G --> I[Complete payment]
    I --> J{Payment successful?}
    J -->|Yes| H
    J -->|No| K[Payment retry]
    H --> L[Welcome email sent]
    L --> M[Course accessible]
    M --> N[Begin learning]
```

## Detailed Steps

<Steps>
  <Step title="Browse Courses">
    Member discovers courses:

    **Discovery Methods:**

    * Learning menu → Course catalog
    * Dashboard recommendations
    * Email promotions
    * Event follow-up (related courses)
    * Search results

    **Course Card Shows:**

    * Course title and thumbnail
    * Duration and module count
    * Difficulty level
    * CPD points available
    * Price or "Included" badge
    * Rating/reviews (if enabled)
  </Step>

  <Step title="View Course Details">
    Course detail page includes:

    | Section       | Content                          |
    | ------------- | -------------------------------- |
    | Overview      | Description, learning objectives |
    | Curriculum    | Modules and lessons outline      |
    | Instructor    | Bio and credentials              |
    | Reviews       | Student feedback                 |
    | Requirements  | Prerequisites, tech requirements |
    | Certification | Certificate details, CPD points  |
    | Pricing       | Cost or membership inclusion     |
  </Step>

  <Step title="Check Eligibility">
    System validates enrollment eligibility:

    **Checks:**

    * Already enrolled? → Show "Continue Course"
    * Prerequisites completed? → Show requirements
    * Membership required? → Prompt to upgrade
    * Course available? → Check dates, capacity

    **Prerequisite Display:**

    ```
    ┌─────────────────────────────────────────┐
    │ Prerequisites Required                  │
    ├─────────────────────────────────────────┤
    │ Complete these courses first:           │
    │                                         │
    │ ☑ Introduction to Finance (Completed)  │
    │ ☐ Accounting Fundamentals (0% done)    │
    │                                         │
    │ [Go to Accounting Fundamentals]         │
    └─────────────────────────────────────────┘
    ```
  </Step>

  <Step title="Enroll (Free/Included)">
    For free courses or courses included in membership:

    1. Click "Enroll Now" or "Start Learning"
    2. Confirm enrollment (optional step)
    3. Enrollment record created
    4. Redirected to first lesson

    **Instant Access:**

    * No payment required
    * Immediate course access
    * Progress tracking begins
  </Step>

  <Step title="Purchase (Paid Courses)">
    For paid courses not included in membership:

    **Purchase Flow:**

    1. Click "Buy Course" or "Add to Cart"
    2. Review order (course, price, any discounts)
    3. Apply promo code (if available)
    4. Enter payment details (Stripe)
    5. Complete purchase

    **Order Summary:**

    ```
    ┌─────────────────────────────────────────┐
    │ Order Summary                           │
    ├─────────────────────────────────────────┤
    │ Advanced Leadership Course       $199   │
    │ Member Discount (20%)            -$40   │
    ├─────────────────────────────────────────┤
    │ Total                            $159   │
    └─────────────────────────────────────────┘
    ```
  </Step>

  <Step title="Enrollment Confirmed">
    On successful enrollment:

    **Immediate:**

    * Enrollment record created
    * Course appears in "My Courses"
    * First lesson unlocked
    * Welcome notification

    **Email Sent:**

    * Enrollment confirmation
    * Course access instructions
    * Getting started guide
    * Support contact

    **Dashboard Update:**

    * "Continue Learning" widget shows course
    * Progress initialized at 0%
  </Step>

  <Step title="Begin Learning">
    Member starts course:

    * Click "Start Course" or "Continue"
    * First lesson/module opens
    * Progress tracked automatically
    * Bookmark/resume functionality
  </Step>
</Steps>

## Enrollment Types

| Type            | Description                  | Payment           |
| --------------- | ---------------------------- | ----------------- |
| Free            | Open to all                  | None              |
| Member-Included | Part of membership benefits  | Membership covers |
| Premium         | Additional purchase required | One-time payment  |
| Subscription    | Access while subscribed      | Recurring fee     |

## Course Access Levels

| Membership Tier | Course Access              |
| --------------- | -------------------------- |
| Free/Basic      | Free courses only          |
| Standard        | Free + Standard courses    |
| Premium         | All courses included       |
| Non-member      | Free + can purchase others |

## Bulk Enrollment (Corporate)

For group/corporate memberships:

* Admin enrolls team members
* Bulk enrollment tool
* Progress reporting per user
* Separate journey: Client Portal

## Related Entities

* [`Course`](/entities/core/course)
* [`Course Enrollment`](/entities/core/course-enrollment)
* [`Payment Transaction`](/entities/integration/payment-transaction)

## Related Journeys

* [UJ-M-014](/member/journeys/complete-course)
* [UJ-M-015](/member/journeys/track-cpd)

## Acceptance Criteria

### Frontend

* [ ] Course catalog with filters
* [ ] Course detail page with curriculum
* [ ] Prerequisite check display
* [ ] Enroll button (free/included)
* [ ] Purchase flow (paid courses)
* [ ] My Courses dashboard
* [ ] Enrollment confirmation page
* [ ] Mobile-responsive design

### Backend

* [ ] `GET /api/courses` - Course catalog
* [ ] `GET /api/courses/{id}` - Course details
* [ ] `POST /api/courses/{id}/enroll` - Create enrollment
* [ ] `GET /api/courses/{id}/eligibility` - Check prerequisites
* [ ] `GET /api/member/courses` - My enrolled courses

### Permissions

* [ ] Public courses visible to all
* [ ] Member-only courses require auth
* [ ] Course access requires enrollment

### Business Rules

* [ ] Prerequisites enforced before enrollment
* [ ] Duplicate enrollment prevented
* [ ] Member discounts auto-applied
* [ ] Course capacity limits (if set)

### Error Handling

* [ ] Prerequisites not met message
* [ ] Already enrolled notification
* [ ] Payment failure handling
* [ ] Course unavailable message
