Skip to content

Perfxcel Workflows

This section documents the key operational workflows in the Perfxcel platform — from learner interest through enrollment, training plan requests, and certificate verification.

Learner Interest → Enrollment

The primary learner journey from discovering a course to becoming an enrolled participant.

stateDiagram-v2
    [*] --> Browsing : Learner visits perfxcel.com
    Browsing --> InterestSubmitted : POST /courses/:id/interest
    InterestSubmitted --> Contacted : Admin updates status
    Contacted --> Converted : Admin creates enrollment
    Converted --> Confirmed : Admin confirms enrollment
    Confirmed --> Completed : Course completed
    InterestSubmitted --> Closed : Not suitable / no follow-up
    Contacted --> Closed : Learner unresponsive

Interest Lifecycle States

State Description
new Just submitted — not yet actioned
contacted Admin has reached out to the learner
converted Converted to an enrollment
closed No further action — not suitable or unresponsive

Enrollment Lifecycle States

State Description
pending Created but not yet confirmed
confirmed Enrollment confirmed, learner will attend
completed Course completed — certificate may be issued
cancelled Enrollment cancelled

Training Plan Request

Organisations can submit a bulk training plan request from the public site. This flow is for procurement-style B2B enquiries.

sequenceDiagram
    participant O as Organisation
    participant PX as perfxcel.com
    participant CF as Cloudflare Turnstile
    participant API as api.perfxcel.com
    participant DB as Supabase

    O->>PX: Fill /training-plan form
    PX->>CF: Render Turnstile widget
    CF-->>PX: token
    PX->>API: POST /api/v1/training-plan { ...formData, turnstileToken }
    API->>CF: POST /siteverify
    CF-->>API: { success: true }
    API->>DB: INSERT INTO training_plan_requests
    DB-->>API: Created
    API-->>PX: 201 Created
    PX-->>O: Confirmation message

Admin staff review requests in the admin.perfxcel.com Training Plans section and follow up outside the platform.


Certificate Verification

Issued certificates can be verified publicly at perfxcel.com/verify.

sequenceDiagram
    participant V as Verifier
    participant PX as perfxcel.com/verify
    participant API as api.perfxcel.com
    participant DB as Supabase

    V->>PX: Enter certificate number
    PX->>API: GET /api/v1/verify?certificate_number=PX-2026-00123
    API->>DB: SELECT FROM enrollments WHERE certificate_number = ?
    DB-->>API: Enrollment record
    API-->>PX: { valid: true, learner_name, course_title, completion_date }
    PX-->>V: Certificate details displayed

Course Publishing Workflow

Courses are created in draft (is_published: false) and published when ready.

stateDiagram-v2
    [*] --> Draft : Admin creates course
    Draft --> Active : Admin publishes (is_published=true)
    Active --> Archived : Admin archives (status=archived)
    Active --> Deleted : Admin soft-deletes
    Archived --> Active : Admin re-activates
    Draft --> Deleted : Admin soft-deletes draft

Only courses with is_published: true and status: 'active' appear in the public catalog. The PATCH /courses/bulk endpoint supports bulk publish/archive operations across multiple courses at once.


Enquiry Handling

Inbound contact form submissions land as enquiries in the admin dashboard.

stateDiagram-v2
    [*] --> New : POST /contact (Turnstile verified)
    New --> InProgress : Admin picks up
    InProgress --> Resolved : Admin resolves
    Resolved --> Closed : Admin closes
    New --> Closed : Spam / not actionable

Admins update status via PATCH /api/v1/enquiries/:id.