All application configurations are located in the app/config directory. Configuration files are PHP scripts that return an associative array. Each file describes a separate logical area of settings (for example, application settings, database settings, etc.).
All configuration files are merged into a single array $API::$configs.
Top-level keys must be unique. In the event of key collisions, the configuration loaded last takes precedence.
For example:
// db.php
return [
"db" => [..]
];
// app.php
return [
"timezone" => "UTC"
];
$API::$configs = [
"db" => [..],
"timezone" => "UTC"
];
Each configuration file must return an array:
return [
"setting_key": "setting_value"
];
Configurations may contain nested structures without depth limitations.
Example:
return [
"db" => [
"host" => "mysql",
"user" => "root",
"password" => "root",
"name" => "sample_db"
]
];
After loading the configuration, values are accessed via the global storage:
$API::$configs[ "db" ][ "host" ];
$API::$configs[ "default_lang" ];
$API::$configs[ "paths" ][ "app_actions" ];
Database connection configuration. Defines MySQL connection parameters: host, user, password, and database name. It is used by the framework core to initialise the database connection.
return [
"db" => [
"host" => "mysql",
"user" => "root",
"password" => "root",
"name" => "sample_db"
]
];
The database host address or hostname (for example `mysql`, `127.0.0.1`, or a database server domain name).
The database username used for the connection.
The database user password.
The name of the database to connect to.
Main application configuration. Defines global behaviour parameters of the SaaS system, including interface settings, localisation, timezone, and security parameters.
return [
"admin_url" => "localhost",
"default_lang" => "en",
"phone_formats" => [ "en" ],
"timezone" => "America/Los_Angeles",
"jwt_key" => "GK8VSb4TnWP8VXjD"
];
* [!] `jwt_key` must be unique for each project and must not be exposed in public repositories.
The base URL of the application's administrative panel. Used for link generation and routing within the admin interface.
The default application language (locale code, e.g. `en`, `fr`, `ro`). Used when no user or system preference is available.
A list of supported phone number formats by language/region. Used for validation and formatting of phone numbers.
The application timezone in IANA format (e.g. `America/Los_Angeles`). Used for all date and time operations.
Secret key used for signing JWT tokens. Used by the authentication and authorisation system.
Central system path configuration. Defines absolute paths to key framework and application directories. Used as a single source of truth for file structure handling, module loading, schemas, and resources.
The paths configuration is generated automatically by the framework core and does not require manual editing.
All paths are grouped under the `paths` section.
$API::$configs[ "paths" ][ "app_action_schemes" ];