Skip to content

musaabhasan/pdrs-framework

Repository files navigation

Professional Development Registration System Framework

PDRS is a PHP 8.x and MySQL 8.0 framework for secure professional development registration, identity verification, and Moodle enrollment automation.

It is designed for education and enterprise environments where registration workflows must balance user experience, security, auditability, privacy, and operational maintainability.

What It Provides

  • Dynamic event landing pages using event slugs such as /e/secure-ai-governance.
  • Flexible program delivery metadata for synchronous, asynchronous, self-paced, instructor-led, hybrid, cohort-based, and custom formats.
  • Event-specific metadata fields mapped to Moodle custom profile fields.
  • Optional invite-code gates per event, with only HMAC hashes stored in the database.
  • Mandatory email verification before registration records are created.
  • OTP and signed-link verification workflows.
  • Identity proofing exception workflow for duplicate accounts, name variants, email changes, sponsor corrections, Moodle conflicts, suspicious registration patterns, and certificate-impacting identity updates.
  • Sponsor roster import validation workflow for employer or partner cohorts, covering sponsor authority, schema checks, eligibility, consent, duplicates, invite scope, and downstream reconciliation.
  • Session-backed CSRF protection across public form submissions.
  • Duplicate identity checks against Moodle before account creation.
  • Duplicate registration handling by event and verified email.
  • Moodle REST integration for user creation, cohort assignment, and course enrollment.
  • Retryable Moodle provisioning utility for operational recovery.
  • Moodle enrollment reconciliation workflow for identity, course, cohort, role, withdrawal, retry, and certificate-release drift.
  • Certificate eligibility reconciliation workflow for registration, attendance, Moodle completion, payment, withdrawal, exceptions, and certificate release evidence.
  • Attendance anomaly triage workflow for missing attendance, duplicate check-ins, late joins, platform drift, manual overrides, disputes, and certificate eligibility impact.
  • Waitlist and capacity governance workflow for fair seat allocation, invite waves, reserved capacity, overbooking approvals, accessibility accommodations, and audit evidence.
  • Waitlist fairness and capacity release workflow for priority rules, sponsor allocation, invite expiry, overbooking decisions, accessibility holds, Moodle provisioning, and complaint-ready evidence.
  • Automatic approval based on domain allow-lists and payment status flags.
  • AES-256-GCM encryption for sensitive registration data at rest.
  • HMAC hashing for email, IP address, and user-agent lookups without exposing raw values.
  • Data retention and privacy workflow for registration, verification, Moodle provisioning, attendance, certificate, support, and audit records.
  • PDO prepared statements for all database operations.
  • Rate limiting for verification endpoints.
  • Audit logging for registration attempts, verification events, administrative changes, and integration failures.
  • Liveness, readiness, and protected operations metrics endpoints.
  • Maintenance commands for expired verification, rate-limit, and audit-log cleanup.
  • SMTP transactional email transport with local mail logging for development.
  • Trusted proxy configuration for accurate client IP handling behind load balancers.
  • Rich field rendering and validation for text, email, number, date, textarea, and select inputs.
  • Dockerized local development with PHP 8.3, Apache, MySQL 8.0, and Mailpit.

Architecture

Registrant
  -> Event landing page
  -> Email OTP or signed-link verification
  -> Registration form
  -> Approval policy
  -> Moodle identity check
  -> User creation if needed
  -> Cohort assignment and course enrollment
  -> Confirmation email and calendar invite

Quick Start

cp .env.example .env
docker compose up --build

Then open:

  • Application: http://localhost:8080
  • Demo event: http://localhost:8080/e/secure-ai-governance
  • Mailpit inbox: http://localhost:8025

Generate a strong local APP_KEY before testing encryption:

php -r "echo 'base64:' . base64_encode(random_bytes(32)) . PHP_EOL;"

If PHP is not installed locally, run that command inside a PHP container or replace the key with any secure 32-byte base64 value.

The example key in .env.example is only for local development and must be replaced before production use.

Operational Commands

Run scheduled maintenance:

php bin/maintenance.php

Retry approved or failed Moodle provisioning records:

php bin/retry-provisioning.php

Generate an operations bearer token hash:

php -r "echo hash('sha256', 'replace-with-strong-token') . PHP_EOL;"

Set the result as OPERATIONS_TOKEN_HASH and call /ops/metrics with Authorization: Bearer <token>.

Generate an invite-code hash for an invite-only event:

php bin/hash-invite-code.php "program-invite-code"

Set the generated value in events.invite_code_hash after the production APP_KEY has been configured.

Documentation

Repository Structure

public/                 Web entry point and assets
src/                    Application code
src/Http                Request, response, and router
src/Repository          PDO database access layer
src/Service             Business services and integrations
database/migrations     MySQL schema and demo event seed
database/seeders        Optional standalone seed data
docs/                   Implementation and operations documentation
bin/                    Utility scripts

Production Notes

Deploy the application and database to approved infrastructure for the institution, enforce TLS at the load balancer or reverse proxy layer, keep Moodle tokens in a secret manager, and restrict outbound access to approved Moodle endpoints and SMTP infrastructure.

License

MIT License. See LICENSE.

Portfolio and Professional Profile

This repository is part of the professional portfolio of Musaab Hasan, focused on cybersecurity, digital forensics, AI governance, EdTech, secure platforms, and research-driven digital transformation.

Digital Forensics and Security Research Labs

Security Culture and Transformation Platforms

Governance, Education, and Secure Enablement

Professional profile and research portfolio: https://musaab.info

About

Professional Development Registration System framework for secure event registration and Moodle enrollment automation.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors