Skip to content

speed2CZ/faf-java-server

 
 

Repository files navigation

Spring Boot based FAF-Server

This is a reimplementation of the Forged Alliance Forever's server application.

It aims to abstract the communication protocol as far as possible in order to stay compatible with current server's legacy protocol while at the same time allowing new protocols to be added and supported simultaneously.

As the underlying (legacy) database schema isn't based on best education and diligence either, some data types, structures, concepts and/or field names may be questionable, too, even though efforts are made to abstract it with a clean layer as well (work in progress)

master develop
Build Status Build Status
Coveralls Status Coveralls Status

How to run

Prerequisites

In order to run this software, you need to set up a FAF database.

From source

In order to run the application from source code:

  1. Clone the repository
  2. Import the project into IntelliJ
  3. Configure your JDK 8 if you haven't already
  4. Make sure you have the IntelliJ Lombok plugin installed
  5. Launch FafServerApplication

From binary

In order to run the application from prebuilt binaries:

docker run --name faf-server \
  -e DATABASE_ADDRESS=localhost:3306 \
  -e DATABASE_USERNAME=root \
  -e DATABASE_PASSWORD=banana \
  -e DATABASE_NAME=faf_lobby \
  -e API_OAUTH2_CLIENT_ID=faf-server \
  -e API_OAUTH2_CLIENT_SECRET=banana \
  -e SERVER_PROFILE=dev \
  -d micheljung/faf-server:0.0.1-SNAPSHOT

To run in production, you probably want to create an environment file (e.g. env.list):

DATABASE_ADDRESS=<db_address>
DATABASE_USERNAME=<username>
DATABASE_PASSWORD=<password>
DATABASE_NAME=<db_name>
API_OAUTH2_CLIENT_ID=<client_id>
API_OAUTH2_CLIENT_SECRET=<client_secret>
UID_PRIVATE_KEY=<private_key>
SERVER_PROFILE=prod

And run with:

docker run --name faf-server \
  --env-file ./env.list \
  -d micheljung/faf-server:0.0.1-SNAPSHOT

Technology Stack

This project uses:

Architecture

Open with draw.io: https://drive.google.com/file/d/0B9_8tdXfnFw2MnJjZlJ0RDZlMGc/view?usp=sharing

Learn

Learn about Spring Integration: https://www.youtube.com/watch?v=icIosLjHu3I&list=PLr2Nvl0YJxI5-QasO8XY5m8Fy34kG-YF2

About

Spring Boot based server for Forged Alliance Forever

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Java 77.9%
  • PLpgSQL 22.1%