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.
- Browse extensive movie collections
- Search functionality with real-time results
- Genre-based filtering
- Detailed movie information with recommendations
- Integration with The MovieDB API
- Secure token-based authentication
- Personal watchlist management
- Favorite movies feature
- Track watched/unwatched movies
- Progress tracking for your movie journey
- Redis caching layer for optimal performance
- Prometheus metrics integration
- Custom middleware for logging and monitoring
- Fully containerized architecture
- Production-grade Kubernetes deployment
The application is divided into three main services:
- Handles authentication and user management
- Token-based security implementation
- Movie data management
- Integration with The MovieDB API
- Redis-backed caching layer
- Search and filtering capabilities
- Favorites management
- Personal watchlist management
- Progress tracking
Application also contains custom middlewares for Request/response logging and Prometheus Metric collection.
The infrastructure is organized into three namespaces:
- Backend application deployment
- PostgreSQL database
- Associated ConfigMaps and Secrets
- Persistent volume configurations
- Service definitions
- Redis deployment
- Cache-specific configurations
- Associated services
- Prometheus deployment
- Grafana setup
- Monitoring configurations
- Nginx Ingress Controller for traffic routing
- Helm charts for service management
- Persistent volumes for data storage
- Service mesh for inter-service communication
- Clone the project repository to your local machine.
- 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
- Start local k8s cluster:
- Frontend
- Navigate to the frontend folder.
- Install libraries:
npm install
. - Run the frontend app:
npm run dev
- Frontend App: http://localhost:5173/
- API docs: http://127.0.0.1:8080/docs/
- Raw Metrics: http://127.0.0.1:8080/metrics/
- Prometheus: http://127.0.0.1:8080/prometheus/
- Grafana: http://127.0.0.1:8080/grafana/
-
Once you retrieve TheMovieDB API credentials, please update the
secrets.yaml
file located undersrc/k8s/templates/app
and add the access token for theMOVIE_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 undersrc/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.