# PLAY CHANNELS — PRD

## Original problem statement
Professional streaming app "PLAY CHANNELS" (Netflix-inspired, own identity) for Android phones, Android TV, TV Box, Fire TV. Login (user/password, show password, keep session); home with big banners, featured movies/series, categories, dark UI; movies, series+seasons, live channels, covers/synopses, favorites, history, video player; integrated REAL VPN (toggle, indicator, server selection, auto-reconnect, DNS leak protection, secure config, status screen, servers via admin) using WireGuard/OpenVPN; separate protected admin panel (logo, background, banners, categories, content, channels, users, servers, VPN, remote config); remote-control navigation; own backend, DB, API, auth. No paid/external services without authorization. Content must be own/licensed.

## User choices
- Admin panel: protected route /admin in the same project (own admin login)
- Defaults: images by URL, VPN = architecture + native module contract (needs Android build), open-licensed sample content, seeded admin/admin123 & teste/teste123

## Architecture
- Backend FastAPI + MongoDB (server.py, seed.py). JWT (bcrypt, 30-day session), roles admin/user, expiry per user.
- Frontend Expo Router: login, (tabs) Início/Ao Vivo/Minha Lista/VPN (side rail on TV, NativeTabs iOS26), browse, title/[id], player (expo-video), admin.
- VPN: src/vpn/native.ts (contract for native module "PlayChannelsVpn"), VpnContext (connect, auto-reconnect backoff, prefs). Docs: /app/docs/VPN_NATIVE_MODULE.md

## Implemented (2026-06)
- All user flows above, admin CRUD for banners/categories/content/channels/vpn_servers/users + remote config. Tested: iteration_1 all pass.

## Backlog
- P0: Native Android VPN module (WireGuard GoBackend) + build; per-user WireGuard peer generation in backend
- P1: Image uploads (object storage) instead of URLs; EPG for live channels; search; resume from position
- P1: D-pad focus tuning on real TV; custom player controls for TV
- P2: Profiles, parental control, multi-device session limits, subscription/payments
