Free and Open-source video streaming suite.
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
Dale f192b1cb08
feat: Update frontend version in module
vor 1 Monat
.vscode feat: Move types into shared package vor 2 Monaten
bin feat: Working nix build vor 2 Monaten
config feat: Migrate on launch vor 2 Monaten
migrations feat: Move types into shared package vor 2 Monaten
scripts feat: nix? vor 2 Monaten
src/server misc: Migrations in module vor 2 Monaten
test feat: Tests for basic activity vor 2 Monaten
.envrc feat: Add roadmap vor 2 Monaten
.gitignore misc: additions to .gitignore vor 2 Monaten misc: Add streaming backbone description and links vor 2 Monaten misc: Added misc section vor 2 Monaten
default.nix feat: Add shell.nix for faster development vor 1 Monat
knexfile.js feat: Sessions, access control vor 1 Jahr
module.nix feat: Update frontend version in module vor 1 Monat
package.json feat: Add shell.nix for faster development vor 1 Monat
shell.nix feat: Add shell.nix for faster development vor 1 Monat
tsconfig.json feat: Working nix build vor 2 Monaten
tslint.json feat: Stream Keys, Channels, Activities vor 1 Jahr
yarn.lock nix? vor 2 Monaten
yarn.nix feat: nix? vor 2 Monaten

Miracle TV

MIRACLE IS CURRENTLY NOT PRODUCTION READY (as I hope is evident from this repository)

Backend portion of the MiracleTV Streaming Suite.

Uses PostgreSQL, TypeScript, Express and Nix

Streaming is supported by Nginx RTMP and OSSRS

This package is intended to work with

MiracleTV Frontend and

MiracleTV Shared


v1.0.0 Coming when it's done

Running in produciton

Nix / NixOS

You can run this with nix / nixos as a package

As a user package

  1. Download default.nix and save it, i.e. as miracle-tv.nix;
  2. Run nix-env -i -f miracle-tv.nix to install locally;
  3. Use miracle-tv-server binary, i.e. miracle-tv-server --configPath=/path/to/your/config.json (See /config/local.json for examples)

As a system module

  1. Import a module declaration into your configuration.nix from git or using fetchfile, i.e.
    imports = [
        "${builtins.fetchurl {
            url = "";
            sha256 = "0k04z1w6yrr3f9g7g5dpdrdkx9lazf273nsb23zq1zp0mgd4dd71";


[Be mindful!] This example uses a version of the module fixed to a commit.

While this is a good practice, this particular example might be outdated.

It is recommended to find a more recent commit and use nix-prefetch-url to get sha256 value;

$ nix-prefetch-url

path is '/nix/store/zvsjjia6ppb35icywvgl9ljcn41q7svh-module.nix'


  1. In your config further, enable miracle-tv service
  services.miracle-tv = {
    enable = true;
    settings = {
      database.connection = {
        database = "miracle";
        user = "miracle";
  1. Run nixos-rebuild switch (or sudo nixos-rebuild switch) to rebuild your system and start the service.
  2. Check local connection availability with curl http://localhost:8080/api/v1/channels, if response is {"data":[], "status": "ok"}, then you're all set!

Other Distros

  1. Have node > 14.0 installed and yarn
  2. Checkout project dir
  3. yarn && yarn build:server
  4. node ./dist/server/server.js --configPath=/path/to/config.json (check /config/local.json for examples)
  5. (Optional) Use process manager of your choice (Built-in process manager coming some time later!)



Simply use nix-shell inside project folder (or use a tool like direnv) to drop into development environment already set up

  1. nix-build in project folder builds default derivation and dumps it into result/. Make sure to check the executable before pushing final commits and do not commit result/ in!
  2. Make sure to run rm yarn.nix && yarn2nix > yarn.nix after adding new yarn packages before you commit

Other Distos

Make sure you have node >14.0 and yarn installed, as well as all necessary tools to build node packages.

Common procedure

  1. Install dependencies with yarn
  2. Use yarn watch:server to continously watch and restart yarn
  3. Use yarn build:server to produce a working build into dist/ directory
  4. Use yarn test to run a test suite on the server

Contribution Checklist

Nix / NixOS

  • Make sure that nix-build produces usable output.
    1. An output is considered usable if it's runnable via ./result/bin/miracle-tv-server --configPath=./config/local.json
  • If adding a new package, do not forget to generate new yarn.nix by running yarn2nix > yarn.nix
    1. yarn2nix should be available inside nix-shell
    2. A good idea is to run nix-collect-garbage && nix-build after that to make sure project builds

Other Distros

  • Make sure that yarn build:server produces usable output
    1. An output is considered usable if it's runnable via node ./dist/server/server.js --configPath=./config/local.json;
  • If adding a new package, mention that you cannot update yarn.nix when opening a pull-request
    1. Somebody should be able to update it and commit it into your pull-request or otherwise help you out