Skip to content

Developer Setup

This is a guide on setting up your local environment for Flaggi development, including running the server and client, using the dev container, and building from source.

  • Java 21 — full JDK, not just a JRE
  • Gradle — use the included ./gradlew wrapper
  • Node.js + npm — needed for the dev console and the docs site

The dev console is an Electron app that launches the server and two clients, then shows the logs and live game state side by side.

Dev console terminal
cd dev-console
npm install
npm start

Use the toolbar buttons to:

  • Rebuild the server and client artifacts
  • Stop all running processes
  • Clear logs between test runs

This is the fastest way to test multiplayer behavior without manually juggling terminals.

If you prefer separate processes, use the helper script from the repository root.

Server terminal
./scripts/run.sh server
Client terminal
./scripts/run.sh client

The script builds the shadow JAR automatically before launching. Useful flags:

FlagEffect
-r, --rebuildClear the server temp directory before launching
--skip-buildSkip the Gradle build step and use the existing JAR
-h, --helpShow usage information

A Docker-based dev environment lives in .devcontainer/.

It includes:

  • OpenJDK 21
  • Protobuf compiler
  • Gradle
  • Common VS Code extensions for Java and formatting

Open the repository in VS Code and run Dev Containers: Reopen in Container.

For fast verification without launching the game:

Compile shared, client, and server
./gradlew :shared:compileJava :client:compileJava :server:compileJava

To build everything:

Full build
./gradlew build

To build just the runnable jars:

Shadow jars
./gradlew shadowJar

The runnable artifacts are written to each module’s build/libs/ directory.

The docs site itself lives in website/ and runs as a separate Astro app.

Docs preview
cd website
npm install
npm run dev

If you plan to package native installers, install these optional tools:

  • create-dmg on macOS
  • WiX 3 on Windows