Skip to content

Web app for viewing Epic Games Store item IDs

License

Notifications You must be signed in to change notification settings

acidicoala/ScreamDB

Repository files navigation

🐨 ScreamDB

Welcome to the ScreamDB repository.

For user-friendly introduction, please check out the web app's home page. This document is meant for developers.

🚀 App architecture

This web was developed and hosted using great technologies such as:

🏢 Hosting

The web app is hosted on 🔥 Firebase at https://scream-db.web.app/

🔐 The CORS issue

Modern browsers enforce strict CORS policy. That means the web app cannot directly make requests to the Epic Games' GraphQL endpoint. Furthermore, the endpoint has a whitelist of valid Referer header values, which unfortunately is not possible to set using browser's JavaScript. To overcome these issues I have deployed a simple CORS proxy script on the Cloudflare Workers platform. It redirects all request to the actual GraphQL endpoint but modifies the response header Access-Control-Allow-Origin with the domain of this web app. The source of the script is available in this repository: epic-cors-proxy. The project is configured to use this proxy in development and production, but it is possible to override them via .env files.

🌐 Localization

Currently, the following languages are supported:

  • English
  • Spanish (Credit to @g-yui)
  • Russian
  • Simplified Chinese (Credit to @Citrinae-Lime)

The web app localization is defined in src/util/locale.ts.

Furthermore, home page is rendering localized Markdown documents located at src/md.

If you wish to contribute a translation for another language, you are free to submit a pull request.

📜 Available Scripts

In the project directory, you can run the following commands:

Command Documentation
yarn start start @ CRA docs
yarn build build @ CRA docs
yarn deploy deploy @ Firebase docs
yarn generate-sdk graphql-codegen @ GraphQL Code Generator docs

The commands above assume that the corresponding CLI tools have been installed and configured.

📄 License

This software is licensed under Zero Clause BSD license, terms of which are available in LICENSE.txt.