Framegrab Tagger is a web-based system for ingesting movie still images, predicting their source films, and enriching them with trusted metadata. It uses FastAPI for the backend, Celery for asynchronous pipelines, Postgres for storage, Redis for brokering tasks, and S3-compatible object storage for frames.
backend/– FastAPI application, Celery worker definitions, Alembic migrations, and pytest suites.frontend/– Next.js interface for browsing frames, reviewing predictions, and exporting results.deploy/– Kubernetes manifests.docker-compose.yml– Local stack for Postgres, Redis, MinIO, the API, and the worker.
- Python 3.11+
- Postgres, Redis, and an S3-compatible store (MinIO works well locally)
- (Optional) TMDb and OMDb API keys for enrichment tasks
python -m venv .venv
source .venv/bin/activate
pip install -r backend/requirements.txtThe backend reads environment variables (or a .env file) via pydantic-settings. Common options with defaults:
APP_DATABASE_URL/DATABASE_URL(defaultpostgresql+psycopg://movietag:movietag@localhost:5432/movietag)APP_CELERY_BROKER_URL/CELERY_BROKER_URL(defaultredis://localhost:6379/0)APP_CELERY_RESULT_BACKEND/CELERY_RESULT_BACKEND(defaultredis://localhost:6379/1)APP_CELERY_DEFAULT_QUEUE/CELERY_DEFAULT_QUEUE(defaultmovietag.default)APP_STORAGE_*(ENDPOINT_URL,ACCESS_KEY,SECRET_KEY,FRAMES_BUCKET) for S3/MinIO accessAPP_TMDB_API_KEY/APP_OMDB_API_KEYfor metadata providersAPP_ADMIN_TOKEN/APP_MODERATOR_TOKENbearer tokens for moderation-protected endpoints
cd backend
uvicorn app.main:app --reload
# in another shell
celery -A app.core.celery.celery_app worker --loglevel=infoThe API is served at http://localhost:8000/api with interactive docs at /docs. Ingest endpoints queue Celery pipelines for embedding, tagging, scene attribution, and actor detection.
cd backend
alembic upgrade headcd backend
pytestBring up Postgres, Redis, MinIO, the API, and the worker in one command:
docker-compose up -dTear down everything (including volumes) with:
docker-compose down -vThe frontend app provides a frame grid, per-frame detail panel, override flows, and export tooling. It targets Node.js 18+.
cd frontend
npm install
npm run devThe UI fetches data from /api/..., so run it behind a proxy that forwards /api to the FastAPI server (e.g., docker-compose or a local reverse proxy) to keep the browser origin consistent.