Application Structure
The Root Directory
The default application structure of a hub is intended to provide a clean separation of a hub's content, configuration, extensions, and everything else that makes a hub unique from the core framework.
/hubzero .. /administrator .. /api .. /app .. /core .. muse .. index.php .. htaccess.txt .. robots.txt
Admin & API
The administrator
and api
directories are carry-overs from prior versions of the hub framework and marked for deprecation in a future version fo the framework. Do not place any files or folders within these two directories.
administrator
- The Administrator application, also known as the Back-end, Admin Panel or Control Panel, is the interface where administrators and other site officials with appropriate privileges can manipulate the appearance, enable/disable installed extensions, or manage users and content.
api
- Every hub comes with an API for accessing data from the various components and extensions in a light-weight, speedy manner. This directory contains the entry point to the API and can be accessed by visiting http://{yourhub}.org/api
The App Directory
The brain, or uniqueness, of a hub lives in the app
directory. All (non-core) extensions installed, templates, cache files, uploaded content, and configurations will reside in this directory.
When developing extensions for a hub, the constant PATH_APP
should be used for any paths relating to directories or files within the app
directory. This is shorter and allows for the potential renaming of the directory while keeping the hub functioning smoothly.
The app
directory contains a number of sub-directories used by the hub for managing extensions and files. Most of these directories will initially be empty.
bootstrap
- The bootstrap folder contains a few files that bootstrap the framework and configure available services.
cache
- The
cache
directory is used for storing generated content. Nothing within is vital but, rather, is used for dramatically improving site performance. The directory is further sub-divided by application type:admin
,site
,api
,cli
. components
- The
components
directory is where 3rd-party and custom made components will reside. config
- The
config
directory, as the name implies, contains all of the hub's configuration files. logs
modules
plugins
templates
tmp
The Core Directory
If the app
directory is the brain, the core
directory is the skeleton, muscles, and heart of a hub, containing the framework and numerous pre-installed extensions.
As with the app directory, a global constant of PATH_CORE
representing the file path is available.