A backend, which meant to feed videos from various sources, process it with a chain of processors and store internally. It is fed to frontend via API and is meant to be using some sort of prediction engine to suggest relevant next video. At the moment it's just returning random videos from storage all the time.
Make sure you've got scala (at least 2.12.2), sbt (at least 0.13.13) and docker (I have 17.03.1-ce) installed. Checkout this project and
sbt test
docker-compose up -d
sbt run
This contains API related (backend) stuff. At the moment it contains all the sourcing and processing as well as storage. These can potentially be decoupled into their own microservices leaving this as simple API gateway.
Gets a feed of videos to process and store:
Pocket is the only source currently. It is redacted and not automated.
Once video got from the source, it is processed internally:
Id extracts video ID (only supports Youtube and Vimeo);
Url composes embed url for video (only supports Youtube and Vimeo).
Stores feeds of events in the storage:
RuntimeStorage is non persistent in memory store;
GetEventStore persistent event database from Gregg Young.
Contains API client, written in Scala.js It is transpiled into JS and distributed in NPM as suggested API client implementation.
Contains data structures, which are shared between API and API Client JS.