Skip to content

Latest commit

 

History

27 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Receiving-Service

Video reception service

Requirements

  • Docker Desktop (Windows/Mac) or Docker Engine (Linux).
  • .env file with environment variables.
  • Deployed Kafka broker, MongoDB, and MySQL.

Project structure 📁

📁 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

Steps to run the project

Create .env file, for example:

Edit the .example.env file with actual variables, and rename it to .env

Run the service

docker compose up --build -d

Check running containers in Docker Desktop / Docker Engine

docker ps

Test the service

Endpoints are accesible Here.

Stop the service

docker compose down

About

Python code for video reception service

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages