A New File Structure

A Strata project is composed of the a directory structure similar to those you may have already seen in other frameworks.

  • bin/
  • config/
    • environment/
  • db/
  • doc/
  • log/
  • src/
    • controller/
    • model/
      • entity/
    • shell/
      • command/
    • view/
      • helper/
  • test/
  • tmp/
  • vendor/
  • web/
    • app/
      • mu-plugins/
      • plugins/
      • themes/
      • uploads/
    • wp/

Rundown

Bin

The binary directory must hold custom maintenance scripts (not to be confused with application Shell script). It may also contain archives that cannot be pulled as a dependency by Composer.

Config

Contains all configuration files used by the application. Each environment can further customize based on the way the project is executed.

Db

Contains database migrations and SQL exports that may be used by the application.

Doc

Contains the project’s documentation. Using the automated documentation tool bundled in Strata will output in this directory.

Log

Log files must be written in this directory when they are generated by the application.

Src

The sources directory will contain all the object oriented Model View Controller files required by the application. By default files in the src directory are in the App namespace.

Test

The test directory is were unit tests and mock objects must be found. By default files in the test directory are in the Test namespace.

Vendor

Must exclusively be used by Composer. Contains the dependencies required by the application.

Web

The only intended web-facing directory. Custom changes in the project scope will be found under app while wp should never be modified as it will be erased by updating Wordpress.