Skip to content

pradhanska/Netflocks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Netflocks Streaming Platform

A modern streaming platform built with a microservices architecture, featuring content recommendation, user management, and a responsive web interface.

πŸ—οΈ Architecture

Services

  • Frontend: React + Vite + React Router
  • Backend: Spring Boot (Java 17) + Spring Security + JPA
  • Recommendation Service: FastAPI (Python)

Technology Stack

  • Frontend: React 18, Vite, Axios, React Router
  • Backend: Spring Boot 3.2.2, PostgreSQL, Maven
  • Recommendation: FastAPI, Uvicorn, NumPy
  • Deployment: Docker, GitHub Actions, GitHub Pages

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • Java 17+
  • Python 3.9+
  • PostgreSQL
  • Docker (optional)

Local Development

  1. Clone the repository

    git clone <repository-url>
    cd netflocks-clone
  2. Frontend Setup

    cd frontend
    npm install
    npm run dev
  3. Backend Setup

    cd backend
    mvn clean install
    mvn spring-boot:run
  4. Recommendation Service Setup

    cd reco-service
    pip install -r requirements.txt
    uvicorn main:app --reload

Environment Configuration

Create .env files in each service directory:

Backend (.env)

DATABASE_URL=jdbc:postgresql://localhost:5432/netflocks
DB_USERNAME=your_username
DB_PASSWORD=your_password
JWT_SECRET=your_jwt_secret

Frontend (.env)

VITE_API_BASE_URL=http://localhost:8080
VITE_RECO_SERVICE_URL=http://localhost:8000

🐳 Docker Deployment

Using Docker Compose

docker-compose up -d

Individual Services

# Frontend
docker build -t netflocks-frontend ./frontend
docker run -p 3000:3000 netflocks-frontend

# Backend
docker build -t netflocks-backend ./backend
docker run -p 8080:8080 netflocks-backend

# Recommendation Service
docker build -t netflocks-reco ./reco-service
docker run -p 8000:8000 netflocks-reco

🌐 Deployment

GitHub Pages (Frontend)

The frontend is automatically deployed to GitHub Pages via GitHub Actions when pushing to the main branch.

Production Deployment

  • Backend: Deployed to your preferred cloud platform (Heroku, AWS, DigitalOcean)
  • Recommendation Service: Deployed alongside backend or separately
  • Database: PostgreSQL instance on your cloud provider

GitHub Actions

CI/CD pipelines are set up for:

  • Frontend testing and deployment to GitHub Pages
  • Backend testing and Docker image building
  • Recommendation service testing and Docker image building

πŸ“Š API Endpoints

Backend (Port 8080)

  • GET /api/auth/** - Authentication endpoints
  • GET /api/users/** - User management
  • GET /api/content/** - Content management
  • GET /api/profiles/** - User profiles

Recommendation Service (Port 8000)

  • GET /health - Health check
  • GET /recommendations?profileId={id}&limit={limit} - Get recommendations

πŸ§ͺ Testing

Frontend

cd frontend
npm run lint

Backend

cd backend
mvn test

Recommendation Service

cd reco-service
pytest

πŸ“ Contributing

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

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ”— Links

🀝 Support

For support and questions:

  • Create an issue in the repository
  • Contact the development team

Note: Make sure to configure all environment variables and secrets in your deployment platform before going to production.

About

a clone of netflix

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors