Skip to content

FairPlayTeam/ts-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ko-fi

Fairplay / Rewind TypeScript API

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


Requirements

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.


Setup

  1. Install dependencies
bun i
  1. Create your environment file

Copy the example file and edit it:

cp .env.example .env

Then fill in your database, MinIO and other config values.

  1. Generate Prisma client
bunx prisma generate
  1. Push schema to database
bunx prisma db push

Development

Run in development mode:

bun run dev

Production

Build:

bun run build

Start:

bun run start

If something doesn’t work, check:

  • Your .env values
  • That PostgreSQL is running
  • That MinIO is accessible
  • That FFmpeg is installed
  • That your Docker containers (if used) are running

About

Current TypeScript Backend

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors