<?php

/**
 * Module Registry
 *
 * Defines the complete list of active application modules.
 * This registry is loaded by Bootstrap (INIT-003) and used by the
 * Autoloader to resolve module class paths.
 *
 * Architecture rules (AI.md Section 8, ADR):
 *  - Modules are FROZEN. No new module may be added without a new ADR.
 *  - Every feature belongs to exactly ONE module.
 *  - Cross-module communication must go through Services, never Models.
 *  - Module names here must exactly match the directory names under app/modules/.
 *
 * Module implementation order follows the Sprint roadmap (IMPLEMENTATION_ROADMAP.md).
 * A module listed here does not mean it is implemented — it means it is REGISTERED.
 *
 * @package Inveetaire
 * @ref     AI.md §8, DBP v1.0 Ch.2, IMPLEMENTATION_ROADMAP.md
 */

return [

    /*
    |--------------------------------------------------------------------------
    | Registered Modules
    |--------------------------------------------------------------------------
    | Key:   Module name (matches directory under app/modules/)
    | Value: Human-readable description (for documentation only)
    |
    | Sprint implementation order:
    |   Sprint 1  → Auth
    |   Sprint 2  → Workspace
    |   Sprint 3  → Theme, Invitation, Media
    |   Sprint 4  → Guest
    |   Sprint 5  → RSVP
    |   Sprint 6  → Communication
    |   Sprint 7  → Vendor
    |   Sprint 8  → Checkin, Dashboard
    |   Sprint 9  → Report
    |   Sprint 10 → Settings, Printer, Notification, Audit
    |   Sprint 11 → Support
    */
    'modules' => [
        'Auth'          => 'Authentication — login, logout, session, password reset',
        'Workspace'     => 'Workspace provisioning, setup checklist, lifecycle phases',
        'Theme'         => 'Theme manifest loading, version resolution, rendering context',
        'Invitation'    => 'Invitation configuration, section management, public rendering',
        'Media'         => 'File upload validation, variant generation, secure file serving',
        'Guest'         => 'Guest CRUD, Excel import/export, QR codes, timeline',
        'RSVP'          => 'RSVP form processing, PAX validation, window enforcement',
        'Communication' => 'Message templates, WhatsApp pre-fill links, comm logs',
        'Vendor'        => 'Vendor CRUD, payment milestones, budget tracking',
        'Checkin'       => 'QR scan, manual check-in, offline queue, duplicate detection',
        'Dashboard'     => 'Planning dashboard aggregations, live wedding day dashboard',
        'Report'        => 'Post-event report generation, Excel/CSV export',
        'Settings'      => 'System config (Admin), workspace config (Couple), crew accounts',
        'Printer'       => 'Label template config, label generation, print acknowledgement',
        'Notification'  => 'Condition evaluation, badge count, expiry',
        'Audit'         => 'Audit log writes (INSERT-only) and reads for Admin/Couple',
        'Support'       => 'Support Mode session lifecycle, workspace context adoption',
    ],

    /*
    |--------------------------------------------------------------------------
    | Module Base Namespace
    |--------------------------------------------------------------------------
    | All module classes live under this namespace prefix.
    | Autoloader (INIT-003) maps App\Modules\{Module}\{Class} to
    | app/modules/{Module}/{Class}.php
    */
    'namespace' => 'App\\Modules',

    /*
    |--------------------------------------------------------------------------
    | Module Base Path
    |--------------------------------------------------------------------------
    */
    'path' => dirname(__DIR__) . '/app/modules',

];
