Federation | Fabric | |
---|---|---|
Play | ott_app | demo@macrometa.io |
Architecture:
Dashboard:
API setup with Fastly Compute@Edge
- Create the following collections in your federation:
assets (global)
genres (global)
credits (global)
my_list (global)
users (global)
asset_credit_edge (graph-edge, global)
genres_asset_edge (graph-edge, local)
- Create the following search views in your federation:
asset_credit_view
with Primary sort field popularity
Mapping - Collection | Field | Analyzer |
---|---|---|
assets | name | text_en |
assets | title | text_en |
assets | original_title | text_en |
assets | overview | text_en |
credits | name | text_en |
asset_type_view
Mapping - Collection | Field | Analyzer |
---|---|---|
genres_asset_edge | asset_type | identity |
- Create the following graph in your federation:
OTT
Edge Definitions | From Collections | To Collections |
---|---|---|
genres_asset_edge | genres | assets |
asset_credit_edge | assets | credits |
- Create the following Query workers in your federation:
getMovieAssetsByGenre
getTopRatedMovies
getTopRatedTvSeries
getTvSeriesAssetsByGenre
searchByAsset
searchByCredits
Refer to this link to add content for each Query Worker.
- On the development machine, run the commands below in a console. Use Node.js v16.
1. git clone https://github.com/Macrometacorp/metaflix-fastly.git
2. cd metaflix-fastly/react-app
3. git fetch
4. npm install
5. npm run start