This repository is the backend API built with:
- TypeScript
- Express.js
- PostgreSQL
- Prisma
- MinIO
- FFmpeg
- Bun
It uses session-based authentication.
Documentation is available at: https://apiv2.fairplay.video/docs
You need:
- Bun → https://bun.sh
- A PostgreSQL database
- A MinIO instance (or compatible S3 storage)
- FFmpeg installed on your system
To simplify the setup of PostgreSQL and MinIO, you can use Docker Desktop. Running them with Docker is usually faster and avoids manual installation issues.
For example, with Docker you can quickly spin up:
- A PostgreSQL container
- A MinIO container
Instead of installing them directly on your machine.
- Install dependencies
bun i- Create your environment file
Copy the example file and edit it:
cp .env.example .envThen fill in your database, MinIO and other config values.
- Generate Prisma client
bunx prisma generate- Push schema to database
bunx prisma db pushRun in development mode:
bun run devBuild:
bun run buildStart:
bun run startIf something doesn’t work, check:
- Your
.envvalues - That PostgreSQL is running
- That MinIO is accessible
- That FFmpeg is installed
- That your Docker containers (if used) are running