Skip to content

About

PulseStream Frontend is a scalable React-based streaming client featuring adaptive HLS playback, centralized state management, secure authentication, subscription workflows, personalized content tracking, and role-based administrative tooling.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

🎬 PulseStream — Frontend

A cinematic, Netflix-inspired streaming platform built with React + Vite

React Vite Redux Toolkit TailwindCSS License: MIT

Live Demo · Backend Repo · Report Bug


✨ Overview

PulseStream is a full-stack streaming platform with a rich, dark-themed UI that rivals modern OTT experiences. The frontend delivers a seamless, cinema-grade interface — complete with animated hero banners, HLS video playback, real-time watchlists, Google OAuth, and subscription management powered by Razorpay.

This repository contains the React + Vite frontend. The Spring Boot backend lives here.


🚀 Features

🎥 Streaming & Content

  • HLS Video Playback — adaptive bitrate streaming via Azure Blob Storage
  • Custom Video Player — built with HLS.js, supporting quality switching
  • Cinematic Hero Banner — auto-cycling crossfade with Ken Burns effect
  • Rich Content Grid — movies, TV shows, series seasons & episodes

🔐 Authentication

  • JWT-based login/signup with email OTP verification
  • Google OAuth 2.0 via Spring Security's OAuth2 flow
  • Secure token handling — automatic expiry detection on startup, no redirect loops
  • Forgot password — OTP-based reset flow

👤 User Experience

  • Personal Watchlist — add/remove with optimistic UI updates
  • Continue Watching — resume from where you left off
  • Search — instant fuzzy search with dropdown suggestions
  • Responsive Design — pixel-perfect on mobile, tablet, and desktop

💳 Subscriptions

  • Razorpay Integration — subscription tiers with in-app payment flow
  • Plan Management — upgrade / downgrade with live status

🛡️ Admin Panel

  • Upload Movies & Series — with poster, banner, and video
  • System Storage Monitor — real-time storage stats
  • Role-based Access Control — admin-only routes guarded on both frontend and backend

🏗️ Tech Stack

Layer Technology
UI Framework React 18 (Vite)
Styling Tailwind CSS v3 + Custom CSS animations
State Management Redux Toolkit + Redux Thunk
HTTP Client Axios (with request/response interceptors)
Video HLS.js
Auth JWT + Google OAuth 2.0
Payments Razorpay Web SDK
Notifications React Hot Toast
Icons React Icons (FA)

🗂️ Project Structure

src/
├── api/
│   └── axiosConfig.js       # Centralized Axios instance + interceptors
├── Components/
│   ├── browse/              # Movie rows, cards
│   ├── common/              # Navbar, Modal, Footer, Toaster
│   ├── layout/              # GlassNavbar, PrivateRoute
│   └── video/               # HLS player (PulsePlayer)
├── pages/
│   ├── Auth.jsx             # Login / Signup / Forgot Password
│   ├── Home.jsx             # Landing page + hero + content rows
│   ├── Watch.jsx            # Video watch page
│   ├── Profile.jsx          # User profile
│   ├── Subscription.jsx     # Razorpay subscription flow
│   ├── MyWatchlist.jsx      # Personal watchlist
│   ├── Content.jsx          # Browse all content
│   ├── SessionExpired.jsx   # Graceful session timeout page
│   └── OAuth2RedirectHandler.jsx
├── store/
│   ├── slices/
│   │   ├── authSlice.js     # JWT rehydration + expiry check
│   │   ├── contentSlice.js  # Movies / series state
│   │   └── watchlistSlice.js
│   └── actions/
│       └── authActions.js   # Login, signup, OTP, forgot-password
└── App.jsx                  # Global session-expiry listener + routing

⚡ Getting Started

Prerequisites

Installation

# Clone the repository
git clone https://github.com/yourusername/PulseStreamFrontend.git
cd PulseStreamFrontend/pulsestream-frontend

# Install dependencies
npm install

Environment Variables

Create a .env file in the project root:

# Spring Boot backend URL
VITE_BACK_END_URL=http://localhost:8080

# Razorpay test key
VITE_RAZORPAY_KEY_ID=rzp_test_xxxxxxxxx

# TMDB API key (for fallback images)
VITE_TMDB_API_KEY=your_tmdb_api_key

Run in Development

npm run dev

Open http://localhost:5173 in your browser.

Build for Production

npm run build

🔒 Security Architecture

PulseStream implements multiple layers of client-side security:

Concern Implementation
Expired JWT on startup authSlice.js decodes the JWT and checks the exp claim before trusting it. Stale tokens are wiped before the app renders.
401 handling The Axios interceptor globally catches 401 responses from authenticated routes and fires a custom auth:session-expired DOM event.
Session cleanup App.jsx listens for the event and dispatches logout() + clearWatchlist(), then navigates to the graceful /session-expired page.
No infinite loops All /auth/* and /oauth2 routes are excluded from the 401 interceptor — wrong credentials never trigger a fake "session expired".
Token hygiene Token is stored in a structured pulse_auth key and never logged. The OAuth2 redirect handler immediately strips the token from the URL using history.replaceState.

🌐 Deployment

The frontend is optimized for Vercel (recommended) or any static host.

npm run build   # outputs to /dist
npm run preview # test the production build locally

For Vercel: connect the repo, set the output directory to dist, and add your environment variables in the dashboard.


🤝 Contributing

Contributions, issues, and feature requests are welcome!

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'feat: add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

📄 License

Distributed under the MIT License. See LICENSE for more information.


Made with ❤️ by Vipul Choudhary

⭐ Star this repo if you found it useful!

About

PulseStream Frontend is a scalable React-based streaming client featuring adaptive HLS playback, centralized state management, secure authentication, subscription workflows, personalized content tracking, and role-based administrative tooling.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages