Crater PHP Framework

fast, lightweight and modular

Framework Directory Structure

<project folder>/
    App/
        Config/
            global.php
            local.php
        Controllers/
        Data/
            Migrations/
            errorlog.html
        Language/
        Models/
            Row/
            Table/
        Templates/
        Views/
            error/
        Bootstrap.php
        cli
    Core/
    public/
        static/
            images/
            css/
            js/
        .htaccess
        index.php
    scripts/

The following describes the use cases for each directory as listed.

  • Config/: The application-wide configuration directory.
  • Controllers/, Models/ and Views/: These directories serve as the default controller, model or view directories.
  • Data/: This directory provides a place to store application data that (possibly temporary). Examples of things in this directory are session files, cache files, sqlite databases, logs and indexes. Also here is Migrations\ folder that contains information about the database schema.
  • errorlog.html: Log file
  • Language/: This directory contains language folders/files
  • Templates/: This directory contains all application layouts. The location of this directory reflects that layouts are not on a 1-to-1 relationship with controllers and are independent of templates within Views/.
  • Core/: Core directory that contains all framework libraries. Not to you :)
  • Bootstrap.php: This file is the entry point for your application. Here, you will declare the application routes.
  • cli: Crater CLI (Command Line Interface). It provides a number of helpful commands for your use while developing your application.