{"id":18425761,"url":"https://github.com/faforever/faf-java-api","last_synced_at":"2026-06-06T23:01:24.543Z","repository":{"id":37876750,"uuid":"77098620","full_name":"FAForever/faf-java-api","owner":"FAForever","description":"The FAForever REST api","archived":false,"fork":false,"pushed_at":"2024-08-13T08:05:38.000Z","size":4356,"stargazers_count":30,"open_issues_count":16,"forks_count":29,"subscribers_count":11,"default_branch":"develop","last_synced_at":"2024-08-13T23:58:55.764Z","etag":null,"topics":["elide","java","rest","spring"],"latest_commit_sha":null,"homepage":"https://api.faforever.com","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FAForever.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-22T01:15:52.000Z","updated_at":"2024-08-13T07:15:26.000Z","dependencies_parsed_at":"2023-02-16T05:45:56.528Z","dependency_job_id":"20806501-cd91-4d16-afc6-80d5594ecd89","html_url":"https://github.com/FAForever/faf-java-api","commit_stats":null,"previous_names":[],"tags_count":288,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FAForever%2Ffaf-java-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FAForever%2Ffaf-java-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FAForever%2Ffaf-java-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FAForever%2Ffaf-java-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FAForever","download_url":"https://codeload.github.com/FAForever/faf-java-api/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230415318,"owners_count":18222158,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elide","java","rest","spring"],"created_at":"2024-11-06T05:05:27.961Z","updated_at":"2026-06-06T23:01:24.499Z","avatar_url":"https://github.com/FAForever.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FAF API\n\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/9ac3915f155c4bfb869b8fe123b6832e)](https://www.codacy.com/gh/FAForever/faf-java-api/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=FAForever/faf-java-api\u0026amp;utm_campaign=Badge_Grade)\n[![Build](https://github.com/FAForever/faf-java-api/actions/workflows/build.yaml/badge.svg)](https://github.com/FAForever/faf-java-api/actions/workflows/build.yaml)\n[![Coverage Status](https://coveralls.io/repos/github/FAForever/faf-java-api/badge.svg?branch=develop)](https://coveralls.io/github/FAForever/faf-java-api?branch=develop)\n \nThis is the official FAForever API. Amongst others, the API offers the following functionality:\n- User management (registration, password reset, etc.)\n- JSON-API compliant REST API for lots of community data (i.e. map, mod \u0026 replay vault, game statistics, etc.)\n- Leaderboards\n- Clan management\n- Vault upload functionality\n- Internal FAF featured mod deployments\n- Challonge proxy\n \n## How to run\n\n### Setup database\n\nThe application requires a database scheme in the right version. To create this database please checkout the project [faf-stack](https://github.com/FAForever/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.\n\n### From source\n\nIn order to run the application from source code:\n\n1. Clone the repository\n1. Import the project into IntelliJ. For some reason, IntelliJ deletes launch configurations after import. Please revert such deleted files first (Version Control (Alt+F9) -\u003e Local Changes)\n1. Configure your JDK if you haven't already\n1. Make sure you have the _IntelliJ Lombok plugin_ installed\n1. Set up a [FAF database](https://github.com/FAForever/db).\n1. Launch `FafApiApplication`\n \n### From binary\n\nGiven the number of required configuration values, it's easiest to run the API using [faf-stack](https://github.com/FAForever/faf-stack):\n\n    docker-compose up -d faf-java-api\n\n## Database dependency\n\nDue to potential issues with Hibernate, the application checks on startup if the flyway migration version matches the expected version and otherwise fails to boot.\n\n* To increment the db version you need to change it in two places:\n  * application.yml: `faf-api.database.schema-version` (just an integer of the version)\n  * .github/workflows/build.yaml: Global variable `FAF_DB_VERSION` (git tag of the db release, usually prefixed with a `v`)\n* In some cases it might make sense to override the required version on the server. Use the env variable `DATABASE_SCHEMA_VERSION`\n \n\n## Sample routes\n\n* [API documentation](http://localhost:8010)\n* [List event definitions](http://localhost:8010/data/event)\n* [List 5 maps with more than 8 players](http://localhost:8010/data/mapVersion?filter=(maxPlayers=gt=8)\u0026page[size]=5)\n* [List UI mods, sorted by last updated ascending](http://localhost:8010/data/modVersion?filter=(type=='UI')\u0026sort=-updateTime)\n* [List all players](http://localhost:8010/data/player)\n* [List events of players](http://localhost:8010/data/playerEvent)\n* [List replays](http://localhost:8010/data/game?filter=(endTime=isnull=true))\n\n## Technology Stack\n\nThis project uses:\n\n* Java 21 as the programming language\n* [Spring Boot](https://projects.spring.io/spring-boot/) as a framework\n* [Hibernate ORM](http://hibernate.org/orm/) as ORM mapper\n* [Elide](http://elide.io/) with [RSQL filters](http://elide.io/pages/guide/08-filters.html#rsql) to serve [JSON-API](http://jsonapi.org/) conform data\n* [Gradle](https://gradle.org/) as a build automation tool\n* [Docker](https://www.docker.com/) to deploy and run the application\n* [Swagger](http://swagger.io/) as an API documentation tool\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaforever%2Ffaf-java-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffaforever%2Ffaf-java-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaforever%2Ffaf-java-api/lists"}