Structure
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 befiles
,fonts
,images
,javascript
,stylesheets
and so on. This is mostly the raw data likesass
orscss
files, JavaScript modules, and so on. - Inside the
config
folder is all configuration data stored. Kiwa uses aconfig.php
file, this may also be ayml
file. html
is the place for all page content. Kiwa usesphtml
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 exampleen.php
oren-gb.php
. - The
public
folder is where your domain points to. So this folder is accessible from the outside, every other is not. Thepublic
folder must contain aindex.php
and should also have a.htaccess
file. All public assets like JavaScript and stylesheets should also be here. There are mostly in abuild
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 namespaceApp
. - The
tests
folder has mostly the same structure as thesrc
folder 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
var
folder is made for. It contains acache
folder for all pure HTML files and alog
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 bitbucket.org/wirbelwild/kiwa-console.