This page is about the folders a website with Kiwa has.

Table of contents

Basic folders

  • The assets folder contains a few subfolders that may be files, fonts, images, javascript, stylesheets and so on. This is mostly the raw data like sass or scss files, javascript modules, and so on.
  • Inside the config folder is all configuration data stored. Kiwa uses a config.php file, this may also be a yml file.
  • html is the place for all page content. Kiwa uses phtml files containing PHP and HTML code.
  • If you use translations, there is a folder called language to store all translation data. Every language has its own file, for example en.php or en-gb.php.
  • The public folder is where your domain points to. So this folder is accessible from the outside, every other is not. The public folder must contain a index.php and should also have a .htaccess file. All public assets like javascripts and stylesheets should also be here. There are mostly in a build folder.
  • In the src folder you may place custom code, for example, your own PHP classes. They will be autoloaded automatically as long as the use the namespace App.
  • The tests folder has mostly the same structure as the src folder and contains tests. PHPUnit is a root dependency of Kiwa and is ready to test the behavior of all PHP code.
  • Kiwa caches and log data, that's what the var folder is made for. It contains a cache folder for all pure HTML files and a log folder where debugging and error reporting goes into.

Dependencies and their managers

  • If you want to use Node for your JS and CSS dependencies, there will be a folder node_modules. It comes from NPM or Yarn.
  • The vendor folder comes from Composer and contains all PHP dependencies. It must not be edited or changed.

Optional folders

The bin folder

If you make use of the Kiwa Console module, you will have a bin folder containing the console file.

The Console is very useful to create pages, start a local server, or validate your config.

You can find more information under