Skip to content

This project is created in order learn and master Kubernetes through hands-on experience.

Notifications You must be signed in to change notification settings

thejasmeetsingh/watcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 

Repository files navigation

logo

Discover a vibrant, ever-evolving movie database that invites you to explore an extensive collection of filmsβ€”whether they're timeless classics, currently screening hits, or highly anticipated future releases. Dive deep into each movie’s details, and curate your own personal watchlist to effortlessly track and organize your cinematic journey.

πŸ› οΈ Tech Stack

Backend Powerhouse

Frontend Magic

DevOps Arsenal

πŸ—οΈ Architecture

architecture

🌟 Key Features

πŸ’‘ Movie Discovery

  • Browse extensive movie collections
  • Search functionality with real-time results
  • Genre-based filtering
  • Detailed movie information with recommendations
  • Integration with The MovieDB API

πŸ…― User Experience

  • Secure token-based authentication
  • Personal watchlist management
  • Favorite movies feature
  • Track watched/unwatched movies
  • Progress tracking for your movie journey

πŸ§‘β€πŸ”§ Technical Excellence

  • Redis caching layer for optimal performance
  • Prometheus metrics integration
  • Custom middleware for logging and monitoring
  • Fully containerized architecture
  • Production-grade Kubernetes deployment

🧱 Application Structure

The application is divided into three main services:

πŸ…― User Service

  • Handles authentication and user management
  • Token-based security implementation

🎦 Content Service

  • Movie data management
  • Integration with The MovieDB API
  • Redis-backed caching layer
  • Search and filtering capabilities
  • Favorites management

πŸ”‚ Watchlist Service

  • Personal watchlist management
  • Progress tracking

Application also contains custom middlewares for Request/response logging and Prometheus Metric collection.

βš™οΈ Kubernetes Infrastructure

The infrastructure is organized into three namespaces:

πŸ“• App Namespace (app)

  • Backend application deployment
  • PostgreSQL database
  • Associated ConfigMaps and Secrets
  • Persistent volume configurations
  • Service definitions

⚑️ Cache Namespace (cache)

  • Redis deployment
  • Cache-specific configurations
  • Associated services

πŸ“Š Monitoring Namespace (monitoring)

  • Prometheus deployment
  • Grafana setup
  • Monitoring configurations

Key Infrastructure Components

  • Nginx Ingress Controller for traffic routing
  • Helm charts for service management
  • Persistent volumes for data storage
  • Service mesh for inter-service communication

Watch the demoπŸ‘€

πŸš€ Getting Started

πŸ”΄ Prerequisites

🚧 Local Development Setup

  1. Clone the project repository to your local machine.
  2. Backend
    • Start local k8s cluster: minikube start --cni=calico
    • Enable ingress service on minikube: minikube addons enable ingress
    • Deploy services with helm: helm install watcher src/k8s
    • Access the services by running: kubectl port-forward -n ingress-nginx services/ingress-nginx-controller 8080:80
  3. Frontend
    • Navigate to the frontend folder.
    • Install libraries: npm install.
    • Run the frontend app: npm run dev

πŸ—οΈ Key Endpoints

πŸ“ Notes

  • Once you retrieve TheMovieDB API credentials, please update the secrets.yaml file located under src/k8s/templates/app and add the access token for the MOVIE_DB_ACCESS_TOKEN variable.

  • The grafana login credentials are:

    • username: admin
    • password: 1234

    Please update the credentials in secrets.yaml the file, which is located under src/k8s/templates/monitoring If you want to change it and set it to something else.

  • Use http://watcher-prometheus/prometheus as the Prometheus URL. When you add Prometheus as a data source in Grafana (please refer to the demo video πŸ™‚).


Built with ❀️ for learning Kubernetes and modern DevOps practices.