Skip to content

architecture

Antoine edited this page May 22, 2025 · 11 revisions

Communication drawio

Global

Config

The config module load a configuration from a file. contain data like minecraft server directory or database path.

Core

The core is the entry point of the program. It will create the bus, and regarding the configuration, will start some user interface and/or Minecraft server modules.

Server config

A json configuration file containing data relatives to each server.

Common data:

name type default value comment
name string n/a the name of the server, also define the directory of the server
type string n/a the type of the server, like forge, fabric, vanilla, etc.
mc_version string n/a the version of minecraft of the server
ram int 1024 the amount of ram to allocate to the server
autostart bool false if true, the server will be started at the beginning of the program

Forge data:

name type default value comment
forge_version string n/a the version of forge to use

Fabric data:

name type default value comment
fabric_version string n/a the version of fabric to use

Vanilla data:

name type default value comment

Bus

The bus will connect the user interface ,Minecraft servers interfaces and the core.
It allow to register callback on a event, and trigger events. Arguments of callback are defined by the event.
This architecture allow to have multiple user interface and multiple servers simultaneously.

User Interface

BaseInterface

A abstract class that define the interface with the bus for the user interface.

User Database

The user database is a sqlite database that store the user data. It contain two tables:

users

name type default value comment
username string n/a the username of the user
password string n/a the password of the user, encrypted
access_level int 0 the access level of the user
registered_at integer strftime('%s', 'now') the date of registration, in seconds since epoch
last_login integer strftime('%s', 'now') the date of last login, in seconds since epoch
last_ip string n/a the last ip of the user

access_tokens

name type default value comment
username string n/a the username of the user, foreign key to users
token string n/a the token of the user (unique)
expiration integer n/a the expiration date of the token, in seconds since epoch
remember bool false if true, a new token will be generated periodically to keep the session alive

WebServer

A class that is a web server. It will server a website through a Flask server. Also contain a websocket server to communicate with each client. Implementation of BaseInterface

TkInterface

Not implemented yet

Minecraft

BaseMcServer

A abstract class that define the interface with the bus for the Minecraft server.

MinecraftServer

A class that allow communication with a Minecraft server. It will use the Minecraft server jar to start the server Implementation of BaseMcServer

ForgeServer

A class that allow communication with a Forge server. It will use the Forge server jar to start the server Implementation of BaseMcServer through MinecraftServer

FabricServer

Not implemented yet