Video reception service
- Docker Desktop (Windows/Mac) or Docker Engine (Linux).
.envfile with environment variables.- Deployed Kafka broker, MongoDB, and MySQL.
📁 RECEIVING-SERVICE/ # Root directory of the worker service
│
├── 📁 app/ # Main application code
│ ├── main.py # Entry point: starts Kafka consumer + FastAPI app
│ │
│ ├── 📁 core/ # Core configurations
│ │ ├── config.py # Environment variables (Kafka, DBs, storage path)
│ │ ├── logging.py # Logging configuration
│ │ └── exceptions.py # Custom exception definitions
│ │
│ ├── 📁 domain/ # Business logic (independent of tech)
│ │ ├── 📁 entities/ # Core entities
│ │ ├── 📁 repositories/ # Repository interfaces
│ │ └── 📁 services/ # Domain service
│ │
│ ├── 📁 application/ # Application layer (use case orchestration)
│ │ ├── 📁 use_cases/ # Use cases
│ │ ├── 📁 dto/ # Data Transfer Objects
│ │
│ ├── 📁 infrastructure/ # Technical implementations
│ │ ├── 📁 kafka/ # Kafka producer
│ │ ├── 📁 database/ # Database adapters
│ │ │ └── 📁 models/ # Database models
│ │ └── 📁 repositories/ # Concrete repository implementations
│ │
│ ├── 📁 presentation/ # Presentation layer (API and external interfaces)
│ │ ├── 📁 api/ # REST API endpoints
│ │ │ └── 📁 v1/ # API v1 endpoints
│ │ │ └── dependencies.py # Shared dependencies (DI)
│ │ ├── 📁 schemas/ # Pydantic schemas
│ │ └── 📁 middleware/ # Custom middleware (CORS, logging, error handling)
│ │
│ └── 📁 shared/ # Shared utilities
│ ├── constants.py # Global constants
│ ├── enums.py # Enumerations
│ └── utils.py # Helper functions
│
├── 📁 tests/ # Unit tests
│ ├── 📁 domain/
│ ├── 📁 application/
│ └── 📁 infrastructure/
│
├── 📁 scripts/ # Helper scripts
│ └── start.sh # Script to start the service
│
├── .env # Environment variables (not committed to Git)
├── Dockerfile # Instructions to build Docker image
├── docker-compose.yml # Runs only this service container
├── requirements.txt # Python dependencies
└── README.md # Project documentation
Edit the .example.env file with actual variables, and rename it to .env
docker compose up --build -ddocker psEndpoints are accesible Here.
docker compose down