# Implementation Plan - Revo Music Booking & Management

## 1. Database Schema [✅ COMPLETED]

### Users & Auth [✅ COMPLETED]
- [x] Standard Laravel users table + `status` (active/inactive).
- [x] Spatie Roles: `super-admin`, `band`, `admin`, `manager`.

### Tables [✅ COMPLETED]
- [x] `name` (string): Table 01, Table 02, etc.
- [x] `token` (string, unique): Unique identifier for QR codes.
- [x] `daily_request_limit` (integer): Max requests per day.
- [x] `current_daily_requests` (integer): Track requests made today.

### Settings [✅ COMPLETED]
- [x] `key` / `value` store for: `google_review_link`, `menu_link`, `music_system_status`.

### Song Requests [✅ COMPLETED]
- [x] `table_id` (foreign key).
- [x] `song_title` (string).
- [x] `youtube_id` (string, nullable).
- [x] `status` (enum): `pending`, `accepted`, `rejected`.
- [x] `played_at` (timestamp).

---

## 2. Phase 1: Core Admin & System Access [✅ COMPLETED]
- [x] Setup Laravel 12 + Spatie Permissions.
- [x] Create Roles (`super-admin`, `band`) and seeders.
- [x] Build Super Admin Login & Dashboard layout.
- [x] [Super Admin] User Management (CRUD with activate/deactivate).
- [x] [Super Admin] Table Management (with Daily request count & per-table scan links).
- [x] [Super Admin] Global Settings (Review link, Menu link, System Status).
- [x] [Super Admin] Unified QR Generation (points to public landing page).

---

## 3. Phase 2: Band Portal [✅ COMPLETED]
- [x] [Band] Secure Login.
- [x] [Band] Live Song Request Queue (Live/Pending/Accepted list).
- [x] [Band] Accept/Reject/Skip song request functionality.
- [x] [Band] Real-time stats (Pending count, Played today).
- [x] [Band] YouTube integration (Preview song directly from queue).

---

## 4. Phase 3: Customer Experience [✅ COMPLETED]
- [x] Public Landing Page (Brand identity + Review/Menu/Request links).
- [x] Table-specific Scan Page (Accessed via per-table QR).
- [x] Song Request Form with YouTube live search.
- [x] Daily Limit enforcement (Prevents over-requesting from a table).
- [x] Maintenance Mode behavior (Gracefully disables requests).

---

## 5. Phase 4: Polish & Final Testing [✅ COMPLETED]
- [x] Responsive UI testing for all mobile devices.
- [x] QR Code print styling and layout.
- [x] Final security audit (Permission checks on all endpoints).
- [x] Performance optimization (Live queue auto-refresh logic).
