Skip to main content

System Requirements

WatchLens runs as a four-container Docker Compose stack. Everything the platform needs (PostgreSQL, the FastAPI backend with RecBole, the Vite-built frontend, and the data nginx) is packaged inside images, so the host machine only needs Docker plus enough resources to run the four containers together.

Host machine​

ResourceMinimumRecommendedNotes
OSLinux, macOS, or Windows with WSL2SameAnything that runs Docker Engine 24+ and Compose v2 works
CPU2 cores4 coresRecBole training benefits from extra cores
RAM4 GB8 GB (16 GB when training)RecBole plus PyTorch are the heaviest pieces
Disk5 GB free20 GB free or moreDocker images take about 3 GB. Video data is separate
NetworkAnyStable broadband when participants connect remotelyLAN-only studies have no network constraint

The platform does not require Python, Node, or PostgreSQL on the host. They live inside the Docker images.

Tooling​

ToolRequired version
Docker Engine24 or newer
Docker Composev2 (docker compose ...)
GitAny recent version

The bundled images use Python 3.11, PostgreSQL 15, and Node 20. Upgrading these means rebuilding the corresponding image, not upgrading anything on the host.

Experiment scale guidance​

The defaults in .env.example and app/config.py are tuned for a small lab study. The values below show where the comfort zone ends.

ConcernComfortableWatch out beyond
Concurrent participants on one serverAbout 30Around 100 with a slightly bigger host. Past that you want a load balancer plus replicated containers
Videos per experiment100 to 10,000100k or more. RecBole training time and the item-to-item similarity matrix start to grow
Events per experimentA few millionTens of millions. Postgres still handles it, but the events CSV export streams for several minutes
RecBole training cadenceRECBOLE_FIT_PERIOD_MINUTES=60 (default)Setting this very low (under 10 minutes) on a small host can saturate the CPU
Minimum interactions before trainingRECBOLE_MIN_INTERACTIONS=50 (default)Lower values produce noisier predictions. Higher values delay the first useful learned policy

The defaults are safe. Tune the env variables only after you have measured actual usage.

Participant device​

Each user group is bound to a single device class (desktop, tablet, or mobile). A participant whose viewport does not match sees a mismatch notice rather than a scaled-down UI. See Per-Group Device Routing for the rationale.

ConcernRequired
BrowserRecent Chrome, Firefox, Safari, or Edge
JavaScriptEnabled. The frontend is a single-page React app
CookiesEnabled. Auth uses an HttpOnly cookie
NetworkAnything that can stream the video files. The data nginx supports range requests

There is no mobile app. Mobile participants run the responsive web build in their browser.

Production deployment​

The Compose stack listens on plain HTTP on 127.0.0.1 by default. Real participants reaching the platform from their own devices need TLS plus matching cookie and CORS settings.

VariableProduction valueReason
HOST_BIND0.0.0.0Listen on every interface, or pair with a reverse proxy
HOST_PORT80 (or whatever the proxy expects)Port the host binds
COOKIE_SECUREtrueRequired for the auth cookie to survive over HTTPS
CORS_ORIGINS["https://your-study.example.org"]Allow-list the public origin participants will hit
SECRET_KEYStrong random valueGenerate with openssl rand -hex 32
ADMIN_PASSWORDStrong random valueUsed for the seeded admin account

Put a TLS-terminating reverse proxy (nginx, Caddy, or Cloudflare Tunnel) in front of the frontend container. Do not expose the backend container directly. The frontend's nginx already proxies /api to it.

A cloud VM with 1 vCPU and 4 GB RAM (DigitalOcean, Linode, AWS t3.medium, equivalent elsewhere) handles a 30-participant study comfortably. Studies above that scale should bump the VM tier.

Where to go next​