Skip to content

rajvirsingh2/netflix-backend

Repository files navigation

Netflix Clone Backend

Overview

This is the backend service for a Netflix clone application designed to handle user authentication, video management, video streaming metadata, recommendations, analytics, search, and admin operations. The backend uses modern enterprise technologies including Spring Boot, Kafka, AWS S3 storage, and Elasticsearch.


Current Features

Authentication and Authorization

  • User sign-up, login with JWT-based stateless authentication
  • Role-based access control with ADMIN and USER roles
  • Secure API access and protected admin endpoints

Video Management

  • Video metadata and file handling with AWS S3 uploads
  • Video transcoding integration via Kafka event-driven pipeline
  • Manifest URL handling for adaptive streaming formats (HLS/DASH)

Search

  • Full text video search using Elasticsearch with multi-field queries
  • Indexed on upload, supports title, description, and genre search

Recommendations

  • Basic collaborative filtering using Kafka user activity streams
  • REST endpoint providing personalized suggestions based on watch history

Analytics

  • Collection and storage of user and video events in PostgreSQL
  • Paginated, filtered REST analytics endpoints for admin dashboards

Admin Operations

  • Admin video and user management APIs protected by RBAC
  • CRUD operations for videos and users by admins

Notifications (In Progress)

  • Kafka-driven notification microservice framework for push/email/in-app messaging

Architecture & Technologies

  • Spring Boot for backend REST API and microservices
  • PostgreSQL as primary database for users, videos, analytics events
  • Kafka for event-driven communication (video upload, user activity, notifications)
  • AWS S3 for scalable video and asset storage
  • ffmpeg used in transcoding microservice (external, triggered by Kafka)
  • Spring Security with JWT for authentication and role-based authorization
  • Elasticsearch for fast, scalable video search capabilities

Project Structure

  • controller/: REST API controllers for auth, videos, user profiles, analytics, and admin
  • services/: Business logic and event consumers for recommendations, transcoding, analytics
  • repository/: JPA and Elasticsearch repositories for data persistence and search
  • security/: JWT utils, authentication filters, and UserDetails implementation
  • util/: S3 file upload and Kafka producer utilities
  • dto/: Request and response DTOs for API communication
  • analytics/: Domain objects and repositories for event tracking
  • notification/ (Upcoming): Notification microservices and Kafka event listeners

Future Work

  • Implement DRM for video content security
  • Advanced machine learning based recommendation engine
  • Push and email notifications integration
  • Payment and subscription management
  • Comprehensive integration and UI testing
  • Monitoring, logging, and real-time analytics dashboards
  • Deploy with Docker and Kubernetes for scalability

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages