How amazonappdev/react-native-multi-tv-app-sample works
Project type and purpose
• This is a front-end sample app built with React Native and Expo Router, targeting multiple TV platforms (Android TV, Fire TV, tvOS) plus web.
• It demonstrates best practices for TV-specific UI: drawer navigation, grid layout, focus management, remote-control mapping, and video playback.
File structure
• Top-level folders:
• app/ : file-based routing (Expo Router) for screens and layouts
• components/ : reusable UI pieces (drawer content, focusable pressables, player controls)
• hooks/ : custom hooks (e.g., useScale)
• Version control and CI/CD:
• .github/ : issue & PR templates
• .husky/ : git hooks for linting and commit message checks
• Configuration files: babel.config.js, metro.config.js, tsconfig.json, eslint.config.js, commitlint.config.js
• No backend or data-service folder – this is purely client-side.
README for additional insights
• Core libraries: Expo (router, drawer), react-native-video, react-tv-space-navigation.
• Navigation structure (drawer + nested stacks), platform abstraction for remote control, and a customizable VideoPlayer screen.
a. Main components
• Presentation Layer (UI Screens):
– DrawerLayout (_layout.tsx under app/(drawer))
– Explore, TV grid, Details, Player screens
• Navigation Layer:
– Expo Router file-based routes (+html.tsx, +not-found.tsx, _layout.tsx)
– CustomDrawerContent
• Input Management:
– RemoteControlManager.ts[x]/android/ios + SupportedKeys
– React TV Space Navigation for focus management
• Media Engine:
– react-native-video integrated in VideoPlayer component
• Assets Store:
• Native Platform Adapters:
– Expo (Android TV, tvOS, Web)
b. Relationships and interactions
• User remote input → RemoteControlManager → Focus Management → UI Screens via React TV Space Navigation
• UI Screens → Navigation Layer (Expo Router) → Renders appropriate React component
• Player Screen → Media Engine for video decoding and playback
c. Architectural patterns
• File-based routing (Router) for automatic route registration
• Single-Page App style with nested layouts (drawer + content)
• Separation of concerns: input management, navigation, presentation, media playback
d. Key technologies
• Expo Router & Drawer
• react-native-video
• react-tv-space-navigation
• TypeScript + React Native + Metro Bundler