Tina4 Directory Structure

As you know by now Tina4 is not a Framework. There are some general conventions we used to make things more consistent. You can use all parts of Tina4 or only some parts.

What makes Tina4 different from Frameworks you may have used is how compact its code base is. Tina also has quick ways of doing things like generating ORM Objects from your database.

Each folder in a new Tina4 project has a README file that explains what part of Tina4 class you should extend. i.e. \Tina4\Process

Tina4 Directory Structure

  • bin – this folder will be automatically installed when you run the composer require command.
  • cache – delete this folder if you want to clear things, in debug mode no caching happens.
  • migrations – migrations are stored here.
  • log – all error and debug log files will be stored in here.
  • secrets – this folder will be installed when you run the composer exec or initialize command.
  • src (Source files)
    • app – app code gets served by routes.
    • orm – ORM Objects – Tina Can generate these initial files from your database
    • public – css / js / images and more - all the public stuff
    • routes – You can setup folders to structure your project as suggested below
      • api – api routes
    • scss – SASS compiled into public/css/default.css file
    • services – Scripts which need to run on a schedule
  • vendor – all the magic of Tina4 will be installed here when you install Tina4
  • .env – generated automatically on first run
  • .htaccess – this folder will be automatically installed when you run the composer require command.
  • composer.json – this folder will be automatically installed when you run the composer require command.
  • composer.lock – this folder will be automatically installed when you run the composer require command.
  • favicon – this folder will be automatically installed when you run the composer require command.
  • index.php – tina4 entry point – this folder will be automatically installed when you run the composer require command.

Powered by ComboStrap