A modern, production-ready online cinema platform with comprehensive API, automated deployment, and microservices architecture built with Python/FastAPI.
- π― Project Overview
- β¨ Key Features
- ποΈ Architecture
- π Project Structure
- π Quick Start
- π§ Configuration
- π API Documentation
- π» Usage Guide
- π§ͺ Testing
- π’ Deployment
- π Monitoring
- π€ Contributing
- π License
Online Cinema Platform is a comprehensive cinema management system built with modern Python technologies and microservices architecture. The platform provides complete functionality for managing movies, users, payments, and content delivery in a scalable, production-ready environment.
This project demonstrates enterprise-level software development practices including:
- Clean Architecture with separation of concerns
- Async/Await patterns for high performance
- Microservices design with Docker containerization
- CI/CD Pipeline with GitHub Actions
- Comprehensive Testing strategy (Unit/Integration/E2E)
- Production Deployment with automated monitoring
- Backend Developers - Learning modern Python/FastAPI architecture patterns
- Startups - Ready-to-use foundation for online cinema platforms
- Students - Enterprise-level application example with best practices
- DevOps Engineers - Reference CI/CD pipeline implementation
- Technical Leads - Microservices architecture blueprint
- JWT-based Authentication with access/refresh token rotation
- Role-based Access Control (User, Admin, Moderator)
- Secure Registration/Login with bcrypt password hashing
- Email Verification system with MailHog integration
- OAuth2 Bearer token scheme with automatic expiration
- Full Movie Management with CRUD operations (30KB+ codebase)
- Category & Genre Classification with hierarchical structure
- Rating & Review System with aggregated scores
- Advanced Search & Filtering with multiple criteria
- File Upload System via MinIO S3-compatible storage
- Content Metadata management with rich descriptions
- Shopping Cart System with session persistence (6.8KB implementation)
- Order Management with status tracking (4.7KB codebase)
- Stripe Payment Integration with webhooks (5.9KB implementation)
- Purchase History and invoice generation
- Digital Content Delivery after successful payment
- Personal User Profiles with customizable settings (5.2KB)
- Watchlist & Favorites with collection management
- Viewing History with progress tracking
- User Preferences and notification settings
- Account Management comprehensive system (31KB codebase)
- Asynchronous Task Processing via Celery + Redis
- Real-time Notifications with email templates
- Smart Pagination for large datasets with FastAPI-pagination
- Rate Limiting & Security with request throttling
- Comprehensive Logging with structured data
- Health Monitoring with automated alerts
- FastAPI 0.115+ - Modern async web framework with automatic API docs
- Python 3.10+ - Typed Python with async/await support
- SQLAlchemy 2.0 - Async ORM with declarative models
- Alembic - Database schema migrations management
- Pydantic 2.0 - Data validation and serialization
- PostgreSQL 15+ - Primary relational database
- Redis 6.2+ - Caching and Celery message broker
- MinIO - S3-compatible object storage for files
- SQLite - Alternative database for testing
- JWT (python-jose) - Stateless authentication tokens
- bcrypt - Secure password hashing
- OAuth2 Bearer - Token-based authorization
- CORS middleware - Cross-origin request security
- Celery 5.5+ - Distributed task queue system
- Redis - Message broker and result backend
- HTTPX - Async HTTP client for external APIs
- asyncio - Native Python asynchronous programming
- pytest 8.3+ - Test framework with async support
- pytest-cov - Code coverage reporting
- mypy - Static type checking
- flake8 - Code style linting
- codecov - Coverage tracking and reporting
- Docker & Docker Compose - Containerization and orchestration
- GitHub Actions - CI/CD pipeline automation
- Nginx - Reverse proxy and static file serving
- Gunicorn + Uvicorn - ASGI production server
- Stripe API - Payment processing and webhooks
- MailHog - Email testing in development environment
- boto3/aioboto3 - AWS S3 compatibility (MinIO integration)
Online-Cinema-Project/
βββ π src/ # Main application source code
β βββ π± main.py # FastAPI application entry point (126 lines)
β βββ βοΈ config/ # Application configuration
β β βββ settings.py # Environment-based settings
β β βββ dependencies.py # Dependency injection setup
β βββ ποΈ database/ # Database layer
β β βββ __init__.py # Database initialization (996B)
β β βββ models/ # SQLAlchemy ORM models
β β β βββ base.py # Base model class (149B)
β β β βββ accounts.py # User & authentication models (7.9KB)
β β β βββ movies.py # Movie catalog models (5.5KB)
β β β βββ orders.py # Order management models (1.8KB)
β β β βββ payments.py # Payment transaction models (2.2KB)
β β β βββ shopping_cart.py # Shopping cart models (1.5KB)
β β β βββ comments.py # Review & comment models (1.9KB)
β β β βββ extra_functionality_movie.py # Extended movie features (2.0KB)
β β βββ migrations/ # Alembic database migrations
β β β βββ versions/ # Migration version files
β β βββ validators/ # Database-level validators
β β βββ pagination/ # Custom pagination logic
β β βββ seed_data/ # Initial data for development
β β βββ source/ # Data source utilities
β β βββ session_postgresql.py # PostgreSQL session config (1.9KB)
β β βββ session_sqlite.py # SQLite session config (2.0KB)
β β βββ db_sync.py # Sync database utilities (460B)
β β βββ populate.py # Database seeding script (17KB)
β βββ π routes/ # API endpoint definitions
β β βββ __init__.py # Router exports (475B)
β β βββ accounts.py # Authentication endpoints (31KB, 926 lines)
β β βββ movies.py # Movie management API (30KB, 1007 lines)
β β βββ extra_functionality_movie.py # Extended movie features (14KB, 454 lines)
β β βββ shopping_cart.py # Shopping cart API (6.8KB, 224 lines)
β β βββ payments.py # Stripe payment endpoints (5.9KB, 188 lines)
β β βββ profiles.py # User profile management (5.2KB, 149 lines)
β β βββ orders.py # Order processing API (4.7KB, 123 lines)
β β βββ comments.py # Comment & review API (2.8KB, 96 lines)
β βββ π schemas/ # Pydantic data validation schemas
β β βββ __init__.py # Schema exports (808B)
β β βββ movies.py # Movie data schemas (6.2KB, 251 lines)
β β βββ payments.py # Payment validation schemas (2.5KB, 99 lines)
β β βββ accounts.py # User account schemas (1.8KB, 86 lines)
β β βββ profiles.py # Profile management schemas (1.6KB, 66 lines)
β β βββ shopping_cart.py # Cart validation schemas (1.3KB, 51 lines)
β β βββ orders.py # Order processing schemas (1.0KB, 43 lines)
β β βββ comments.py # Comment schemas (795B, 44 lines)
β β βββ extra_functionality_movie.py # Extended feature schemas (669B, 32 lines)
β β βββ examples/ # Schema example data
β βββ π security/ # Authentication & authorization
β β βββ auth.py # JWT token management
β β βββ permissions.py # Role-based access control
β β βββ utils.py # Security utility functions
β βββ πΎ storages/ # External storage integrations
β β βββ minio_client.py # MinIO S3-compatible storage
β β βββ file_manager.py # File upload/download logic
β βββ π§ notifications/ # Notification system
β β βββ email_service.py # Email sending logic
β β βββ templates/ # Email HTML templates
β βββ β‘ celery_config/ # Background task processing
β β βββ celery_worker.py # Celery worker configuration
β β βββ tasks.py # Async task definitions
β βββ π validation/ # Business logic validation
β β βββ business_rules.py # Custom validation rules
β βββ π¨ exceptions/ # Custom exception handling
β β βββ base.py # Base exception classes
β β βββ handlers.py # FastAPI exception handlers
β βββ π§ͺ tests/ # Application test suite
β β βββ conftest.py # Pytest configuration (11KB, 350 lines)
β β βββ unit/ # Unit tests for individual components
β β βββ test_integration/ # Integration tests for services
β β βββ test_e2e/ # End-to-end API tests
β β βββ doubles/ # Test doubles (mocks, stubs, fakes)
β β βββ fakes/ # Fake implementations for testing
β β βββ stubs/ # Method stubs for isolation
β βββ π οΈ services/ # Business logic layer
β βββ __init__.py # Service exports (59B)
β βββ shopping_cart.py # Cart business logic (5.8KB, 163 lines)
β βββ orders.py # Order processing logic (4.3KB, 120 lines)
β βββ payments/ # Payment service modules
βββ π³ docker/ # Docker configuration files
β βββ nginx/ # Nginx reverse proxy setup
β β βββ Dockerfile # Nginx container build
β β βββ .env # Nginx environment variables
β βββ mailhog/ # Email testing service
β β βββ Dockerfile # MailHog container setup
β βββ minio_mc/ # MinIO client configuration
β β βββ Dockerfile # MinIO management client
β βββ tests/ # Test environment containers
β βββ Dockerfile # Test runner container
βββ βοΈ configs/ # External service configurations
β βββ nginx/ # Nginx configuration files
β βββ nginx.conf # Production Nginx config
βββ π οΈ commands/ # Automation and deployment scripts
β βββ deploy.sh # Production deployment script
β βββ check-status.sh # Health check and monitoring
β βββ setup-server.sh # Initial server configuration
β βββ run_web_server_prod.sh # Production server startup
β βββ run_migration.sh # Database migration runner
β βββ setup_minio.sh # MinIO bucket initialization
βββ π .github/ # GitHub Actions CI/CD
β βββ workflows/ # Automated workflows
β βββ cd.yml # Continuous deployment pipeline
βββ π tests/ # Additional test suites
β βββ conftest.py # Global test configuration
β βββ unit/ # Top-level unit tests
βββ π Configuration Files # Project configuration
β βββ docker-compose-dev.yml # Development environment (4.0KB)
β βββ docker-compose-prod.yml # Production environment (4.8KB)
β βββ docker-compose-tests.yml # Testing environment (2.4KB)
β βββ Dockerfile # Main application container (1.2KB)
β βββ alembic.ini # Database migration config (3.9KB)
β βββ pyproject.toml # Python dependencies & config (1.6KB)
β βββ poetry.lock # Locked dependency versions (311KB)
β βββ pytest.ini # Test runner configuration
β βββ .env.example # Environment variables template
β βββ .flake8 # Code style configuration
β βββ .codecov.yml # Coverage reporting config
β βββ .gitignore # Git ignore patterns
β βββ init.sql # Database initialization script
βββ π Documentation # Project documentation
βββ README.md # This comprehensive guide
βββ DEPLOYMENT.md # Deployment documentation (if exists)
| Component | Files | Lines of Code | Size | Purpose |
|---|---|---|---|---|
| Routes | 9 files | ~3,500 lines | ~120KB | API endpoint definitions |
| Models | 8 files | ~650 lines | ~23KB | Database schema definitions |
| Schemas | 9 files | ~770 lines | ~16KB | Data validation & serialization |
| Services | 3 files | ~400 lines | ~10KB | Business logic implementation |
| Tests | Multiple | ~2,000+ lines | ~50KB+ | Comprehensive test coverage |
| Config | 10+ files | ~500 lines | ~20KB | Infrastructure & deployment |
- Python 3.10+ installed on your system
- Docker & Docker Compose for containerization
- Poetry for Python dependency management
- Git for version control
- 8GB+ RAM recommended for full stack
- Clone the Repository
git clone https://github.com/iSevenpwnz/Online-Cinema-Project.git
cd Online-Cinema-Project- Environment Configuration
# Copy environment template
cp .env.example .env
# Edit environment variables
nano .env # or use your preferred editor- Install Dependencies
# Using Poetry (recommended)
poetry install
poetry shell
# Or using pip
pip install -r requirements.txt- Start Development Environment
# Launch all services with Docker Compose
docker-compose -f docker-compose-dev.yml up -d
# Check service status
docker-compose -f docker-compose-dev.yml ps- Initialize Database
# Run database migrations
docker-compose -f docker-compose-dev.yml exec web alembic upgrade head
# Seed initial data (optional)
docker-compose -f docker-compose-dev.yml exec web python -m database.populate- Access the Services
| Service | URL | Purpose |
|---|---|---|
| API Documentation | http://localhost:8000/api/v1/docs | Interactive Swagger UI |
| Main Application | http://localhost:8000 | FastAPI backend |
| PgAdmin | http://localhost:3333 | Database management |
| MailHog | http://localhost:8025 | Email testing interface |
| MinIO Console | http://localhost:9001 | Object storage management |
| RedisInsight | http://localhost:5540 | Redis database viewer |
Create a .env file based on .env.example with the following configuration:
# Database Configuration
POSTGRES_DB=movies_db
POSTGRES_USER=admin
POSTGRES_PASSWORD=your_secure_password_here
POSTGRES_HOST=postgres_theater
POSTGRES_DB_PORT=5432
# JWT Security Configuration
SECRET_KEY_ACCESS=your_access_secret_key_minimum_32_characters
SECRET_KEY_REFRESH=your_refresh_secret_key_minimum_32_characters
JWT_SIGNING_ALGORITHM=HS256
# Email Configuration (MailHog for development)
EMAIL_HOST=mailhog_theater
EMAIL_PORT=1025
EMAIL_HOST_USER=testuser
EMAIL_HOST_PASSWORD=test_password
EMAIL_USE_TLS=False
# Object Storage Configuration (MinIO)
MINIO_ROOT_USER=minioadmin
MINIO_ROOT_PASSWORD=your_minio_password_here
MINIO_HOST=minio-theater
MINIO_PORT=9000
MINIO_STORAGE=theater-storage
# Payment Integration (Stripe)
STRIPE_SECRET_KEY=sk_test_your_stripe_secret_key
STRIPE_PUBLISHABLE_KEY=pk_test_your_stripe_publishable_key
# Redis Configuration
REDIS_HOST=redis_theater
REDIS_PORT=6379
REDIS_DB=0
# Application Settings
LOG_LEVEL=debug
ENVIRONMENT=development
API_V1_PREFIX=/api/v1# Token expiration times
ACCESS_TOKEN_EXPIRE_MINUTES = 30
REFRESH_TOKEN_EXPIRE_DAYS = 7
# Algorithm and key requirements
JWT_ALGORITHM = "HS256"
SECRET_KEY_LENGTH_MINIMUM = 32 # characters# Allowed origins for CORS
BACKEND_CORS_ORIGINS = [
"http://localhost:3000", # React frontend
"http://localhost:8080", # Vue frontend
"https://yourdomain.com" # Production domain
]The API provides comprehensive interactive documentation:
- Swagger UI: http://localhost:8000/api/v1/docs
- ReDoc: http://localhost:8000/redoc
- OpenAPI Schema: http://localhost:8000/api/v1/openapi.json
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
POST |
/register/ |
Create new user account | β |
POST |
/login/ |
Login and get JWT tokens | β |
POST |
/refresh/ |
Refresh access token | β |
POST |
/logout/ |
Logout current user | β |
GET |
/profile/ |
Get current user profile | β |
PUT |
/profile/ |
Update user profile | β |
POST |
/verify-email/ |
Verify email address | β |
POST |
/forgot-password/ |
Request password reset | β |
POST |
/reset-password/ |
Reset password with token | β |
| Method | Endpoint | Description | Auth Required | Admin Only |
|---|---|---|---|---|
GET |
/movies/ |
List movies with filters | β | β |
POST |
/movies/ |
Create new movie | β | β |
GET |
/movies/{id}/ |
Get movie details | β | β |
PUT |
/movies/{id}/ |
Update movie | β | β |
DELETE |
/movies/{id}/ |
Delete movie | β | β |
GET |
/genres/ |
List all genres | β | β |
GET |
/categories/ |
List all categories | β | β |
POST |
/movies/{id}/upload-poster/ |
Upload movie poster | β | β |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
GET |
/cart/ |
Get current cart | β |
POST |
/cart/add/ |
Add movie to cart | β |
PUT |
/cart/update/{item_id}/ |
Update cart item | β |
DELETE |
/cart/remove/{item_id}/ |
Remove from cart | β |
POST |
/cart/checkout/ |
Proceed to checkout | β |
DELETE |
/cart/clear/ |
Clear entire cart | β |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
POST |
/create-intent/ |
Create Stripe payment intent | β |
POST |
/confirm/ |
Confirm payment | β |
GET |
/history/ |
Get payment history | β |
POST |
/webhook/ |
Stripe webhook handler | β |
GET |
/receipt/{payment_id}/ |
Get payment receipt | β |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
GET |
/ |
List user orders | β |
POST |
/ |
Create new order | β |
GET |
/{order_id}/ |
Get order details | β |
PUT |
/{order_id}/status/ |
Update order status | β |
GET |
/{order_id}/invoice/ |
Download invoice | β |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
GET |
/movie/{movie_id}/ |
Get movie comments | β |
POST |
/movie/{movie_id}/ |
Add comment/review | β |
PUT |
/{comment_id}/ |
Edit comment | β |
DELETE |
/{comment_id}/ |
Delete comment | β |
POST |
/{comment_id}/like/ |
Like/unlike comment | β |
Most endpoints require JWT authentication. Here's how to use it:
- Register or Login
# Register new user
curl -X POST "http://localhost:8000/api/v1/accounts/register/" \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "secure_password123",
"username": "moviefan"
}'
# Login to get tokens
curl -X POST "http://localhost:8000/api/v1/accounts/login/" \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "secure_password123"
}'- Use Access Token
# Include token in Authorization header
curl -X GET "http://localhost:8000/api/v1/theater/movies/" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"- Refresh Token When Expired
curl -X POST "http://localhost:8000/api/v1/accounts/refresh/" \
-H "Content-Type: application/json" \
-d '{"refresh_token": "YOUR_REFRESH_TOKEN"}'- Admin: Add New Movie
curl -X POST "http://localhost:8000/api/v1/theater/movies/" \
-H "Authorization: Bearer ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "The Matrix",
"description": "A computer hacker learns from mysterious rebels about the true nature of his reality.",
"genre": "Sci-Fi",
"duration": 136,
"price": 12.99,
"release_date": "1999-03-31"
}'- User: Browse Movies
# Get movies with filters
curl "http://localhost:8000/api/v1/theater/movies/?genre=Sci-Fi&min_price=5&max_price=20&page=1&size=10"- User: Add to Cart
curl -X POST "http://localhost:8000/shopping-cart/cart/add/" \
-H "Authorization: Bearer USER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"movie_id": 1,
"quantity": 1
}'- User: Checkout Process
# Create payment intent
curl -X POST "http://localhost:8000/api/v1/payments/create-intent/" \
-H "Authorization: Bearer USER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"amount": 1299,
"currency": "usd"
}'
# Confirm payment (after Stripe processing)
curl -X POST "http://localhost:8000/api/v1/payments/confirm/" \
-H "Authorization: Bearer USER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"payment_intent_id": "pi_1234567890"
}'- Running Tests During Development
# Run specific test categories
pytest src/tests/unit/ -v # Unit tests only
pytest src/tests/test_integration/ -v # Integration tests
pytest src/tests/test_e2e/ -v # End-to-end tests
# Run with coverage
pytest --cov=src --cov-report=html
# Run tests in parallel
pytest -n auto- Database Management
# Create new migration
docker-compose -f docker-compose-dev.yml exec web alembic revision --autogenerate -m "Add new feature"
# Apply migrations
docker-compose -f docker-compose-dev.yml exec web alembic upgrade head
# Rollback migration
docker-compose -f docker-compose-dev.yml exec web alembic downgrade -1- Monitoring Logs
# View application logs
docker-compose -f docker-compose-dev.yml logs -f web
# View specific service logs
docker-compose -f docker-compose-dev.yml logs -f postgres_theater
docker-compose -f docker-compose-dev.yml logs -f redis_theater
docker-compose -f docker-compose-dev.yml logs -f celery_worker_theaterThe platform uses Celery for handling asynchronous tasks:
- Email Notifications
# Send welcome email (triggered automatically)
from celery_config.tasks import send_welcome_email
send_welcome_email.delay(user_id=123)- Order Processing
# Process order after payment (automatic)
from celery_config.tasks import process_order
process_order.delay(order_id=456)- Monitor Celery Workers
# Check worker status
docker-compose -f docker-compose-dev.yml exec celery_worker celery -A celery_config.celery_worker.celery_app status
# Monitor tasks
docker-compose -f docker-compose-dev.yml exec celery_worker celery -A celery_config.celery_worker.celery_app events# Run all tests
pytest
# Run with coverage report
pytest --cov=src --cov-report=html --cov-report=term
# Run specific test types
pytest src/tests/unit/ # Unit tests
pytest src/tests/test_integration/ # Integration tests
pytest src/tests/test_e2e/ # End-to-end tests
# Run tests in parallel (faster)
pytest -n auto
# Run specific test file
pytest src/tests/unit/test_accounts.py -v
# Run tests matching pattern
pytest -k "test_login" -vThe project maintains comprehensive test coverage:
- Unit Tests: Individual functions and methods
- Integration Tests: Service interactions and database operations
- End-to-End Tests: Complete API workflows
- Mock Tests: External service integrations
# Generate detailed HTML coverage report
pytest --cov=src --cov-report=html
open htmlcov/index.html # View in browser# Run tests in isolated container
docker-compose -f docker-compose-tests.yml up --build test_runner
# Run specific test suite in container
docker-compose -f docker-compose-tests.yml exec test_runner pytest src/tests/unit/ -v| Test Type | Location | Purpose | Coverage |
|---|---|---|---|
| Unit | src/tests/unit/ |
Individual component testing | Functions, methods, utilities |
| Integration | src/tests/test_integration/ |
Service interaction testing | Database, external APIs |
| E2E | src/tests/test_e2e/ |
Complete workflow testing | User journeys, API flows |
| Contract | src/tests/doubles/ |
Mock and stub testing | External dependencies |
The project includes a fully automated deployment pipeline using GitHub Actions:
Triggers:
- Push to
developorcd-settingbranches - Pull request merges to these branches
- Manual workflow dispatch
Pipeline Features:
- β Concurrency Control - Prevents simultaneous deployments
- β Deployment Locks - Server-side conflict prevention
- β Health Checks - Post-deployment verification
- β Rollback Support - Automatic failure recovery
- β Timeout Protection - 30-minute deployment limit
Configure these secrets in your GitHub repository:
- Go to
Settings β Secrets and variables β Actions - Add the following Repository secrets:
EC2_HOST=your.server.ip.address # Production server IP
EC2_USER=ubuntu # SSH username
EC2_SSH_KEY=-----BEGIN RSA PRIVATE KEY----- # SSH private keyFor manual deployment to production server:
# SSH to production server
ssh ubuntu@your-server-ip
# Navigate to project directory
cd /home/ubuntu/src/online-cinema-project
# Deploy specific branch
bash commands/deploy.sh develop
# Check deployment status
bash commands/check-status.shFor first-time server configuration:
# Run automated setup script
ssh ubuntu@your-server-ip
bash /home/ubuntu/src/online-cinema-project/commands/setup-server.shThis script will:
- Install Docker and Docker Compose
- Configure firewall rules
- Set up project directory structure
- Install system dependencies
- Configure environment variables
Before deploying to production:
- SSL Certificates configured and valid
- Firewall Rules properly configured
- Database Backups strategy implemented
- Environment Variables secured and verified
- Domain Configuration with proper DNS
- Monitoring System active and alerting
- Log Rotation configured for disk management
- Security Updates applied to server
- Performance Testing completed
- Backup Recovery procedure tested
Additional variables for production:
# Production-specific settings
ENVIRONMENT=production
DEBUG=False
LOG_LEVEL=info
# Database connection pooling
DATABASE_POOL_SIZE=20
DATABASE_MAX_OVERFLOW=30
DATABASE_POOL_TIMEOUT=30
# Security settings
SECURE_COOKIES=True
HTTPS_ONLY=True
CORS_ORIGINS=["https://yourdomain.com"]
# Performance settings
WORKERS=4
MAX_CONNECTIONS=1000
KEEPALIVE_TIMEOUT=2The platform includes comprehensive health monitoring:
# Run complete health check
bash commands/check-status.shThis script monitors:
- β Deployment Lock Status - No conflicting deployments
- β Docker Container Health - All services running
- β Database Connectivity - PostgreSQL connection
- β Redis Availability - Cache and message broker
- β External Services - MinIO, MailHog, Nginx
- β System Resources - CPU, Memory, Disk usage
- β Application Logs - Error detection
| Service | URL | Purpose |
|---|---|---|
| PgAdmin | http://localhost:3333 | Database monitoring and management |
| RedisInsight | http://localhost:5540 | Redis monitoring and debugging |
| MinIO Console | http://localhost:9001 | Object storage monitoring |
| MailHog | http://localhost:8025 | Email delivery monitoring |
# Application logs
docker-compose logs -f web
# Database logs
docker-compose logs -f postgres_theater
# Background task logs
docker-compose logs -f celery_worker_theater
# Reverse proxy logs
docker-compose logs -f nginx
# All service logs
docker-compose logs -fMonitor key performance indicators:
- Response Times - API endpoint performance
- Database Queries - Query execution time
- Memory Usage - Container resource consumption
- Disk Space - Database and file storage
- Network Traffic - Request/response volumes
- Error Rates - Application and system errors
- Fork the Repository
git clone https://github.com/YOUR_USERNAME/Online-Cinema-Project.git
cd Online-Cinema-Project- Create Feature Branch
git checkout -b feature/amazing-new-feature- Set Up Development Environment
poetry install
docker-compose -f docker-compose-dev.yml up -d- Make Changes and Test
# Run tests
pytest --cov=src
# Check code style
flake8 src/
mypy src/
# Format code (if using)
black src/
isort src/- Commit and Push
git add .
git commit -m "feat: add amazing new feature"
git push origin feature/amazing-new-feature- Create Pull Request
- Open PR against
developbranch - Include description of changes
- Ensure all tests pass
- Request code review
- Type Hints: Use Python type hints throughout
- Docstrings: Document all public functions and classes
- Testing: Write tests for new functionality
- Coverage: Maintain >80% test coverage
- Style: Follow PEP 8 with flake8 configuration
- Async: Use async/await patterns for I/O operations
- Write unit tests for business logic
- Include integration tests for database operations
- Add E2E tests for API endpoints
- Mock external service dependencies
- Test error conditions and edge cases
- Clear Description: Explain what and why
- Small Changes: Keep PRs focused and reviewable
- Tests Included: All new code must have tests
- Documentation: Update README/docs if needed
- No Breaking Changes: Maintain backward compatibility
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2024 Online Cinema Project Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
- Yurii Okal - Initial development - yurii.okal@mate.com
- iSevenpwnz - Current maintainer - GitHub Profile
- FastAPI for the excellent async web framework
- SQLAlchemy for the powerful ORM capabilities
- Pydantic for data validation excellence
- Docker for containerization simplicity
- PostgreSQL for robust database foundation
- Redis for caching and message broker capabilities
- Python Community for continuous innovation and support
π¬ Built with β€οΈ for the Developer Community π
Star β this repository if you find it helpful!