Skip to content

Unify estimate intake with Dev+1 rebrand, account auto-provisioning, and email verification gating#60

Merged
iaretechnician merged 1 commit into
unstablefrom
copilot/update-runlevel-systems-website
May 31, 2026
Merged

Unify estimate intake with Dev+1 rebrand, account auto-provisioning, and email verification gating#60
iaretechnician merged 1 commit into
unstablefrom
copilot/update-runlevel-systems-website

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 31, 2026

This PR updates the website and unified dashboard flow to align with the Dev+1 naming change and fixes estimate intake so requests always carry a visible Estimate ID and are linked to client accounts. It also introduces verification-gated client activation so new estimate-driven accounts cannot log in until email verification is completed.

  • Branding + public label migration (Dev Partner → Dev+1)

    • Replaced customer-visible Dev Partner references with Dev+1 across primary navigation, footer, service page metadata/content, dashboard copy, and related product messaging.
    • Kept route compatibility (/design-debug-deploy.php) while updating visible page title and content language.
  • Estimate request lifecycle hardening

    • Reworked /estimate.php to enforce required inputs (name, email, project_type, description; plus desired_username when anonymous).
    • Added deterministic estimate identifier generation at submit time and persisted as estimate_id in estimate records.
    • Confirmation UI now consistently shows Estimate ID, account context, and game/server Discord guidance when applicable.
  • Anonymous submitter → client account auto-creation

    • Added automatic client user creation from estimate submission when not logged in:
      • role=client
      • status=pending_verification
      • verification token + expiry
      • temporary password issuance (with TODO to replace by reset flow)
    • Enforced username format and duplicate checks (username/email collision prevention).
  • Email verification flow + resend

    • Added includes/email.php with send_email(...) wrapper and explicit SMTP hardening TODOs.
    • Added /verify-email.php token activation endpoint and /resend-verification.php for renewal of verification tokens.
    • Verification email includes estimate context and account metadata (username, temporary password, verification link).
  • Login + redirect safety + status gating

    • Updated /login.php to:
      • gate by account status (active, pending_verification, disabled)
      • provide explicit pending-verification messaging
      • sanitize return/redirect to local relative paths only.
    • Added shared safe-return and auth helper utilities in includes/portal-helpers.php.
  • Unified dashboard + staff visibility updates

    • Preserved single /dashboard.php model with role-based rendering.
    • Client view now includes estimate-focused modules and “My Estimate Requests” table (Estimate ID, Project Type, Status, Submitted Date).
    • Staff estimate list/detail now shows full required contact and routing context (including discord_username, client_username, and estimate fallback label Legacy Request for historical entries without IDs).
// Estimate ID generation + legacy display handling
$estimateId = portalGenerateUniqueEstimateId(); // RLS-YYYYMMDD-XXXX

$request = [
    'estimate_id' => $estimateId,
    'client_username' => $clientUsername,
    // ...
];

echo pe(portalGetEstimateDisplayId($request)); // returns estimate_id or "Legacy Request"

@iaretechnician iaretechnician marked this pull request as ready for review May 31, 2026 13:39
Copilot AI review requested due to automatic review settings May 31, 2026 13:39
@iaretechnician iaretechnician merged commit 9d56c2e into unstable May 31, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants