Skip to main content

Project Structure

Directories

cache

As the name suggests this directory contains all the cache-data saved and used by EvoSC. This directory must not be populated with files by anyone other than EvoSC.

There is one exception to that: If you want to tell EvoSC to restart through the filesystem, create a file called "restart_evosc" inside the cache-directory. EvoSC looks for the existence of that file and reboots itself when found. This can be used for update scripts, or if you just dont want to join the server. A graceful shutdown is always better for the players online, than killing the process.

config

This directory contains all the configuration files that EvoSC uses. This is the one and only place a config should be changed by a user. A user must not change the files inside core (more specific the ones in the modules). The default sub-directory contains the default configs, which do not belong to any module.

On controller start, all default configs from the modules and the default directory get copied to the config directory, if they are missing. All existing configs are compared to the defaults, so if a new value was added, it gets added to the json in config. Also when removing a key in the default, it will be deleted in the json in config.

The filename is also the root id to call values. Example: To get the log file prefix from server.config.json you would call config('server.log.prefix')

core

Here's where the code resides, only devs should touch this directory.

Classes Some classes to help out structure commonly used data and structures.
Commands This directory contains all callable CLI commands.
Controllers Controllers are thought to be mandatory parts of EvoSC, that must run to make it work and provide informations for the modules.
Dictionary A base for the not yet used language support.
Exceptions EvoSCs Exceptions.
Interfaces Interfaces.
Models Eloquent database models more here: https://laravel.com/docs/7.x/eloquent#eloquent-model-conventions
Modules Modules that ship with EvoSC reside in this directory.
TemplateComponents Different reusable templates and scripts to use for ManiaLink creation with latte-template-engine.
Tests Tests.

global-functions.php contains methods that are available throughout the whole project at any time.

logs

Logging files are created here.

Migrations

EvoSC uses incremental database creation through migrations. Migrations created with the CLI command are created in this directory and may be copied to your module from there, if you want to create a thrird-party module.

modules

Put third-party modules (which are not part of EvoSC) into this directory.

vendor

All the php libraries installed by composer.