Skip to content

Latest commit

 

History

History
 
 

api-internal

API

Setup

Create an .env file at the root of the api directory:

# MongoDB connection string and database name
MONGO_URI=***
MONGO_DB_NAME=***

# Keys used to encrypt data and authenticate RPCs
ENCRYPTION_KEY=***
SECRET_KEY=***

# Third party services
SENTRY_DSN=***
GITHUB_TOKEN=***
TWITTER_KEY=***
TWITTER_SECRET_KEY=***
TWITTER_BEARER_TOKEN=***
TWITTER_ACCESS_TOKEN=***
TWITTER_ACCESS_TOKEN_SECRET=***

# Whether to load locales and entities data from GitHub or from a local directory
# local | undefined
LOAD_LOCALES=local
# local | undefined
LOAD_ENTITIES=local

# redis | undefined
CACHE_TYPE=redis

Note: contact me (Sacha) on Discord if you need the actual values.

Running the App

npm run dev
npm run dev:clean # run without cache

Translations

You can use the GraphQL API to get more info about a specific translation locale. Here is a sample query:

query GetLocaleData {
  locale(localeId: "ru-RU") {
    completion
    totalCount
    translatedCount
    translators
    untranslatedKeys
  }
}