Welcome to the Film Watch Site backend! This is a robust, high-performance Django-based platform designed for movie lovers. It features automated data synchronization with global movie databases, advanced search capabilities, and a fully dockerized infrastructure.
- ποΈ Automated Movie Ingestion: Synchronizes movies, genres, and metadata automatically from VideoCDN and TMDB APIs using Celery background tasks.
- π Advanced Search: Powered by Elasticsearch for lightning-fast and relevant movie discovery.
- π€ User Management: Custom user accounts with features for "Favorites" and movie "Watch History".
- π¬ Community Interaction: A built-in comment system where users can share their thoughts (with admin moderation).
- π¦ Fully Dockerized: Seamless setup for development and production using Docker and Docker Compose.
- π Task Management: Efficient background task handling with Celery and RabbitMQ, monitored via Flower.
- π Monitoring & SEO: Includes Prometheus for metrics and automated Sitemaps for search engine optimization.
- βοΈ Cloud Ready: Configured for AWS S3 file storage and Nginx reverse proxying.
Docker & Docker Compose
Redis (Caching & Celery Backend)
RabbitMQ (Message Broker)
Elasticsearch (Search Engine)
Nginx (Reverse Proxy)
- TMDB API: Movie metadata, posters, and translations.
- VideoCDN API: Movie stream sources and iframe integration.
- AWS S3: Scalable media and static file storage.
The project follows a clean, modular architecture:
βββ apps/ # Django Applications
β βββ movies/ # Core movie models, views, and documents
β βββ users/ # User authentication and profiles
β βββ site_info/ # General site settings and generic pages
β βββ shared/ # Common utilities and Celery tasks
βββ compose/ # Docker configuration files
βββ root/ # Project core settings and URL routing
βββ static/ # Assets (CSS, JS, Images)
βββ templates/ # HTML Templates
βββ Makefile # Automation commands
βββ docker-compose.yml # Infrastructure orchestration
- Docker and Docker Compose
- (Optional) Poetry for local development
Create a .env file in the root directory and populate it based on your requirements:
DEBUG=True
SECRET_KEY=your_secret_key
DATABASE_URL=postgres://user:password@db:5432/film_watch_site
# API Tokens
API_TOKEN_VIDEOCDN=your_videocdn_token
API_TOKEN_TMDB=your_tmdb_token
# AWS S3 (Optional)
AWS_ACCESS_KEY_ID=your_key
AWS_SECRET_ACCESS_KEY=your_secret
AWS_STORAGE_BUCKET_NAME=your_bucketRun everything with a single command:
docker-compose up --buildThe site will be available at http://localhost:2022 (via Nginx) or http://localhost:8000 (Direct Django).
Run migrations inside the container:
docker-compose exec web python manage.py migrateManaged via the included Makefile:
make migrate: Run all pending database migrations.make del_mig: Caution! Deletes all migration files (useful for clean starts during development).make both: Refreshes the database state entirely.
- Flower: Celery task monitoring is available at
http://localhost:5557. - RabbitMQ Admin: Message broker dashboard at
http://localhost:15672. - Prometheus: Metrics collection available at
http://localhost:9090(if configured).
We welcome contributions!
- Fork the repo.
- Create your feature branch (
git checkout -b feature/AmazingFeature). - Commit your changes (
git commit -m 'Add some AmazingFeature'). - Push to the branch (
git push origin feature/AmazingFeature). - Open a Pull Request.
Developed with β€οΈ by Abdurashid Khikmatov π