/faf-java-api

The FAForever REST api

Primary LanguageJavaMIT LicenseMIT

FAF API

Codacy Badge Build Status Coverage Status

This is the official FAForever API. Amongst others, the API offers the following functionality:

  • OAuth 2.0 compliant authentication server
  • User management (registration, password reset, etc.)
  • JSON-API compliant REST API for lots of community data (i.e. map, mod & replay vault, game statistics, etc.)
  • Leaderboards
  • Clan management
  • Vault upload functionality
  • Internal FAF featured mod deployments
  • Challonge proxy

How to run

Setup database

The application requires a database scheme in the right version. To create this database please checkout the project faf-stack, open a shell terminal (git bash on Windows) and run the script scripts/init-db.sh. This will setup the database in the latest version and configure the users for you.

From source

In order to run the application from source code:

  1. Clone the repository
  2. Import the project into IntelliJ. For some reason, IntelliJ deletes launch configurations after import. Please revert such deleted files first (Version Control (Alt+F9) -> Local Changes)
  3. Configure your JDK 8 if you haven't already
  4. Make sure you have the IntelliJ Lombok plugin installed
  5. Set up a FAF database.
  6. Launch FafApiApplication

From binary

Given the number of required configuration values, it's easiest to run the API using faf-stack:

docker-compose up -d faf-java-api

Sample routes

Technology Stack

This project uses: