https://nxtwatch-coral.vercel.app/
A full-featured video streaming platform built using React.js.
It replicates core YouTube functionalities like video browsing, authentication, dark/light theming, saving videos, and playback. All powered by React, Context API, and Styled-Components.
- Secure login using JWT tokens
- Token stored via
js-cookie - Protected routes (unauthenticated users are redirected to login)
- Logout with confirmation popup
- Home Page: Browse and search for videos
- Trending Page: Displays top trending videos
- Gaming Page: Shows popular gaming videos
- Saved Videos: User’s personalized saved videos list
- Video Details: Watch individual videos using
React Player
- Global light/dark mode toggle using Context API + styled-components ThemeProvider
- All UI elements adapt dynamically to theme changes
- Add/remove videos to the “Saved” list from any page
- State managed globally through
SavedVideosContext
- Fetch data from
apis.ccbp.inendpoints - JWT-protected GET calls for videos
- Graceful handling of:
- Loading states (spinner)
- Empty results (No videos found)
- Failure states (Retry button + fallback UI)
- Responsive player using
react-player - Like/Dislike/Save interactions with instant UI feedback
Main Technologies:
React.js, React Router, Context API, Styled Components, REST APIs, js-cookie, React Player
Core Layers:
- Authentication Layer: Login + ProtectedRoute
- UI Layout Layer: Header, Sidebar, and Main Routes
- Data Layer: Fetches videos securely with JWT
- Global State Layer: ThemeContext & SavedVideosContext
- Presentation Layer: Video cards, loaders, and responsive UI
Frontend:
- React.js (Class Components)
- React Router
- Context API
- Styled Components
- js-cookie
- React Player
Other Tools:
- HTML5, CSS3, ES6+
- RESTful APIs
- Git & GitHub
src/
├── components/
│ ├── Header/
│ ├── Sidebar/
│ ├── Home/
│ ├── Trending/
│ ├── Gaming/
│ ├── SavedVideos/
│ ├── VideoItemDetails/
│ ├── Login/
│ ├── NotFound/
│ ├── Loader/
│ ├── ProtectedRoute/
│ └── VideoCards/
│
├── context/
│ ├── ThemeContext.js
│ └── SavedVideosContext.js
│
├── style/
│ └── theme.js
│
├── App.js
├── index.js
└── ...
| Concern | Implementation |
|---|---|
| Global State | Context API (Theme + Saved Videos) |
| Styling | Styled Components with dynamic themes |
| Authentication | JWT with js-cookie |
| Routing | React Router + Protected Routes |
| API Handling | Async fetch with loaders, retries, and fallback UIs |
| Reusability | Modular card components and styledContainers |
| Video Player | Integrated via react-player |
- Verified JWT flow (valid/invalid credentials)
- Ensured protected routes redirect unauthenticated users
- Tested all API endpoints for success and failure
- Checked UI responsiveness across light/dark themes
- Validated save/unsave actions and playback behavior
- Used
data-testidattributes for automation readiness
# Clone repository
git clone https://github.com/ashruthg/nxtwatch.git
cd nxtwatch
# Install dependencies
npm install
# Start development server
npm start
username: rahul
password: rahul@2021
- Introduce lazy loading for better performance
Author: Ashruth Gali
Role: Full Stack / Frontend Developer (React)
Goal: Practicing production-level architecture using React and API-driven design.