# Mobile Roadmap

The current PHP/MySQL web application remains the single database-backed source of truth. Mobile work should reuse existing business rules, helper functions, permissions, schedule conflict checks, resource status rules, and notification workflows.

## Phase 1: PWA Readiness

- Installable Progressive Web App for Android, iPhone, and Windows.
- Shared manifest, service worker, app icons, theme color, and splash screen assets.
- Responsive tables, forms, buttons, dashboard, calendar, reports, schedule pages, and cameraman portal screens.
- Cameraman bottom navigation for Home, My Recordings, Attendance, Issues, and Profile.

## Phase 2: API Foundation

- Add JSON endpoint controllers under `/api/v1/`.
- Keep one MySQL database and reuse `includes/functions.php` logic.
- Add token-based mobile authentication without breaking the existing web session flow.
- Add rate limiting, structured error responses, and API audit logging.

## Phase 3: Flutter Android App

- Build a Flutter Android app for cameramen first.
- Support login, today/upcoming recordings, start/complete/cancel/report issue, attendance, profile, and notifications.
- Add admin/viewer dashboards after cameraman workflows are stable.

## Push Notifications

- Store mobile device tokens per user/cameraman.
- Send alerts for schedule assignment, recording start reminders, conflicts, issues, cancellations, and resource changes.
- Keep in-app notifications as the fallback channel.

## WhatsApp Notifications

- Add a provider abstraction before choosing a WhatsApp gateway.
- Use WhatsApp for urgent operational alerts only.
- Log every outbound WhatsApp message in the activity timeline.

## QR Attendance

- Generate signed QR codes for attendance stations or rooms.
- Validate QR freshness and cameraman identity.
- Store check-in/check-out records in `cameraman_attendance`.

## GPS Attendance

- Add optional GPS capture on check-in and check-out.
- Validate allowed campus radius when enabled.
- Store location metadata separately from core attendance status.

## Offline Attendance Sync

- Cache pending check-ins/check-outs on the mobile device.
- Sync when network returns.
- Resolve duplicates server-side using attendance date, cameraman ID, and timestamps.

## Live Resource Dashboard

- Build a mobile-friendly live view for cameramen, cameras, rooms, occupied resources, and expected free times.
- Reuse centralized overlap and resource status functions.

## Camera Resource Tracking

- Track camera assignment, maintenance, issue status, and usage history.
- Add optional QR/barcode scan for physical camera handover later.
