2020

Untitled Project

Social media video and audio streaming platform.

Progressive Web App
TypeScript
React
NodeJS
FFMPEG
Kubernetes
Untitled Project - Preview

Description

This is an unpublished streaming platform with the idea behind it being that, every user can create linear streaming channels. Channels can be public or private as well as play video or audio content. Private channels can be shared with up to 10 friends, while public channels are visible to everybody. The user can upload files and have them play in a defined order, or have them play at random. The files are converted in an MPEG Dash friendly format. MPEG Dash is used for user generated channels, however HLS can be used to add external streams.

Additional to the user generated channels, the platform also contains free and open TV stations.

Tech

The first iteration of the frontend was completed using the Angular 1.x framework. At the time, my lack of experience and knowledge of the framework meant that it was very hard to maintain over the years. The Angular framework has undergone dramatic changes and the project was not structured in a way to keep up with those changes.

A few years after the initial completion, I decided to implement a new frontend using a different tech stack, one that was based on a more modern approach of web development. I went with React because of my experience with it on professional projects as well as personal ones.

For state management, I decided to use the React Context API in conjunction with hooks. Just like Redux it still has states and reducers, but I decided to split them into multiple contexts to reflect the separation in the app.

The backend is written in JavaScript and runs on the latest node version. For simplicity, I decided to implement the backend as a monolith. It is by no means a thing of beauty, but it gets the job done and was good enough to keep even as I was redoing the entire frontend.

The backend also handles uploaded video and audio files. Each file goes through ffmpeg to make sure they can be played in every browser and support MPEG Dash streaming. Each video is converted into 3 video and 3 audio file sizes. Each one representing a different level of quality, allowing us to serve the best available experience to the user based on their device and bandwidth.

The entire stack is deployed using Skaffold, Helm v2 and Kubernetes. Skaffold is used for local deployment and for testing/development, as well as running the production deployment with the correct environment variables.