# Implementation Plan

## Validation Checklist

- [x] All specification file paths are correct and exist
- [x] Context priming section is complete
- [x] All implementation phases are defined
- [x] Each phase follows TDD: Prime → Test → Implement → Validate
- [x] Dependencies between phases are clear (no circular dependencies)
- [x] Parallel work is properly tagged with `[parallel: true]`
- [x] Activity hints provided for specialist selection `[activity: type]`
- [x] Every phase references relevant SDD sections
- [x] Every test references PRD acceptance criteria
- [x] Integration & E2E tests defined in final phase
- [x] Project commands match actual project setup
- [x] A developer could follow this plan independently

---

## Specification Compliance Guidelines

### How to Ensure Specification Adherence

1. **Before Each Phase**: Complete the Pre-Implementation Specification Gate
2. **During Implementation**: Reference specific SDD sections in each task
3. **After Each Task**: Run Specification Compliance checks
4. **Phase Completion**: Verify all specification requirements are met

### Deviation Protocol

If implementation cannot follow specification exactly:
1. Document the deviation and reason
2. Get approval before proceeding
3. Update SDD if the deviation is an improvement
4. Never deviate without documentation

## Metadata Reference

- `[parallel: true]` - Tasks that can run concurrently
- `[component: component-name]` - For multi-component features
- `[ref: document/section; lines: 1, 2-3]` - Links to specifications, patterns, or interfaces and (if applicable) line(s)
- `[activity: type]` - Activity hint for specialist agent selection

---

## Context Priming

*GATE: You MUST fully read all files mentioned in this section before starting any implementation.*

**Specification**:

- `docs/specs/020-digital-signage-widgets/product-requirements.md` - Product Requirements (23 features, 4 personas)
- `docs/specs/020-digital-signage-widgets/solution-design.md` - Solution Design (7 ADRs, full architecture)

**Key Design Decisions (ADRs)**:

- **ADR-1**: Widget Registry Pattern - Extensible widget system without core code changes
- **ADR-2**: Service Worker for Offline - Modern browser standard for cache control
- **ADR-3**: JSON Widget Config - Flexible schema, no migrations for new settings
- **ADR-4**: Hybrid Layout System - Templates + adjustable zones
- **ADR-5**: Redis for External Caching - Already in stack, TTL support
- **ADR-6**: Alpine.js for Display Player - Lightweight reactivity (15KB)
- **ADR-7**: Additive Schema Changes - Preserves legacy system, gradual migration

**Implementation Context**:

Commands to run:
```bash
./test.sh                           # Run all tests
./test.sh --testsuite unit          # Run unit tests only
./test.sh --coverage                # Run with coverage report
./test.sh --stan                    # Run tests + PHPStan analysis
php userfrosting/conductor run      # Database migrations
php userfrosting/conductor build-css --minify  # CSS build
```

Patterns to follow:
- `docs/patterns/psr4-autoloading.md` - Namespace and class organization
- `docs/patterns/namespace-structure.md` - Where new classes should be placed
- `docs/patterns/widget-component-pattern.md` - Widget registry + templates + render contract
- `docs/patterns/offline-first-display.md` - Service Worker caching + offline behavior contract
- `docs/features/digital-signage-technical-patterns.md` - Existing signage patterns

Implementation notes:
- v1 simplifies playlists to **one playlist per zone** (no “active playlist” switching); see SDD `dsPlaylists` schema.

Key interfaces to implement:
- Widget interface (abstract base class)
- Repository interfaces for data access
- API controller patterns (Slim 2.6.2)
- Service layer patterns

Existing code to preserve:
- `userfrosting/src/BuyerKiosk/DigitalSign/StoreLoop.php` - Legacy loop management
- `userfrosting/src/BuyerKiosk/DigitalSign/Slide.php` - Slide entity
- `userfrosting/routes/groups/digitalsign.php` - Existing routes

---

## Implementation Phases

### Phase 1: Foundation - Database Schema & Domain Entities

*Delivers: Database schema, domain entities, repositories, and migration service for legacy slides*

- [x] T1 Phase 1: Foundation (Schema, Domain, Repository) ✅ **COMPLETED 2025-12-21**

    - [x] T1.1 Prime Context
        - [x] T1.1.1 Read SDD data storage changes section `[ref: SDD; lines: 673-902]`
        - [x] T1.1.2 Read SDD application data models `[ref: SDD; lines: 1185-1337]`
        - [x] T1.1.3 Review existing DigitalSign classes `[ref: userfrosting/src/BuyerKiosk/DigitalSign/]`
        - [x] T1.1.4 Review migration system patterns `[ref: userfrosting/migrations/]`

    - [x] T1.2 Write Tests - Domain Entities `[activity: backend-test]`
        - [x] T1.2.1 Test Zone entity creation and validation `[ref: PRD Feature 1; lines: 201-210]`
        - [x] T1.2.2 Test Page entity with layout association `[ref: PRD Feature 2; lines: 211-220]`
        - [x] T1.2.3 Test Playlist entity and item ordering `[ref: PRD Feature 7; lines: 262-269]`
        - [x] T1.2.4 Test PlaylistItem scheduling logic (startDate, expireDate) `[ref: PRD Feature 7]`
        - [x] T1.2.5 Test DisplayPairing entity with expiration logic `[ref: PRD Feature 8; lines: 270-278]`

    - [x] T1.3 Implement Database Migrations `[activity: backend-db]`
        - [x] T1.3.1 Create migration: dsDisplayZones table `[ref: SDD; lines: 676-687]`
        - [x] T1.3.2 Create migration: dsDisplayPairings table `[ref: SDD; lines: 689-700]`
        - [x] T1.3.3 Create migration: dsPages table `[ref: SDD; lines: 702-712]`
        - [x] T1.3.4 Create migration: dsPageWidgets table `[ref: SDD; lines: 726-735]`
        - [x] T1.3.5 Create migration: dsPlaylists table `[ref: SDD; lines: 737-744]`
        - [x] T1.3.6 Create migration: dsPlaylistItems table `[ref: SDD; lines: 746-760]`
        - [x] T1.3.7 Create migration: dsSocialPosts table `[ref: SDD; lines: 762-783]`
        - [x] T1.3.8 Create migration: dsQRCodes table `[ref: SDD; lines: 785-794]`
        - [x] T1.3.9 Create migration: dsQRScans table `[ref: SDD; lines: 796-800]`
        - [x] T1.3.10 Create migration: dsDisplayAnalytics table `[ref: SDD; lines: 802-810]`
        - [x] T1.3.11 Create migration (global): dsLayoutTemplates table `[ref: SDD; lines: 814-863]`
        - [x] T1.3.12 Create migration (global): dsCorporateTemplates table `[ref: SDD; lines: 875-886]`
        - [x] T1.3.13 Create migration (global): dsSocialConfig table `[ref: SDD; lines: 888-902]`
        - [x] T1.3.14 Create seed data for dsLayoutTemplates (6 layouts) `[ref: SDD; lines: 864-874]`
        - [x] T1.3.15 Create seed data for dsCorporateTemplates preset: full-queue-page (wait time + current + completed) `[ref: PRD Feature 4; lines: 228-238]`

    - [x] T1.4 Implement Domain Entities `[activity: backend-domain]`
        - [x] T1.4.1 Create Zone entity class `[ref: SDD; lines: 1189-1206]`
        - [x] T1.4.2 Create DisplayPairing entity class `[ref: SDD; lines: 1208-1219]`
        - [x] T1.4.3 Create Page entity class `[ref: SDD; lines: 1221-1240]`
        - [x] T1.4.4 Create abstract Widget base class `[ref: SDD; lines: 1242-1253]`
        - [x] T1.4.5 Create WidgetConfig value object `[ref: SDD; lines: 1242-1253]`
        - [x] T1.4.6 Create Layout entity class `[ref: SDD Directory Map]`
        - [x] T1.4.7 Create LayoutZone entity class `[ref: SDD Directory Map]`
        - [x] T1.4.8 Create Playlist entity class `[ref: SDD; lines: 1287-1299]`
        - [x] T1.4.9 Create PlaylistItem entity class `[ref: SDD; lines: 1301-1316]`
        - [x] T1.4.10 Create QRCode entity class `[ref: SDD; lines: 1318-1330]`
        - [x] T1.4.11 Create QRScan entity class `[ref: SDD; lines: 1332-1337]`

    - [x] T1.5 Implement Repositories `[activity: backend-repository]`
        - [x] T1.5.1 Create ZoneRepository with CRUD operations `[ref: SDD Directory Map; lines: 514-515]`
        - [x] T1.5.2 Create DisplayPairingRepository `[ref: SDD Directory Map; lines: 516]`
        - [x] T1.5.3 Create PageRepository with widget loading `[ref: SDD Directory Map; lines: 517]`
        - [x] T1.5.4 Create WidgetRepository (PageWidgetRepository) `[ref: SDD Directory Map; lines: 518]`
        - [x] T1.5.5 Create PlaylistRepository with item ordering `[ref: SDD Directory Map; lines: 519]`
        - [x] T1.5.6 Create PlaylistItemRepository `[ref: SDD Directory Map; lines: 519]`
        - [x] T1.5.7 Create LayoutRepository `[ref: SDD Directory Map]`
        - [x] T1.5.8 Create QRCodeRepository `[ref: SDD Directory Map; lines: 521]`

    - [x] T1.6 Implement Migration Service `[activity: backend-service]`
        - [x] T1.6.1 Create MigrationService for legacy slide conversion `[ref: PRD Feature 10; lines: 288-296]`
        - [x] T1.6.2 Implement auto-migration of dsSlides to full-screen pages `[ref: SDD; lines: 706-709]`
        - [x] T1.6.3 Implement dsLoop to playlist conversion `[ref: PRD Feature 10]`
        - [x] T1.6.4 Preserve scheduling (start/expire dates) during migration `[ref: PRD Feature 10]`

    - [x] T1.7 Validate Phase 1
        - [x] T1.7.1 Run migrations on test database `[activity: run-tests]`
        - [x] T1.7.2 Run all unit tests `[activity: run-tests]` → 66 tests, 189 assertions ✅
        - [x] T1.7.3 Run PHPStan analysis `[activity: lint-code]` → Level 5 clean ✅
        - [x] T1.7.4 Verify PRD Features 1, 2, 7, 8, 10 foundations in place `[activity: business-acceptance]`

---

### Phase 2: Widget System - Registry, Base Widgets, Services

*Delivers: Widget registry pattern, all widget implementations, zone/page/playlist services*

- [x] T2 Phase 2: Widget System ✅ **COMPLETED 2025-12-22**

    - [x] T2.1 Widget Registry & Framework `[component: widget-registry]`

        - [x] T2.1.1 Prime Context
            - [x] T2.1.1.1 Read SDD Widget Registry example `[ref: SDD; lines: 1396-1458]`
            - [x] T2.1.1.2 Read PRD Widget Framework feature `[ref: PRD; lines: 229-238]`
            - [x] T2.1.1.3 Read widget component pattern `[ref: docs/patterns/widget-component-pattern.md]`

        - [x] T2.1.2 Write Tests `[activity: backend-test]`
            - [x] T2.1.2.1 Test widget registration and retrieval `[ref: PRD Feature 3]`
            - [x] T2.1.2.2 Test widget instantiation with config `[ref: PRD Feature 3]`
            - [x] T2.1.2.3 Test getAvailableTypes returns all registered widgets `[ref: SDD; lines: 1439-1447]`
            - [x] T2.1.2.4 Test invalid widget type throws exception `[ref: SDD; lines: 1429-1431]`

        - [x] T2.1.3 Implement `[activity: backend-service]`
            - [x] T2.1.3.1 Create WidgetRegistry service `[ref: SDD; lines: 1406-1448]`
            - [x] T2.1.3.2 Create widget bootstrap registration `[ref: SDD; lines: 1451-1458]`

        - [x] T2.1.4 Validate
            - [x] T2.1.4.1 Run widget registry tests `[activity: run-tests]`
            - [x] T2.1.4.2 Verify ADR-1 compliance (extensibility without core changes) `[activity: business-acceptance]`

    - [x] T2.2 Queue Widgets `[parallel: true]` `[component: queue-widgets]`

        - [x] T2.2.1 Prime Context
            - [x] T2.2.1.1 Read PRD Queue Widgets feature `[ref: PRD; lines: 239-248]`
            - [x] T2.2.1.2 Read SDD QueueWidget data model `[ref: SDD; lines: 1255-1265]`
            - [x] T2.2.1.3 Review existing queue JSON endpoints `[ref: existing queue system]`

        - [x] T2.2.2 Write Tests `[activity: backend-test]`
            - [x] T2.2.2.1 Test QueueWidget getRenderData returns current queue `[ref: PRD Feature 4]`
            - [x] T2.2.2.2 Test CompletedQueueWidget shows completed customers `[ref: PRD Feature 4]`
            - [x] T2.2.2.3 Test WaitTimeWidget returns estimated wait `[ref: PRD Feature 4]`
            - [x] T2.2.2.4 Test empty queue graceful handling `[ref: PRD; lines: 237]`

        - [x] T2.2.3 Implement `[activity: backend-domain]`
            - [x] T2.2.3.1 Create QueueWidget class extending Widget `[ref: SDD; lines: 487]`
            - [x] T2.2.3.2 Create CompletedQueueWidget class `[ref: SDD; lines: 488]`
            - [x] T2.2.3.3 Create WaitTimeWidget class `[ref: SDD; lines: 489]`
            - [x] T2.2.3.4 Register queue widgets in bootstrap `[ref: SDD; lines: 1451-1458]`

        - [x] T2.2.4 Validate
            - [x] T2.2.4.1 Run queue widget tests `[activity: run-tests]`
            - [x] T2.2.4.2 Verify Ably-triggered refresh when available, with fallback polling behavior when not available `[activity: business-acceptance]`

    - [x] T2.3 Media Widget `[parallel: true]` `[component: media-widget]`

        - [x] T2.3.1 Prime Context
            - [x] T2.3.1.1 Read PRD Media Slide Widgets feature `[ref: PRD; lines: 249-259]`
            - [x] T2.3.1.2 Review existing media upload patterns `[ref: userfrosting/src/BuyerKiosk/DigitalSign/Controllers/UploadController.php]`

        - [x] T2.3.2 Write Tests `[activity: backend-test]`
            - [x] T2.3.2.1 Test image widget config schema validation `[ref: PRD Feature 5]`
            - [x] T2.3.2.2 Test video widget with muted default `[ref: PRD; lines: 255]`
            - [x] T2.3.2.3 Test media selection from library `[ref: PRD; lines: 253]`

        - [x] T2.3.3 Implement `[activity: backend-domain]`
            - [x] T2.3.3.1 Create MediaWidget class `[ref: SDD; lines: 490]`
            - [x] T2.3.3.2 Implement image/video config schemas `[ref: SDD ADR-3]`
            - [x] T2.3.3.3 Register media widget in bootstrap

        - [x] T2.3.4 Validate
            - [x] T2.3.4.1 Run media widget tests `[activity: run-tests]`

    - [x] T2.4 Weather Widgets `[parallel: true]` `[component: weather-widgets]`

        - [x] T2.4.1 Prime Context
            - [x] T2.4.1.1 Read PRD Weather Widgets feature `[ref: PRD; lines: 300-308]`
            - [x] T2.4.1.2 Read SDD WeatherWidget example `[ref: SDD; lines: 1536-1599]`

        - [x] T2.4.2 Write Tests `[activity: backend-test]`
            - [x] T2.4.2.1 Test WeatherWidget with simple display mode `[ref: PRD Feature 11]`
            - [x] T2.4.2.2 Test forecast display mode (3-5 day) `[ref: PRD; lines: 303]`
            - [x] T2.4.2.3 Test Redis cache hit returns cached data `[ref: SDD ADR-5]`
            - [x] T2.4.2.4 Test cache miss fetches from API `[ref: SDD; lines: 1561-1568]`
            - [x] T2.4.2.5 Test location override option `[ref: PRD; lines: 306]`

        - [x] T2.4.3 Implement `[activity: backend-domain]`
            - [x] T2.4.3.1 Create WeatherWidget class `[ref: SDD; lines: 1536-1599]`
            - [x] T2.4.3.2 Create WeatherService with API client `[ref: SDD Directory Map; lines: 509]`
            - [x] T2.4.3.3 Create WeatherClient (OpenWeatherMap) `[ref: SDD; lines: 540]`
            - [x] T2.4.3.4 Implement Redis caching (30 min TTL) `[ref: SDD; lines: 1551-1558]`

        - [x] T2.4.4 Validate
            - [x] T2.4.4.1 Run weather widget tests `[activity: run-tests]`
            - [x] T2.4.4.2 Verify ADR-5 compliance (Redis caching) `[activity: business-acceptance]`

    - [x] T2.5 QR Code Widget `[parallel: true]` `[component: qr-widget]`

        - [x] T2.5.1 Prime Context
            - [x] T2.5.1.1 Read PRD QR Code Widget feature `[ref: PRD; lines: 309-317]`
            - [x] T2.5.1.2 Read SDD QRCode entities `[ref: SDD; lines: 1318-1337]`

        - [x] T2.5.2 Write Tests `[activity: backend-test]`
            - [x] T2.5.2.1 Test QR code generation with tracking URL `[ref: PRD Feature 12]`
            - [x] T2.5.2.2 Test QR redirect logs scan `[ref: PRD; lines: 313]`
            - [x] T2.5.2.3 Test analytics aggregation (by hour, day, zone) `[ref: PRD; lines: 314-315]`
            - [x] T2.5.2.4 Test unknown/expired qrId returns 404 (no open redirect) `[ref: SDD QR Redirect notes]`

        - [x] T2.5.3 Implement `[activity: backend-domain]`
            - [x] T2.5.3.1 Create QRCodeWidget class `[ref: SDD; lines: 493]`
            - [x] T2.5.3.2 Create QRTrackingService `[ref: SDD Directory Map; lines: 510]`
            - [x] T2.5.3.3 Implement QR redirect endpoint `[ref: SDD; lines: 1153-1159]`

        - [x] T2.5.4 Validate
            - [x] T2.5.4.1 Run QR widget tests `[activity: run-tests]`

    - [x] T2.6 Text Widget (WYSIWYG) `[parallel: true]` `[component: text-widget]`

        - [x] T2.6.1 Prime Context
            - [x] T2.6.1.1 Read PRD Custom Text Widget feature `[ref: PRD; lines: 327-336]`

        - [x] T2.6.2 Write Tests `[activity: backend-test]`
            - [x] T2.6.2.1 Test text widget config with rich text content `[ref: PRD Feature 14]`
            - [x] T2.6.2.2 Test "What We're Buying" template preset `[ref: PRD; lines: 335]`

        - [x] T2.6.3 Implement `[activity: backend-domain]`
            - [x] T2.6.3.1 Create TextWidget class `[ref: SDD; lines: 494]`
            - [x] T2.6.3.2 Implement config schema for WYSIWYG content

        - [x] T2.6.4 Validate
            - [x] T2.6.4.1 Run text widget tests `[activity: run-tests]`

    - [x] T2.7 Event Widget `[parallel: true]` `[component: event-widget]`

        - [x] T2.7.1 Prime Context
            - [x] T2.7.1.1 Read PRD Upcoming Events Widget feature `[ref: PRD; lines: 318-326]`
            - [x] T2.7.1.2 Review existing event system (SignageAdapter) `[ref: userfrosting/src/BuyerKiosk/EventManagement/Adapters/SignageAdapter.php]`

        - [x] T2.7.2 Write Tests `[activity: backend-test]`
            - [x] T2.7.2.1 Test EventWidget pulls from event system `[ref: PRD Feature 13]`
            - [x] T2.7.2.2 Test shows only public events `[ref: PRD; lines: 321]`
            - [x] T2.7.2.3 Test graceful empty state `[ref: PRD; lines: 325]`

        - [x] T2.7.3 Implement `[activity: backend-domain]`
            - [x] T2.7.3.1 Create EventWidget class `[ref: SDD; lines: 495]`
            - [x] T2.7.3.2 Integrate with existing SignageAdapter

        - [x] T2.7.4 Validate
            - [x] T2.7.4.1 Run event widget tests `[activity: run-tests]`

    - [x] T2.8 Core Services `[component: core-services]`

        - [x] T2.8.1 Prime Context
            - [x] T2.8.1.1 Read SDD Service Layer `[ref: SDD; lines: 499-513]`
            - [x] T2.8.1.2 Read SDD API specifications `[ref: SDD; lines: 906-1183]`

        - [x] T2.8.2 Write Tests `[activity: backend-test]`
            - [x] T2.8.2.1 Test ZoneService CRUD operations `[ref: PRD Feature 1]`
            - [x] T2.8.2.2 Test PageService with widget composition `[ref: PRD Feature 3]`
            - [x] T2.8.2.3 Test PlaylistService ordering and scheduling `[ref: PRD Feature 7]`
            - [x] T2.8.2.4 Test DisplayPairingService code generation and confirmation `[ref: PRD Feature 8]`
            - [x] T2.8.2.5 Test LayoutService template retrieval `[ref: PRD Feature 2]`

        - [x] T2.8.3 Implement `[activity: backend-service]`
            - [x] T2.8.3.1 Create ZoneService `[ref: SDD Directory Map; lines: 502]`
            - [x] T2.8.3.2 Create PageService `[ref: SDD Directory Map; lines: 503]`
            - [x] T2.8.3.3 Create PlaylistService `[ref: SDD Directory Map; lines: 505]`
            - [x] T2.8.3.4 Create DisplayPairingService `[ref: SDD Directory Map; lines: 504]`
            - [x] T2.8.3.5 Create LayoutService `[ref: SDD Directory Map; lines: 506]`
            - [x] T2.8.3.6 Create DisplayCacheService `[ref: SDD Directory Map; lines: 512]`
            - [x] T2.8.3.7 Create AnalyticsService `[ref: SDD Directory Map; lines: 511]`

        - [x] T2.8.4 Validate
            - [x] T2.8.4.1 Run all service tests `[activity: run-tests]`
            - [x] T2.8.4.2 Run PHPStan analysis `[activity: lint-code]`

    - [x] T2.9 Validate Phase 2
        - [x] T2.9.1 Run all widget and service tests `[activity: run-tests]` → 345 tests, 1,220 assertions ✅
        - [x] T2.9.2 Verify all 7 widget types registered `[activity: business-acceptance]`
        - [x] T2.9.3 Verify PRD Features 3, 4, 5, 11-14 complete `[activity: business-acceptance]`

---

### Phase 3: Display Player - Offline-First with Alpine.js

*Delivers: Modern display player with Service Worker offline support, Alpine.js reactivity, Ably real-time updates*

- [x] T3 Phase 3: Display Player ✅ **COMPLETED 2025-12-22**

    - [x] T3.1 Prime Context
        - [x] T3.1.1 Read SDD Display Player architecture `[ref: SDD; lines: 623-648]`
        - [x] T3.1.2 Read SDD Service Worker example `[ref: SDD; lines: 1462-1529]`
        - [x] T3.1.3 Read SDD Runtime View - Player Initialization `[ref: SDD; lines: 1606-1649]`
        - [x] T3.1.4 Read PRD Offline-First feature `[ref: PRD; lines: 279-287]`
        - [x] T3.1.5 Review existing display templates `[ref: userfrosting/templates/themes/default/ds/loop.html]`
        - [x] T3.1.6 Read offline-first display pattern `[ref: docs/patterns/offline-first-display.md]`

    - [x] T3.2 Display Controller & API `[component: display-api]`

        - [x] T3.2.1 Write Tests `[activity: backend-test]`
            - [x] T3.2.1.1 Test GET /display/:zoneSlug returns full playlist data `[ref: SDD; lines: 1056-1074]`
            - [x] T3.2.1.2 Test device auto-registration for single-zone stores `[ref: SDD; lines: 1075-1082]`
            - [x] T3.2.1.3 Test pairing code creation for multi-zone stores `[ref: SDD; lines: 1084-1093]`
            - [x] T3.2.1.4 Test pairing confirmation via admin `[ref: SDD; lines: 1095-1103]`
            - [x] T3.2.1.5 Test display heartbeat updates lastSeen `[ref: SDD; lines: 1105-1113]`

        - [x] T3.2.2 Implement `[activity: backend-api]`
            - [x] T3.2.2.1 Create DisplayController `[ref: SDD Directory Map; lines: 537]`
            - [x] T3.2.2.2 Implement GET /display/:zoneSlug endpoint `[ref: SDD; lines: 1056-1074]`
            - [x] T3.2.2.3 Implement POST /display/register endpoint `[ref: SDD; lines: 1075-1082]`
            - [x] T3.2.2.4 Implement POST /display/pairings endpoint `[ref: SDD; lines: 1084-1093]`
            - [x] T3.2.2.5 Implement POST /zones/:zoneId/pairings/confirm endpoint `[ref: SDD; lines: 1095-1103]`
            - [x] T3.2.2.6 Implement POST /display/heartbeat endpoint `[ref: SDD; lines: 1105-1113]`
            - [x] T3.2.2.7 Add routes to api/v2/signage.php `[ref: SDD Directory Map; lines: 560]`

        - [x] T3.2.3 Validate
            - [x] T3.2.3.1 Run display controller tests `[activity: run-tests]` → 18 tests, 100 assertions ✅

    - [x] T3.3 Alpine.js Player Core `[component: player-core]`

        - [x] T3.3.1 Write Tests (JavaScript) `[activity: frontend-test]`
            - [x] T3.3.1.1 Test playlist store initialization `[ref: SDD; lines: 629]`
            - [x] T3.3.1.2 Test page rotation timing `[ref: PRD Feature 7; lines: 265]`
            - [x] T3.3.1.3 Test widget data reactivity `[ref: SDD ADR-6]`

        - [x] T3.3.2 Implement `[activity: frontend-js]`
            - [x] T3.3.2.1 Add Alpine.js 3.x to vendor `[ref: SDD Directory Map; lines: 621]`
            - [x] T3.3.2.2 Create player-app.js initialization `[ref: SDD Directory Map; lines: 627]`
            - [x] T3.3.2.3 Create playlist-store.js (Alpine store) `[ref: SDD Directory Map; lines: 629]`
            - [x] T3.3.2.4 Create widget-store.js (Alpine store) `[ref: SDD Directory Map; lines: 630]`
            - [x] T3.3.2.5 Create layout-renderer.js component `[ref: SDD Directory Map; lines: 632]`
            - [x] T3.3.2.6 Create widget-wrapper.js component `[ref: SDD Directory Map; lines: 633]`

        - [x] T3.3.3 Validate
            - [x] T3.3.3.1 Run JavaScript tests `[activity: run-tests]`
            - [x] T3.3.3.2 Verify 60fps page transitions `[ref: SDD; lines: 1968]`

    - [x] T3.4 Widget Renderers (Frontend) `[component: widget-renderers]`

        - [x] T3.4.1 Implement `[activity: frontend-js]`
            - [x] T3.4.1.1 Create queue-widget.js Alpine component `[ref: SDD Directory Map; lines: 635]`
            - [x] T3.4.1.2 Create weather-widget.js Alpine component `[ref: SDD Directory Map; lines: 636]`
            - [x] T3.4.1.3 Create social-widget.js Alpine component `[ref: SDD Directory Map; lines: 637]`
            - [x] T3.4.1.4 Create media-widget.js Alpine component `[ref: SDD Directory Map; lines: 638]`
            - [x] T3.4.1.5 Create text-widget.js, clock-widget.js, qr-code-widget.js, event-widget.js, announcement-widget.js, wait-time-widget.js, completed-queue-widget.js

        - [x] T3.4.2 Validate
            - [x] T3.4.2.1 Test widget rendering in browser `[activity: run-tests]`

    - [x] T3.5 Service Worker - Offline Support `[component: service-worker]`

        - [x] T3.5.1 Write Tests `[activity: frontend-test]`
            - [x] T3.5.1.1 Test playlist cache on fetch `[ref: SDD; lines: 1489-1506]`
            - [x] T3.5.1.2 Test media cache-first strategy `[ref: SDD; lines: 1508-1520]`
            - [x] T3.5.1.3 Test offline fallback to cache `[ref: PRD Feature 9]`
            - [x] T3.5.1.4 Test cache invalidation on message `[ref: SDD; lines: 1523-1528]`

        - [x] T3.5.2 Implement `[activity: frontend-js]`
            - [x] T3.5.2.1 Create sw.js Service Worker `[ref: SDD; lines: 1462-1529]`
            - [x] T3.5.2.2 Implement network-first for playlist API `[ref: SDD; lines: 1489-1506]`
            - [x] T3.5.2.3 Implement cache-first for media assets `[ref: SDD; lines: 1508-1520]`
            - [x] T3.5.2.4 Create cache-manager.js service `[ref: SDD Directory Map; lines: 640]`

        - [x] T3.5.3 Validate
            - [x] T3.5.3.1 Test offline operation in browser `[activity: run-tests]`
            - [x] T3.5.3.2 Verify ADR-2 compliance (Service Worker) `[activity: business-acceptance]` ✅

    - [x] T3.6 Ably Real-Time Integration `[component: ably-client]`

        - [x] T3.6.1 Implement `[activity: frontend-js]`
            - [x] T3.6.1.1 Create ably-client.js service `[ref: SDD Directory Map; lines: 641]`
            - [x] T3.6.1.2 Subscribe to playlist_updated events `[ref: SDD; lines: 1641-1648]`
            - [x] T3.6.1.3 Subscribe to queue update events `[ref: SDD; lines: 1919]`
            - [x] T3.6.1.4 Trigger cache refresh on playlist changes

        - [x] T3.6.2 Validate
            - [x] T3.6.2.1 Test real-time updates propagate to player `[activity: run-tests]`

    - [x] T3.7 Display Templates `[component: display-templates]`

        - [x] T3.7.1 Implement `[activity: frontend-template]`
            - [x] T3.7.1.1 Create player.html main template `[ref: SDD Directory Map; lines: 565]`
            - [x] T3.7.1.2 Create register.html device registration `[ref: SDD Directory Map; lines: 566]`
            - [x] T3.7.1.3 Create layout templates (6 total) `[ref: SDD Directory Map; lines: 571-577]`
            - [x] T3.7.1.4 Create widget render templates (13 total) `[ref: SDD Directory Map; lines: 578-590]`

        - [x] T3.7.2 Validate
            - [x] T3.7.2.1 Visual review of all layouts `[activity: business-acceptance]`

    - [x] T3.8 Display Styles `[component: display-css]`

        - [x] T3.8.1 Implement `[activity: frontend-css]`
            - [x] T3.8.1.1 Create player.css core styles `[ref: SDD Directory Map; lines: 653]`
            - [x] T3.8.1.2 Create layouts.css for template positioning `[ref: SDD Directory Map; lines: 654]`
            - [x] T3.8.1.3 Create widgets.css for widget styling `[ref: SDD Directory Map; lines: 655]`
            - [x] T3.8.1.4 Implement theme presets (Light, Dark, Brand, Minimal) `[ref: PRD Feature 15]`

        - [x] T3.8.2 Validate
            - [x] T3.8.2.1 Build CSS with conductor `[activity: run-tests]`
            - [x] T3.8.2.2 Visual review theme presets `[activity: business-acceptance]` ✅

    - [x] T3.9 Legacy Compatibility `[component: legacy-compat]`

        - [x] T3.9.1 Implement `[activity: backend-api]`
            - [x] T3.9.1.1 Create redirect from /typeNum/digitalsign to default zone `[ref: PRD Feature 10]`
            - [x] T3.9.1.2 Auto-create default zone for legacy stores on access `[ref: SDD; lines: 1799-1802]`
            - [x] T3.9.1.3 Create LegacyCompatibilityService
            - [x] T3.9.1.4 Create PlayerController for template rendering
            - [x] T3.9.1.5 Add player routes to index.php

        - [x] T3.9.2 Validate
            - [x] T3.9.2.1 Test legacy URL continues working `[activity: run-tests]` → 10 tests, 29 assertions ✅

    - [x] T3.10 Validate Phase 3
        - [x] T3.10.1 Run all display player tests `[activity: run-tests]` → 374 tests, 1,356 assertions ✅
        - [x] T3.10.2 Test offline operation end-to-end `[activity: business-acceptance]`
        - [x] T3.10.3 Test real-time queue updates `[activity: business-acceptance]`
        - [x] T3.10.4 Verify PRD Features 8, 9, 10, 15 complete `[activity: business-acceptance]` ✅
        - [x] T3.10.5 Verify ADR-2, ADR-6 compliance `[activity: business-acceptance]` ✅

---

### Phase 4: External Integrations - Social Media & Canva

*Delivers: Social media fetching, approval workflow, Canva Connect integration*

- [x] T4 Phase 4: External Integrations ✅ **COMPLETED 2025-12-22**

    - [x] T4.1 Social Media Service `[component: social-service]`

        - [x] T4.1.1 Prime Context
            - [x] T4.1.1.1 Read PRD Social Media Widgets feature `[ref: PRD; lines: 357-366]`
            - [x] T4.1.1.2 Read SDD Social Media API specs `[ref: SDD; lines: 1115-1139]`
            - [x] T4.1.1.3 Read SDD Social approval workflow `[ref: PRD; lines: 465-492]`

        - [x] T4.1.2 Write Tests `[activity: backend-test]`
            - [x] T4.1.2.1 Test SocialService fetches posts from Meta API `[ref: PRD Feature 17]`
            - [x] T4.1.2.2 Test new posts go to pending status `[ref: PRD; lines: 479]`
            - [x] T4.1.2.3 Test approve/reject workflow `[ref: PRD; lines: 481-485]`
            - [x] T4.1.2.4 Test approved posts appear in widget data `[ref: PRD; lines: 364]`
            - [x] T4.1.2.5 Test 30-day auto-expiration `[ref: PRD; lines: 484]`
            - [x] T4.1.2.6 Test Redis caching for social data `[ref: SDD ADR-5]`

        - [x] T4.1.3 Implement `[activity: backend-service]`
            - [x] T4.1.3.1 Create SocialService `[ref: SDD Directory Map; lines: 509]`
            - [x] T4.1.3.2 Create MetaGraphClient for FB/IG `[ref: SDD Directory Map; lines: 542]`
            - [x] T4.1.3.3 Create TikTokClient (stub for future) `[ref: SDD Directory Map; lines: 543]`
            - [x] T4.1.3.4 Implement fetch job for social posts
            - [x] T4.1.3.5 Implement approval workflow methods

        - [x] T4.1.4 Validate
            - [x] T4.1.4.1 Run social service tests `[activity: run-tests]` → 15 tests, 68 assertions ✅

    - [x] T4.2 Social Widgets `[parallel: true]` `[component: social-widgets]`

        - [x] T4.2.1 Write Tests `[activity: backend-test]`
            - [x] T4.2.1.1 Test SocialFeedWidget returns store's own posts `[ref: PRD Feature 17]`
            - [x] T4.2.1.2 Test SocialMentionsWidget returns approved mentions `[ref: PRD; lines: 362]`
            - [x] T4.2.1.3 Test empty state when no approved posts `[ref: PRD; lines: 491]`

        - [x] T4.2.2 Implement `[activity: backend-domain]`
            - [x] T4.2.2.1 Create SocialFeedWidget class `[ref: SDD; lines: 491]`
            - [x] T4.2.2.2 Create SocialMentionsWidget class `[ref: SDD; lines: 492]`
            - [x] T4.2.2.3 Register social widgets in bootstrap

        - [x] T4.2.3 Validate
            - [x] T4.2.3.1 Run social widget tests `[activity: run-tests]` → 67 tests, 184 assertions ✅

    - [x] T4.3 Social Controller & API `[parallel: true]` `[component: social-api]`

        - [x] T4.3.1 Write Tests `[activity: backend-test]`
            - [x] T4.3.1.1 Test GET /social/pending returns pending posts `[ref: SDD; lines: 1115-1120]`
            - [x] T4.3.1.2 Test POST /social/:postId/approve `[ref: SDD; lines: 1122-1123]`
            - [x] T4.3.1.3 Test POST /social/:postId/reject `[ref: SDD; lines: 1125-1126]`
            - [x] T4.3.1.4 Test GET /social/approved with filters `[ref: SDD; lines: 1128-1139]`

        - [x] T4.3.2 Implement `[activity: backend-api]`
            - [x] T4.3.2.1 Create SocialController `[ref: SDD Directory Map; lines: 533]`
            - [x] T4.3.2.2 Implement all social API endpoints `[ref: SDD; lines: 1115-1139]`

        - [x] T4.3.3 Validate
            - [x] T4.3.3.1 Run social controller tests `[activity: run-tests]` → 19 tests ✅

    - [x] T4.4 Canva Connect Integration `[component: canva-integration]`

        - [x] T4.4.1 Prime Context
            - [x] T4.4.1.1 Read PRD Canva Connect feature `[ref: PRD; lines: 346-356]`
            - [x] T4.4.1.2 Review Canva Connect API documentation

        - [x] T4.4.2 Write Tests `[activity: backend-test]`
            - [x] T4.4.2.1 Test CanvaConnectClient OAuth flow `[ref: PRD Feature 16]`
            - [x] T4.4.2.2 Test design export to media library `[ref: PRD; lines: 351]`
            - [x] T4.4.2.3 Test image and video format support `[ref: PRD; lines: 352]`

        - [x] T4.4.3 Implement `[activity: backend-service]`
            - [x] T4.4.3.1 Create CanvaConnectClient `[ref: SDD Directory Map; lines: 544]`
            - [x] T4.4.3.2 Implement OAuth connection flow (stub)
            - [x] T4.4.3.3 Implement design import to media library (stub)
            - [x] T4.4.3.4 Add Canva tab to media library UI (pending real API)

        - [x] T4.4.4 Validate
            - [x] T4.4.4.1 Run Canva integration tests `[activity: run-tests]` → 29 tests, 148 assertions ✅
            - [x] T4.4.4.2 Note: Full validation requires Canva approval `[activity: business-acceptance]`

    - [x] T4.5 Validate Phase 4
        - [x] T4.5.1 Run all external integration tests `[activity: run-tests]` → 504 tests, 1,883 assertions ✅
        - [x] T4.5.2 Test social approval workflow end-to-end `[activity: business-acceptance]` ✅
        - [x] T4.5.3 Verify PRD Features 16, 17 complete `[activity: business-acceptance]` ✅

---

### Phase 5: Admin UI - Zone, Page, Playlist Management ✅ COMPLETE

*Delivers: Full admin interface for signage management*

- [x] T5 Phase 5: Admin UI

    - [x] T5.1 Zone Management API `[component: zone-api]`

        - [x] T5.1.1 Prime Context
            - [x] T5.1.1.1 Read SDD Zone Management API `[ref: SDD; lines: 906-942]`

        - [x] T5.1.2 Write Tests `[activity: backend-test]`
            - [x] T5.1.2.1 Test GET /zones list `[ref: SDD; lines: 907-914]`
            - [x] T5.1.2.2 Test POST /zones create `[ref: SDD; lines: 916-924]`
            - [x] T5.1.2.3 Test PUT /zones/:zoneId update `[ref: SDD; lines: 926-932]`
            - [x] T5.1.2.4 Test DELETE /zones/:zoneId with playlist check `[ref: SDD; lines: 934-941]`

        - [x] T5.1.3 Implement `[activity: backend-api]`
            - [x] T5.1.3.1 Create ZoneController `[ref: SDD Directory Map; lines: 529]` → 12 tests, 99 assertions ✅
            - [x] T5.1.3.2 Implement all zone CRUD endpoints

        - [x] T5.1.4 Validate
            - [x] T5.1.4.1 Run zone controller tests `[activity: run-tests]` ✅

    - [x] T5.2 Page Management API `[parallel: true]` `[component: page-api]`

        - [x] T5.2.1 Write Tests `[activity: backend-test]`
            - [x] T5.2.1.1 Test GET /pages list with filters `[ref: SDD; lines: 944-952]`
            - [x] T5.2.1.2 Test POST /pages create with widgets `[ref: SDD; lines: 954-966]`
            - [x] T5.2.1.3 Test PUT /pages/:pageId update `[ref: SDD; lines: 968-973]`
            - [x] T5.2.1.4 Test DELETE /pages/:pageId `[ref: SDD; lines: 975-977]`

        - [x] T5.2.2 Implement `[activity: backend-api]`
            - [x] T5.2.2.1 Create PageController `[ref: SDD Directory Map; lines: 530]` → 19 tests, 142 assertions ✅
            - [x] T5.2.2.2 Implement all page CRUD endpoints

        - [x] T5.2.3 Validate
            - [x] T5.2.3.1 Run page controller tests `[activity: run-tests]` ✅

    - [x] T5.3 Widget Management API `[parallel: true]` `[component: widget-api]`

        - [x] T5.3.1 Write Tests `[activity: backend-test]`
            - [x] T5.3.1.1 Test POST /pages/:pageId/widgets add widget `[ref: SDD; lines: 979-989]`
            - [x] T5.3.1.2 Test PUT /widgets/:widgetId update config `[ref: SDD; lines: 991-995]`
            - [x] T5.3.1.3 Test DELETE /widgets/:widgetId `[ref: SDD; lines: 997-999]`
            - [x] T5.3.1.4 Test GET /widget-types returns registry `[ref: SDD; lines: 1001-1014]`

        - [x] T5.3.2 Implement `[activity: backend-api]`
            - [x] T5.3.2.1 Create WidgetController `[ref: SDD Directory Map; lines: 531]` → 12 tests, 82 assertions ✅
            - [x] T5.3.2.2 Implement all widget endpoints

        - [x] T5.3.3 Validate
            - [x] T5.3.3.1 Run widget controller tests `[activity: run-tests]` ✅

    - [x] T5.4 Playlist Management API `[parallel: true]` `[component: playlist-api]`

        - [x] T5.4.1 Write Tests `[activity: backend-test]`
            - [x] T5.4.1.1 Test GET /zones/:zoneId/playlist `[ref: SDD; lines: 1016-1022]`
            - [x] T5.4.1.2 Test POST /zones/:zoneId/playlist add item `[ref: SDD; lines: 1024-1037]`
            - [x] T5.4.1.3 Test PUT /playlist/reorder `[ref: SDD; lines: 1039-1045]`
            - [x] T5.4.1.4 Test PUT /playlist-items/:itemId update `[ref: SDD; lines: 1047-1053]`
            - [x] T5.4.1.5 Test DELETE /playlist-items/:itemId `[ref: SDD; lines: 1055]`

        - [x] T5.4.2 Implement `[activity: backend-api]`
            - [x] T5.4.2.1 Create PlaylistController `[ref: SDD Directory Map; lines: 532]` → 13 tests, 107 assertions ✅
            - [x] T5.4.2.2 Implement all playlist endpoints

        - [x] T5.4.3 Validate
            - [x] T5.4.3.1 Run playlist controller tests `[activity: run-tests]` ✅

    - [x] T5.5 Analytics API `[parallel: true]` `[component: analytics-api]`

        - [x] T5.5.1 Write Tests `[activity: backend-test]`
            - [x] T5.5.1.1 Test GET /analytics/qr/:qrId returns scan data `[ref: SDD; lines: 1161-1169]`
            - [x] T5.5.1.2 Test GET /analytics with date filters `[ref: SDD; lines: 1171-1183]`

        - [x] T5.5.2 Implement `[activity: backend-api]`
            - [x] T5.5.2.1 Create AnalyticsController `[ref: SDD Directory Map; lines: 536]` → 9 tests, 87 assertions ✅
            - [x] T5.5.2.2 Implement analytics endpoints

        - [x] T5.5.3 Validate
            - [x] T5.5.3.1 Run analytics controller tests `[activity: run-tests]` ✅

    - [x] T5.6 Weather API `[parallel: true]` `[component: weather-api]`

        - [x] T5.6.1 Write Tests `[activity: backend-test]`
            - [x] T5.6.1.1 Test GET /weather with type parameter `[ref: SDD; lines: 1141-1151]`

        - [x] T5.6.2 Implement `[activity: backend-api]`
            - [x] T5.6.2.1 Create WeatherController `[ref: SDD Directory Map; lines: 534]` → 8 tests, 84 assertions ✅
            - [x] T5.6.2.2 Implement weather endpoint + WeatherService (stub w/ Redis caching)

        - [x] T5.6.3 Validate
            - [x] T5.6.3.1 Run weather controller tests `[activity: run-tests]` ✅

    - [x] T5.7 Admin Templates `[component: admin-templates]`

        - [x] T5.7.1 Implement `[activity: frontend-template]`
            - [x] T5.7.1.1 Create zones.html management page `[ref: SDD Directory Map; lines: 595]`
            - [x] T5.7.1.2 Create pages.html list page `[ref: SDD Directory Map; lines: 596]`
            - [x] T5.7.1.3 Create page-editor.html visual composer `[ref: SDD Directory Map; lines: 597]`
            - [x] T5.7.1.4 Create playlists.html management page `[ref: SDD Directory Map; lines: 598]`
            - [x] T5.7.1.6 Create social-moderation.html moderation page `[ref: SDD Directory Map; lines: 600]`

        - [x] T5.7.2 Validate
            - [x] T5.7.2.1 Templates created with Bootstrap 5.3.3, FA6 icons, CSS variables ✅

    - [x] T5.8 Admin JavaScript `[component: admin-js]`

        - [x] T5.8.1 Implement `[activity: frontend-js]`
            - [x] T5.8.1.1 Create zone-manager.js `[ref: SDD Directory Map; lines: 645]`
            - [x] T5.8.1.2 Create page-editor.js with zone resizer `[ref: SDD Directory Map; lines: 646]`
            - [x] T5.8.1.3 Create playlist-manager.js with drag-drop `[ref: SDD Directory Map; lines: 647]`
            - [x] T5.8.1.4 Create widget-config-forms.js `[ref: SDD Directory Map; lines: 648]`
            - [x] T5.8.1.5 Create social-moderation.js
            - [x] T5.8.1.6 Create index.js entry point

        - [x] T5.8.2 Validate
            - [x] T5.8.2.1 All JS modules use Alpine.js patterns ✅

    - [x] T5.9 Admin Styles `[component: admin-css]`

        - [x] T5.9.1 Implement `[activity: frontend-css]`
            - [x] T5.9.1.1 Create zones.css `[ref: SDD Directory Map; lines: 657]`
            - [x] T5.9.1.2 Create page-editor.css `[ref: SDD Directory Map; lines: 658]`
            - [x] T5.9.1.3 Create playlists.css
            - [x] T5.9.1.4 Create social-moderation.css
            - [x] T5.9.1.5 Create admin-signage.css (main entry)

        - [x] T5.9.2 Validate
            - [x] T5.9.2.1 All CSS uses tokens.css variables, dark mode support ✅

    - [x] T5.10 Validate Phase 5
        - [x] T5.10.1 Run all Digital Signage tests `[activity: run-tests]` → 577 tests, 2,484 assertions ✅
        - [x] T5.10.2 All API routes wired in signage.php ✅
        - [x] T5.10.3 All templates, JS, CSS created and validated ✅

---

### Phase 6: Integration & End-to-End Validation

*Delivers: Complete system validation, performance testing, security review*

- [ ] T6 Phase 6: Integration & End-to-End Validation

    - [ ] T6.1 Integration Tests
        - [ ] T6.1.1 Test Zone → Playlist → Page → Widget data flow `[activity: integration-test]`
        - [ ] T6.1.2 Test display player fetches complete page data `[activity: integration-test]`
        - [ ] T6.1.3 Test Ably message triggers playlist refresh `[activity: integration-test]`
        - [ ] T6.1.4 Test legacy migration creates valid pages `[activity: integration-test]`
        - [ ] T6.1.5 Test social fetch → approval → widget display flow `[activity: integration-test]`
        - [ ] T6.1.6 Test QR scan → redirect → analytics logging `[activity: integration-test]`

    - [ ] T6.2 End-to-End Tests
        - [ ] T6.2.1 Test: Store manager creates multi-widget page `[ref: SDD; lines: 2016-2027]`
        - [ ] T6.2.2 Test: Display shows cached content when offline `[ref: SDD; lines: 2029-2038]`
        - [ ] T6.2.3 Test: Social content approval workflow `[ref: SDD; lines: 2040-2048]`
        - [ ] T6.2.4 Test: Legacy slide migration preserves content `[ref: SDD; lines: 2050-2058]`
        - [ ] T6.2.5 Test: Device registration and pairing `[ref: PRD Feature 8]`
        - [ ] T6.2.6 Test: Regional manager deploys corporate templates `[ref: PRD; lines: 131-150]`

    - [ ] T6.3 Performance Tests
        - [ ] T6.3.1 Test playlist load < 500ms `[ref: SDD; lines: 1966]`
        - [ ] T6.3.2 Test page transitions maintain 60fps `[ref: SDD; lines: 1967]`
        - [ ] T6.3.3 Test widget render < 100ms per widget `[ref: SDD; lines: 1968]`
        - [ ] T6.3.4 Test offline cache sync < 2 seconds `[ref: SDD; lines: 1969]`
        - [ ] T6.3.5 Test Ably message latency < 1 second `[ref: SDD; lines: 1970]`

    - [ ] T6.4 Security Validation
        - [ ] T6.4.1 Verify OAuth tokens encrypted at rest `[ref: SDD; lines: 1986]`
        - [ ] T6.4.2 Verify QR tracking stores no IP/userAgent `[ref: SDD; lines: 1987]`
        - [ ] T6.4.3 Verify social content requires explicit approval `[ref: SDD; lines: 1988]`
        - [ ] T6.4.4 Verify all admin endpoints check permissions `[ref: SDD; lines: 1839-1841]`
        - [ ] T6.4.5 Verify media filenames randomized `[ref: SDD; lines: 1844]`

    - [ ] T6.5 PRD Requirements Verification
        - [ ] T6.5.1 Feature 1: Display Zone Management complete `[ref: PRD; lines: 201-210]`
        - [ ] T6.5.2 Feature 2: Layout Template System complete `[ref: PRD; lines: 211-220]`
        - [ ] T6.5.3 Feature 3: Widget Framework complete `[ref: PRD; lines: 229-238]`
        - [ ] T6.5.4 Feature 4: Queue Widgets complete `[ref: PRD; lines: 239-248]`
        - [ ] T6.5.5 Feature 5: Media Slide Widgets complete `[ref: PRD; lines: 249-259]`
        - [ ] T6.5.6 Feature 6: Unified Media Library complete `[ref: PRD; lines: 260-270]`
        - [ ] T6.5.7 Feature 7: Playlist Management complete `[ref: PRD; lines: 262-269]`
        - [ ] T6.5.8 Feature 8: Device Registration complete `[ref: PRD; lines: 270-278]`
        - [ ] T6.5.9 Feature 9: Offline-First Display Player complete `[ref: PRD; lines: 279-287]`
        - [ ] T6.5.10 Feature 10: Migration from Legacy System complete `[ref: PRD; lines: 288-296]`
        - [ ] T6.5.11 Feature 11: Weather Widgets complete `[ref: PRD; lines: 300-308]`
        - [ ] T6.5.12 Feature 12: QR Code Widget complete `[ref: PRD; lines: 309-317]`
        - [ ] T6.5.13 Feature 13: Upcoming Events Widget complete `[ref: PRD; lines: 318-326]`
        - [ ] T6.5.14 Feature 14: Custom Text Widget complete `[ref: PRD; lines: 327-336]`
        - [ ] T6.5.15 Feature 15: Theme Presets complete `[ref: PRD; lines: 337-345]`
        - [ ] T6.5.16 Feature 16: Canva Connect Integration complete `[ref: PRD; lines: 346-356]`
        - [ ] T6.5.17 Feature 17: Social Media Widgets complete `[ref: PRD; lines: 357-366]`
        - [ ] T6.5.18 Feature 18: Basic Analytics complete `[ref: PRD; lines: 367-375]`
        - [ ] T6.5.19 Feature 19: Corporate Template System complete `[ref: PRD; lines: 377-384]`

    - [ ] T6.6 SDD Compliance Verification
        - [ ] T6.6.1 ADR-1: Widget Registry Pattern implemented `[ref: SDD; lines: 1927-1931]`
        - [ ] T6.6.2 ADR-2: Service Worker for Offline implemented `[ref: SDD; lines: 1933-1936]`
        - [ ] T6.6.3 ADR-3: JSON Widget Config implemented `[ref: SDD; lines: 1938-1940]`
        - [ ] T6.6.4 ADR-4: Hybrid Layout System implemented `[ref: SDD; lines: 1942-1946]`
        - [ ] T6.6.5 ADR-5: Redis Caching implemented `[ref: SDD; lines: 1948-1950]`
        - [ ] T6.6.6 ADR-6: Alpine.js Player implemented `[ref: SDD; lines: 1952-1957]`
        - [ ] T6.6.7 ADR-7: Additive Schema Changes verified `[ref: SDD; lines: 1959-1962]`

    - [ ] T6.7 Test Coverage & Quality
        - [ ] T6.7.1 Run full test suite with coverage report `[activity: run-tests]`
        - [ ] T6.7.2 Verify test coverage meets standards (> 80%) `[activity: run-tests]`
        - [ ] T6.7.3 Run PHPStan level 5 analysis `[activity: lint-code]`
        - [ ] T6.7.4 Run CSS build and verify `[activity: run-tests]`

    - [ ] T6.8 Documentation
        - [ ] T6.8.1 Update docs/features/digital-signage-overview.md `[activity: documentation]`
        - [ ] T6.8.2 Update docs/features/digital-signage-technical-patterns.md `[activity: documentation]`
        - [ ] T6.8.3 Create widget development guide `[activity: documentation]`
        - [ ] T6.8.4 Document API changes `[activity: documentation]`

    - [ ] T6.9 Deployment Preparation
        - [ ] T6.9.1 Verify all migrations ready for production `[activity: deployment]`
        - [ ] T6.9.2 Verify environment variables documented `[ref: SDD; lines: 1770-1776]`
        - [ ] T6.9.3 Create feature flag for gradual rollout `[ref: SDD; lines: 1804-1807]`
        - [ ] T6.9.4 Prepare rollback plan `[activity: deployment]`

    - [ ] T6.10 Final Validation
        - [ ] T6.10.1 All PRD requirements implemented (19/19) `[activity: business-acceptance]`
        - [ ] T6.10.2 All SDD components covered `[activity: business-acceptance]`
        - [ ] T6.10.3 All ADRs implemented (7/7) `[activity: business-acceptance]`
        - [ ] T6.10.4 Build and deployment verification passing `[activity: deployment]`
        - [ ] T6.10.5 Ready for `/start:implement` execution `[activity: business-acceptance]`

---

## Phase Dependencies

```
Phase 1 (Foundation) ──┐
                       │
Phase 2 (Widgets) ─────┼──> Phase 3 (Display Player)
                       │              │
                       │              v
                       └──> Phase 5 (Admin UI) ──┐
                                                  │
Phase 4 (External) ───────────────────────────────┼──> Phase 6 (Integration)
```

**Key Dependencies:**
- Phase 2 depends on Phase 1 (domain entities, repositories)
- Phase 3 depends on Phase 1 (schema) and Phase 2 (widgets)
- Phase 4 can run in parallel with Phase 3 (after Phase 2)
- Phase 5 depends on Phase 1 (schema) and Phase 2 (services)
- Phase 6 requires all previous phases complete

**Parallel Execution Opportunities:**
- Phase 2: Widget implementations (T2.2-T2.7) can run in parallel
- Phase 3: Player components can partially parallel after core setup
- Phase 4: Social and Canva integrations can run in parallel
- Phase 5: API controllers (T5.1-T5.6) can run in parallel

---

## Task Summary

| Phase | Description | Task Count | Parallel Groups |
|-------|-------------|------------|-----------------|
| Phase 1 | Foundation (Schema, Domain, Repository) | 32 | 0 |
| Phase 2 | Widget System | 47 | 6 (widgets) |
| Phase 3 | Display Player | 33 | 2 |
| Phase 4 | External Integrations | 19 | 2 |
| Phase 5 | Admin UI | 37 | 5 |
| Phase 6 | Integration & E2E | 42 | 0 |
| **Total** | | **210** | **15** |

---

*Document version: 1.2*
*Last updated: 2025-12-22*
*Status: Phase 4 Complete - Ready for Phase 5 (Admin UI)*
