Açıklama Yok

Leszek Wiesner 88c4826770 Update app action commitment, disallow signing arbitrary appActionMetadata (#81) 1 yıl önce
.github c01d05389f add Github action to publish docker image (#31) 2 yıl önce
.yarn 7633b08bfb fix Orion memory leak (#36) 2 yıl önce
src 88c4826770 Update app action commitment, disallow signing arbitrary appActionMetadata (#81) 1 yıl önce
tests 5b323f7457 Kill switch feature (#38) 2 yıl önce
.dockerignore 2f6d13b25a add docker deployment 4 yıl önce
.eslintrc.js a91a57c6b4 Content reporting (#37) 2 yıl önce
.gitignore 7633b08bfb fix Orion memory leak (#36) 2 yıl önce
.huskyrc 579baa3ac8 orion boilerplate 4 yıl önce
.prettierrc.js 228aec1ada fix linting, add PR checks 3 yıl önce
.yarnrc.yml 7633b08bfb fix Orion memory leak (#36) 2 yıl önce
Dockerfile 1e98837edc 🚀 Introduce data stiching, make Orion into a proper gateway (#29) 2 yıl önce
README.md 2ae84b5d60 update README (#44) 2 yıl önce
docker-compose.yml 5f6dc5cf28 add required env to docker-compose (#40) 2 yıl önce
jest-mongodb-config.js 50cabc99b3 add integration tests (#11) 3 yıl önce
jest.config.js 50cabc99b3 add integration tests (#11) 3 yıl önce
package.json 88c4826770 Update app action commitment, disallow signing arbitrary appActionMetadata (#81) 1 yıl önce
queryNodeSchemaExtension.graphql 1e98837edc 🚀 Introduce data stiching, make Orion into a proper gateway (#29) 2 yıl önce
schema.graphql a79cd449f2 App-actions functionality (#75) 1 yıl önce
tsconfig.build.json 50cabc99b3 add integration tests (#11) 3 yıl önce
tsconfig.json 88c4826770 Update app action commitment, disallow signing arbitrary appActionMetadata (#81) 1 yıl önce
yarn.lock 88c4826770 Update app action commitment, disallow signing arbitrary appActionMetadata (#81) 1 yıl önce

README.md

Orion

Orion is a backend service for Atlas. It is a GraphQL API that combines Query Node data with some of its own data to provide a unified API for Atlas. Current Orion functionalities include:

  • Proxying data from the Query Node
  • Keeping count of video views and channel follows
  • Providing featured content data
  • Handling content reporting

Functionalities overview

Video views and channel follows

Orion keeps track of video views and channel follows happening in Atlas. It does so by following very simple approach - it offers 3 mutations - addVideoView, followChannel and unfollowChannel. Based on the operation, data in the database is updated. However, Orion currently doesn't use any authentication mechanism. That means that anyone can call these mutation any number of times. It is very easy to create thousands of fake views and follows. This is a temporary solution and will be replaced with a more robust solution in the future.

Featured content

Orion provides a way to set featured content in Atlas. This currently includes video hero and featured videos for each video category. This is done by providing a set of mutations that allow to set the featured content. The mutations are:

  • setVideoHero
  • setCategoryFeaturedVideos

Both of those mutations require a secret token (ORION_FEATURED_CONTENT_SECRET) to be provided in the Authorization header.

To get more information about featured content, please refer to this Atlas document.

Content reporting

Orion also enables content reporting which may be useful to you as an operator. When the app users see something that shouldn't be there (e.g. illegal content or copyright infringement), they can report it using 2 mutations - reportVideo and reportChannel. Orion's operators can then review the reports and take appropriate actions. You can use this GraphQL query to get all the content reports:

query {
  reportedVideos {
    id
    videoId
    reporterIp
    rationale
  }

  reportedChannels {
    id
    channelId
    reporterIp
    rationale
  }
}

Both of those queries require a secret token (ORION_ADMIN_SECRET) to be provided in the Authorization header.

Deployment

Orion uses following environment variables:

  • ORION_MONGO_HOSTNAME - required, hostname of the MongoDB instance to keep Orion's data
  • ORION_QUERY_NODE_URL - required, URL of the Query Node GraphQL endpoint
  • ORION_FEATURED_CONTENT_SECRET - required, secret token used to authorize featured content mutations
  • ORION_ADMIN_SECRET - required, secret token used to authorize admin mutations
  • ORION_MONGO_PORT - optional, port of the MongoDB instance, defaults to 27017
  • ORION_MONGO_DATABASE - optional, name of the MongoDB database, defaults to orion
  • ORION_PORT - optional, port on which Orion will be available, defaults to 6116
  • ORION_DEBUGGING - optional, enables debugging, defaults to false

Docker

Easiest way to deploy Orion is by using the provided Docker image. You can find the latest image on Docker Hub.

To start Orion and MongoDB, you can use docker-compose. Just remember to first update the environment variables in the docker-compose.yml file.

docker-compose up

Starting a dev server

yarn install
yarn run dev