> For the complete documentation index, see [llms.txt](https://docs.aethercube.fr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aethercube.fr/developers/overview/platform.md). Agents can also search and read this documentation through its [MCP server](https://docs.aethercube.fr/~gitbook/mcp).

# Platform overview

Read this page first if you want the big picture: what the programs are, who talks to whom, and where your own code or files plug in.

Aethercube is four programs and one shared protocol.

| Part        | Language                   | Directory                 | Role                                                                     |
| ----------- | -------------------------- | ------------------------- | ------------------------------------------------------------------------ |
| Game client | Rust, Bevy 0.20            | `game-client/`            | Renders the world, predicts movement, talks to a game server.            |
| Game server | Java 21, Netty             | `game-server/`            | Runs the simulation and hosts plugins. It is authoritative for gameplay. |
| Plugin API  | Java 21                    | `game-server/server-api/` | The only API plugins may use.                                            |
| Launcher    | Rust, Iced                 | `game-launcher/`          | Signs the player in, installs and updates the client, starts it.         |
| Backend     | Go, PostgreSQL 16, Redis 7 | `backend-services/`       | Accounts, sessions, server directory, news, versions.                    |
| Protocol    | Protobuf + Markdown        | `protocol/`               | Wire format and gameplay contracts shared by everything above.           |

## How the parts talk

```mermaid
flowchart LR
    L[Launcher]
    C[Game client]
    S[Game server]
    B[Backend]

    L -- "HTTPS: sign-in, tickets, news, versions, directory" --> B
    L -- "starts the client; ticket over a local channel" --> C
    C -- "TLS 1.3, protobuf frames: gameplay" --> S
    S -- "HTTPS, HMAC-signed: ticket check, heartbeat" --> B
    C -. "HTTPS: server directory (optional)" .-> B
```

* **Client to game server.** All gameplay traffic goes straight from the client to the server over one TCP connection secured with TLS 1.3. It never passes through the backend. See [Transport and handshake](https://docs.aethercube.fr/developers/protocol/transport-and-handshake.md).
* **Game server to backend.** In online mode the server asks the backend to verify each player's connection ticket. With the master server enabled it also sends a signed heartbeat every few seconds, which keeps it in the public server directory. See [Online mode, TLS and the directory](https://docs.aethercube.fr/developers/running-a-server/online-mode-tls-and-directory.md).
* **Launcher to backend.** The launcher signs the player in, asks for a single-use ticket bound to one server, and reads news and release information.
* **Launcher to client.** The launcher starts the client with a local channel. The ticket, the server address and the server's certificate pin go through that channel, never on the command line, so they do not show up in a process list.
* **Client to backend.** The client can read the server directory when `directory_url` is set in its `client.toml`.

## Joining a server, online mode

1. The player signs in through the launcher. The launcher holds the account's tokens.
2. The player picks a server. The launcher asks the backend for a ticket for that server (`POST /api/v1/sessions`).
3. The launcher starts the client and hands it the server address, the optional certificate pin and the ticket.
4. The client opens a TLS 1.3 connection and sends `ClientHello` with the ticket.
5. The server sends the ticket to the backend (`POST /api/v1/sessions/verify`, signed with the server's secret). The backend answers with the account.
6. The server runs the content phase when the client supports it, answers `ConnectionAccepted` and streams the world.

## Joining a server, offline mode

An offline server takes a player name instead of a ticket and never contacts the backend. It is meant for development and private use. See [Online mode, TLS and the directory](https://docs.aethercube.fr/developers/running-a-server/online-mode-tls-and-directory.md).

## Single-player

The client does not embed a server. For a local world it starts the regular Java game server as a child process, bound to the loopback interface in offline mode, and joins it like any other server. Plugins, commands and rules behave exactly as in multiplayer. That is deliberate: one code path to maintain and to test.

## Extension points

| You write                       | It runs in                     | Documentation                                                                         |
| ------------------------------- | ------------------------------ | ------------------------------------------------------------------------------------- |
| A plugin (Java jar)             | The game server process        | [Plugins](https://docs.aethercube.fr/developers/plugins/getting-started.md)           |
| A content pack (files)          | The client, sent by the server | [Content packs](https://docs.aethercube.fr/developers/content-packs/overview.md)      |
| A tool that reads the directory | Anywhere                       | [Backend API](https://docs.aethercube.fr/developers/backend-api/overview.md)          |
| A protocol client               | Anywhere                       | [Protocol](https://docs.aethercube.fr/developers/protocol/transport-and-handshake.md) |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.aethercube.fr/developers/overview/platform.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
