📄️ Architecture Overview
Vidra follows clean architecture principles with a strict boundary between domain logic, business rules, and infrastructure adapters. This page gives you a mental model of how the pieces fit together — from the edge layer down to storage and workers.
📄️ Infrastructure
Vidra's infrastructure is designed for flexibility — run everything in Docker for local development, or connect to managed cloud services for production. The architecture splits cleanly into five focused areas, each documented on its own page.
📄️ Docker Services
Vidra ships a Docker Compose configuration that covers every service you need for local development. Core services (API, database, cache, proxy) always start together. Optional services are activated via Docker Compose profiles and only need to run when you're working on a specific feature.
📄️ Production Architecture
Vidra's production architecture is a standard multi-tier layout: a CDN/edge layer absorbs static traffic, a load balancer distributes API requests across horizontally-scaled application instances, and separate tiers handle data, storage, and background transcoding. Each tier scales independently.
📄️ Video Pipeline
Vidra uses an asynchronous, queue-driven pipeline for video uploads. Files are uploaded in chunks (to handle large files and resume broken uploads), then a background FFmpeg worker picks up the job and transcodes to multiple resolutions. The API returns a 202 Accepted immediately — the video becomes available once transcoding completes.
📄️ Federation
Federation lets Vidra instances communicate with each other and with other platforms in the decentralized web. A user on one Vidra instance can follow a channel on another instance, and that interaction is synchronized through open protocols — without either instance needing a central authority.
📄️ Storage
Vidra's storage architecture has three layers: an Upload Path that ingests and validates incoming files, Primary Storage where transcoded files live (local disk or S3), and an optional Distributed tier (IPFS, WebTorrent) that reduces bandwidth and improves availability at scale. All three serving methods — direct HTTP, P2P, and IPFS gateway — can be active simultaneously.