A production-grade AI Media Processing Pipeline with React frontend, Express API gateway, Python AI worker, and PostgreSQL database, all orchestrated via Docker Compose.
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ React Client │────▶│ Express API GW │────▶│ PostgreSQL DB │
│ (Port 5173) │ │ (Port 3000) │ │ (Port 5432) │
└─────────────────┘ └────────┬─────────┘ └─────────────────┘
│
┌────────▼─────────┐
│ Redis Queue │
│ (Port 6379) │
└────────┬─────────┘
│
┌────────▼─────────┐
│ Python Worker │
│ Whisper + BART │
└────────┬─────────┘
│
┌────────▼─────────┐
│ MinIO (S3) │
│ File Storage │
│ (Port 9000) │
└─────────────────┘
- Docker
- Docker Compose
# 1. Clone the repository
git clone <repository-url>
cd mediapipe-ai
# 2. Copy environment file
cp .env.example .env
# 3. Start all services
docker compose up -d
# 4. Open the web UI
# Visit http://localhost:5173| Service | Port | Description |
|---|---|---|
| Client | 5173 | React frontend |
| API | 3000 | Express API gateway |
| PostgreSQL | 5432 | Database |
| Redis | 6379 | Job queue |
| MinIO | 9000 | S3-compatible storage |
| Type | Formats |
|---|---|
| Video | mp4, mkv, mov, webm |
| Audio | mp3, wav, m4a, ogg |
Maximum file size: 500MB
| Method | Route | Description |
|---|---|---|
| POST | /api/upload | Upload file and create job |
| GET | /api/jobs | List all jobs (paginated) |
| GET | /api/jobs/:id | Get job details |
| DELETE | /api/jobs/:id | Delete job and files |
| GET | /api/health | Health check endpoint |
{
"id": "uuid",
"filename": "video.mp4",
"status": "queued",
"created_at": "2024-01-01T00:00:00Z"
}{
"jobs": [...],
"pagination": {
"page": 1,
"limit": 20,
"total": 100,
"pages": 5
}
}{
"id": "uuid",
"filename": "video.mp4",
"status": "done",
"transcript": "...",
"summary": "...",
"duration_s": 120.5,
"created_at": "2024-01-01T00:00:00Z"
}cd api
npm testcd worker
pip install -r requirements-dev.txt
pytestThe worker uses the base model by default. To use a different model:
-
Edit
.env:WHISPER_MODEL=medium -
Available models:
tiny,base,small,medium,large
Note: Larger models require more memory and processing time.
- Whisper
basemodel has limited accuracy compared to larger models - Single worker process (no horizontal scaling)
- No authentication/authorization
- No user management
- No persistent storage beyond MinIO
For development with hot reload:
docker compose -f docker-compose.yml -f docker-compose.dev.yml up# Postgres
POSTGRES_USER=mediapipe
POSTGRES_PASSWORD=secret
POSTGRES_DB=mediapipe
# Redis
REDIS_URL=redis://redis:6379
# MinIO
MINIO_ENDPOINT=minio:9000
MINIO_ACCESS_KEY=minioadmin
MINIO_SECRET_KEY=minioadmin
MINIO_BUCKET=media-uploads
# API
PORT=3000
CLIENT_ORIGIN=http://localhost:5173
# Worker
WHISPER_MODEL=base
MIT