Folder organisation

In Novius OS

Root directories

  • ~/novius-os/: Novius OS core.
  • ~/local/: Your website
  • ~/public/: DOCUMENT_ROOT of the website
  • ~/logs/: logs directory

public directory

A file can either be:

  • executable or non-executable
  • provided by the developer or provided by the application

This leads to 4 possibles usage, and each of them is reflected in the ~/public/ folder:

  • ~/public/static/: equivalent to assets. Non-executable files provided by the developer or Novius OS.
  • ~/public/data/: Non-executable files generated by Novius OS.
  • ~/public/htdocs/: Executable files provided by the developer or Novius OS
  • ~/public/cache/: Executable files generated by Novius OS.

Note

Here, Novius OS refers to the core and also to any application of the website.

There’s a 5th directory ~/public/media/, used by the Media centre.

Where Novius OS can write the developer cannot, and vice-versa.

~/public/static/ and ~/public/htdocs/ have the same sub-directories structure:

  • ~/novius-os/: Novius OS files.
  • ~/apps/<application_name>/: Files from developers of applications.
These directories are symbolic links, created upon Novius OS installation or when activating applications.
These symbolic links respectively points to htdocs and static directories of Novius OS or the application.

core directories

  • ~/novius-os/framework/: Novius OS framework
  • ~/novius-os/fuel-core/: FuelPHP framework
  • ~/novius-os/packages/: FuelPHP packages

local directory

  • ~/local/applications/: Novius OS applications.
  • ~/local/cache/: Contains resized medias.
  • ~/local/classes/: Your PHP classes.
  • ~/local/config/: Your Novius OS configuration files.
  • ~/local/data/: Files generated by Novius OS.
  • ~/local/metadata/: metadata files for your website, generated by Novius OS.
  • ~/local/migrations/: migration classes.
  • ~/local/views/: Your Views files.

Note

classes and views directories should not contain a lot of files, since most of your developments should go in applications.

Within an application

MVC applies to core, and also to applications

Files organisation

There are 6 main directories:

classes
It’s where your logic belongs, .i.e. classes which defines and manipulares data. At least there are controllers and models of the application. We can also find tools used by the views or the controllers.
config
This directory gather all the informations to repesent your models. Controllers perform logical operations on your data, but also needs additional data to pass on to the views in order to display them. These informations are separated from controllers (which don’t have logical value) and from the views. The latter receives data as parameters and never fetch them on their own.
The configuration file for the controller/admin/monkey.ctrl.php controller will be located at config/controller/admin/monkey.config.php. A class and its configuration file share a similar naming convention.
lang
This directory contains translation files, with a sub-directory for each language.
migrations
This directory contains migration files.
static
This directory contains JavaScript and CSS files, and public resources (such as images).
views
This directory contains files responsible to display the data.