Role Architecture
👨‍🎓 Student
Access
Self‑register via /lms/register.php
Login via /lms/login.php
Core capabilities (inside student dashboard shell)
Profile management (bio, region, time zone, notification prefs)
Course catalog + enrollment
Agreement/contracts viewer (signed PDFs)
Payment history + invoices + refund status
Learning access
Course modules (video, PDF, SCORM, code labs)
Assignments submission
Live sessions (Zoom join links)
AI Lab simulations
Certificates archive
Views & analytics
Grades & progress
Attendance and live-session history
Cohort dashboard (who’s in your group, schedule, announcements)
Payments and refunds timeline
👨‍🏫 Instructor (created by Super Admin)
Access
Created/managed by Super Admin
Lands on Instructor Dashboard (same SMLMS shell, instructor sidebar)
Teaching tools
Manage assigned cohorts (rosters, announcements)
Create/update modules:
Video / PDF / SCORM / code snippets
Drip schedules and prerequisites
Create assignments & grading rubrics
Host and manage Zoom sessions (via Zoom API service)
Mark attendance and review logs
Grade submissions and release feedback
Propose or trigger certificate approval for students
🧑‍💼 Admin
Access
Managed by Super Admin
Uses Admin Dashboard in SMLMS shell
Responsibilities
Create courses and define:
course_region (USA / EUROPE / AFRICA)
Pricing per region
Default cohorts & schedules
Assign instructors to courses/cohorts
Manage cohorts (open/close, capacity, schedules)
Monitor payments, refunds, failed transactions
Generate financial and operational reports
Manage Zoom links and schedules for program‑level sessions
View analytics dashboards (enrollment, revenue, completion, risk scores)
Manage regional pricing and discounts
👑 Super Admin
Platform owner layer
Create and manage:
Admin accounts
Instructor accounts
Regional Admin accounts
System‑wide configuration:
Payment providers (Square, Paystack keys)
AI APIs / VPF config
Regional rules (currency, taxes, content rules)
Refund policies
Feature flags/toggles
Security & compliance:
System audit logs
RBAC definitions
Global settings for 2FA, rate limiting, etc.
🌍 Regional & Cohort Logic
Region-Aware Courses
courses table includes:
course_region = usa | europe | africa
Region‑specific prices (e.g. price_usd, price_eur, price_local)
Geo logic
Detect region via IP on first visit.
Allow manual override via region selector (stored in session + user profile).
Currency auto‑switch:
USA → USD
Europe → EUR
Africa → local (GHS, NGN, etc.) + internal USD equivalent.
Regional Payment Mapping
Payment routing:
USA → Square
Europe → Square
Africa → Paystack
All normalized internally into USD for reporting.
Cohorts (very important)
cohorts table:
id, course_id, region, instructor_id
max_capacity
start_date, end_date, duration_label
zoom_schedule (JSON or separate table)
status = Open / Closed / Ongoing / Completed
Enrollment (enrollments table) always ties to:
user_id
course_id
cohort_id
Region & timestamps
Auto logic
On enrollment:
Find active cohort for given course + region with status = Open and capacity > enrolled.
If full → queue or auto‑create next cohort (Admin rule).
Instructor dashboard lists cohorts they own, with counts and progress.
🧩 Core Platform Modules
Auth & RBAC module (roles + permissions, redirects into SMLMS dashboards).
Course & Cohort Management (catalog, regions, cohort lifecycle).
Enrollment & Agreement Service (application intake, contracts, e‑sign).
Payment Service (multi‑provider, refunds, invoices).
Training / LMS Engine (modules, assignments, grading).
Live Session / Zoom Integration Service.
AI Lab Simulation Engine (VPF integration).
Analytics & Reporting module (for all roles).
Security & Compliance module (audits, encryption, policies).
💳 Enrollment & Payment Engine
Application & Agreement
Student selects course + region + cohort.
Intake form captures:
Background, experience, learning objectives.
Required consents (ToS, privacy, refund policy).
Contract generation:
Use template with variables:
Course details, region, fees, refund terms, tax clauses.
Generate PDF with:
Student name, ID, cohort ID, unique contract hash.
E‑Signature:
Signature pad or typed name.
Store:
Signature data, IP, timestamp, device fingerprint, verification token.
Logic:
Only when agreement_signed = 1 and signature_verified = 1 → Enable payment button/link.
Else: block payment and show status in student dashboard.
Payment Service
Geo detection picks provider and currency.
Normalize to USD internally:
Store charged_currency, conversion_rate, amount_usd.
Webhooks:
Square & Paystack webhooks endpoint(s) validate:
Signature, transaction ID, amounts, course/cohort match.
Invoice engine:
On successful payment:
Generate invoice number.
Store tax breakdown and PDF.
Expose download link in Student / Admin dashboards.
Refund Logic (14-Day Rule)
Rule:
If request_date <= paid_at + 14 days
And course_progress < 20%
Then allow refund → trigger provider refund + internal reversal.
Track:
Request date, reason, approval chain, status.
Reconciliation:
Daily job:
Sync provider transactions.
Detect mismatches.
Retry failed charges if allowed.
Notify Admins of anomalies.
🎓 Training & LMS Engine
Modules
Video (cloud storage), PDFs, SCORM, embedded code playground.
Drip release schedules based on cohort dates.
AI‑generated quizzes for modules.
Assignments
File & code submissions.
Deadlines, late penalties, plagiarism checks.
Progress tracking
Per‑module completion.
Attendance %, assignment %, AI Lab score, final exam.
Unified final score formula
30% Assignments
20% Attendance
30% AI Lab
20% Final Assessment
Certification
Auto issue on passing:
PDF certificate with:
Unique verification ID + QR code.
Public verification endpoint (future blockchain hook).
🎥 Live Session (Zoom API Integration)
When Admin schedules cohort session:
Call Zoom API:
Store meeting ID, join URL, passcode, host URL.
Student view:
Tokenized join links per student (include student/cohort IDs, expiry).
Attendance:
Capture join/leave times via Zoom reports/webhooks.
Store duration and compute attendance %.
Recording:
Webhook or scheduled fetch for recordings.
Attach to relevant module; notify cohort.
Calendar:
Export ICS + optional Google/Outlook integrations.
🤖 AI Lab Simulation Engine
Core
Scenario‑based labs: threat detection, incident response, secure coding, fraud scenarios.
VPF Integration
Student submits lab.
Backend packages context → sends to VPF/AI API.
Receive structured scoring (accuracy, performance, security, mitigation, hygiene).
Store as lab_results (encrypted).
Advanced
Real‑time vulnerability scanning.
OWASP and fraud simulations.
Performance heatmaps, behavioral risk signals.
Security
Encrypt lab data.
Strict role‑based access.
AI audit logs and tamper detection.
📊 Analytics & Intelligence Layer
Admin dashboards
Revenue by region/provider/currency.
Enrollment and completion trends.
Cohort performance and dropout prediction.
Refund ratios and financial health.
Instructor dashboards
Heatmap of student engagement.
At‑risk student alerts.
Attendance trends and grade distributions.
Student dashboards
Skill radar chart.
Cohort ranking and peer comparison.
AI lab improvement graph.
Certificate and achievement tracker.
🔐 Security & Compliance
RBAC integrated with your existing roles and SMLMS dashboards.
JWT or secure session tokens for APIs.
2FA for Admins & Super Admins.
GDPR compliance for EU users (consent, data export/delete).
PCI‑DSS‑aligned payment flows (no card data stored on your servers).
Audit trail logging for key actions.
Rate limiting on APIs and brute‑force login detection.
File scanning for uploads.
Encrypted storage (AES‑256) for sensitive data (contracts, lab results).