FW Api Structure
The FW App System is designed for individual applications, but in order to make them all work together well, there is an encompassing api structure that all the apps will be "installed" into.
Whenever you install the FW Api (using the installer, or building it from the source repository), it will generate a structure that looks somewhat like this:
api-dir/
apps/
config/
src/
vendor/ # autogenerated, not important
apps.json
api.php
composer.json # these are used by Composer, a php dependency manager, and can be ignored
composer.lock #
- The
apps
directory
The apps directory is where all of the applications that you install will go. Each app will be installed to its own folder inside the apps
directory. For example, if you installed Group Control, it would be installed to the api-dir/apps/group-control/
folder.
- The
config
directory
This contains configuration files for your application. More information about configuration files can be found in the Configuration section of this documentation.
- The
src
directory
This contains all of the Php source files for FW Api
apps.json
If you are using the FW Installer, this will be automatically generated and updated, so don't edit it. If you are installing applications to your system manually, you will need to edit this file in order to notify the FW Api that your app is installed.
The contents of apps.json
are several key-value pairs that represent installed applications. The "key" is the application shortcode, and the "value" is it's location relative to the api root installation directory.
For example, installing Group Control would render this into apps.json
:
{
"gc": "./apps/group-control/"
}
To add an app manually, simply add another key-value pair to the apps.json
file.
api.php
This file contains important setup code to start the app boot process. As such, it shouldn't be modified.