Structure
This page is about the folders a website with Kiwa has.
Table of contents
Basic folders
- The
assetsfolder contains a few subfolders that may befiles,fonts,images,javascript,stylesheetsand so on. This is mostly the raw data likesassorscssfiles, JavaScript modules, and so on. - Inside the
configfolder is all configuration data stored. Kiwa uses aconfig.phpfile, this may also be aymlfile. htmlis the place for all page content. Kiwa usesphtmlfiles containing PHP and HTML code.- If you use translations, there is a folder called
languageto store all translation data. Every language has its own file, for exampleen.phporen-gb.php. - The
publicfolder is where your domain points to. So this folder is accessible from the outside, every other is not. Thepublicfolder must contain aindex.phpand should also have a.htaccessfile. All public assets like JavaScript and stylesheets should also be here. There are mostly in abuildfolder. - In the
srcfolder you may place custom code, for example, your own PHP classes. They will be autoloaded automatically as long as the use the namespaceApp. - The
testsfolder has mostly the same structure as thesrcfolder and contains tests. PHPUnit is a root dependency of Kiwa and is ready to test the behaviour of all PHP code. - Kiwa caches and log data, that's what the
varfolder is made for. It contains acachefolder for all pure HTML files and alogfolder 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
vendorfolder 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 bitbucket.org/wirbelwild/kiwa-console.