A beautiful, secure React Native mobile application for video streaming with JWT authentication and seamless YouTube video playback.
Login Screen Secure authentication with email & password |
Signup Screen New user registration with validation |
Dashboard Browse curated startup videos |
Video Player Full-screen playback with controls |
Settings User profile & account management |
|
|
| Technology | Version | Purpose |
|---|---|---|
| React Native | 0.81.5 | Cross-platform mobile framework |
| Expo | ~54.0 | Development & build platform |
| React Navigation | 7.x | Screen navigation & routing |
| Axios | 1.13.4 | HTTP client for API calls |
| AsyncStorage | 2.2.0 | Local data persistence |
| react-native-youtube-iframe | 2.x | YouTube video playback |
# Clone and install
git clone <your-repo-url>
cd frontend-repo
npm install
# Configure API endpoint
# Edit src/services/api.js with your backend IP
const API_BASE_URL = 'http://YOUR_IP:5000';
# Start development server
npm startApp.js (Root)
βββ NavigationContainer
β βββ AuthStack (Unauthenticated)
β β βββ LoginScreen
β β βββ SignupScreen
β β
β βββ MainStack (Authenticated)
β βββ DashboardScreen
β β βββ VideoTile Γ 2
β βββ VideoPlayerScreen
β β βββ YoutubePlayer
β βββ SettingsScreen
App Launch β Check Token β [Found? MainStack : AuthStack]
β
Login β Save Token β MainStack
User Action β Component β API Service β Axios (adds JWT) β Backend
β
UI Update β Component β API Service β Axios β Response
| Color | Hex | Usage |
|---|---|---|
| Primary Blue | #007AFF |
Buttons, links, accents |
| Background | #f8f9fa |
App background |
| Card | #ffffff |
Card background |
| Text Primary | #1a1a1a |
Main text |
| Text Secondary | #666666 |
Secondary text |
| Player BG | #000000 |
Video player |
| Error | #FF3B30 |
Error states |
| Element | Size | Weight |
|---|---|---|
| Large Title | 32px | Bold (700) |
| Title | 20px | Bold (700) |
| Headline | 18px | Semibold (600) |
| Body | 16px | Regular (400) |
| Caption | 14px | Medium (500) |
frontend-repo/
β
βββ src/
β βββ components/
β β βββ VideoTile.js
β β
β βββ screens/
β β βββ LoginScreen.js
β β βββ SignupScreen.js
β β βββ DashboardScreen.js
β β βββ VideoPlayerScreen.js
β β βββ SettingsScreen.js
β β
β βββ services/
β β βββ api.js
β β βββ auth.js
β β
β βββ utils/
β βββ storage.js
β
βββ screenshots/
βββ App.js
βββ package.json
βββ README.md
// Automatic JWT injection
api.interceptors.request.use(async (config) => {
const token = await AsyncStorage.getItem('authToken');
if (token) config.headers.Authorization = `Bearer ${token}`;
return config;
});
// Automatic logout on 401
api.interceptors.response.use(
(response) => response,
async (error) => {
if (error.response?.status === 401) {
await AsyncStorage.removeItem('authToken');
}
return Promise.reject(error);
}
);| Method | Endpoint | Purpose |
|---|---|---|
| POST | /auth/signup |
Create account |
| POST | /auth/login |
Authenticate |
| GET | /auth/me |
Get profile |
| POST | /auth/logout |
End session |
| GET | /dashboard |
Get videos |
| GET | /video/:id/stream |
Get stream URL |
1. First Launch
ββ No Token β Login Screen
2. Signup
ββ Enter Details β POST /auth/signup β Success β Login Screen
3. Login
ββ Credentials β POST /auth/login β JWT β AsyncStorage β Dashboard
4. Browse Videos
ββ GET /dashboard β Display 2 Videos β Pull-to-refresh
5. Watch Video
ββ Tap Video β GET /video/:id/stream β YouTube Player
6. Settings
ββ View Profile β Logout β Clear Token β Login Screen
Problem: Can't connect to backend
Fix:
- Backend running? Check
http://localhost:5000 - Correct IP in
api.js? Use computer's IP, not localhost - Same WiFi network?
- Test from phone browser:
http://YOUR_IP:5000
Problem: Error 153 or video fails
Fix:
- Using
react-native-youtube-iframe? (Not webview) - Android: Set
androidLayerType: 'hardware' - Playback token valid?
# Install EAS CLI
npm install -g eas-cli
# Android APK
eas build --platform android --profile preview
# iOS (requires Apple Developer account)
eas build --platform ios --profile productionβ
React Native mobile app
β
Thin client (zero business logic)
β
JWT authentication
β
Signup & Login screens
β
Dashboard with 2 videos
β
Video player with controls
β
Settings screen
β
Professional UI/UX
β
Error handling
β
Clean code structure
Monish S
π§ monishravi508@gmail.com
π GitHub
πΌ LinkedIn
Educational project demonstrating full-stack mobile development.
Built with β€οΈ using React Native & Expo




