From ae56bdc73fcb9f8ed22cefd1fa419a23042850ee Mon Sep 17 00:00:00 2001 From: arhimede Date: Mon, 13 May 2024 20:13:02 +0300 Subject: [PATCH] Update file-structure.md we should split this page in 2 or more pages --- docs/book/v4/introduction/file-structure.md | 29 ++++++++++++++------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/docs/book/v4/introduction/file-structure.md b/docs/book/v4/introduction/file-structure.md index 6ac3990..f0f7764 100644 --- a/docs/book/v4/introduction/file-structure.md +++ b/docs/book/v4/introduction/file-structure.md @@ -1,21 +1,30 @@ # File structure -It is a good practice to standardize the file structure of projects. This way it’s easier to keep a clean overview of multiple projects, and less time is wasted trying to find the correct class. +Dotkernel API follows the [PSR-4](https://www.php-fig.org/psr/psr-4/) standards. -When using DotKernel API the following structure is recommended: +It is a good practice to standardize the file structure of projects. -## Main directories +When using DotKernel API the following structure is installed by default: + +![Dotkernel API File Structure!](https://github.com/dotkernel/dotkernel.github.io/blob/main/img/file-structure-dk-api.png) -* `src` - should contain the source code files -* `templates` - should contain the page templates and layouts -* `data` - should contain project-related data (AVOID storing sensitive data on VCS) -* `docs` - should contain project-related documentation -These directories reside in one of the following directories: +## Main directories +* `bin` - executable files from CLI +* `config` - various configuration files +* `data` - should contain project-related data (AVOID storing sensitive data on VCS) +* `documentation` - should contain project-related documentation +* `log` - storage of log files generated by dot-error-log library +* `public` - publicly visible files. The webserver need to have this folder as www-document root folder. +* `src` - should contain the source code files +* `test` - should contain the test files -* if the Module is a composer package where the directories above are stored in the package’s root path, eg.: `/vendor/my-name/my-project-name/` -* if the Module is an extension/component for the project, eg.: `/src/MyProjectName` +## Special purpose folders +* `.github` - containes workflow files +* `.laminas-ci` - contains laminas-ci workflow files +* `docs` - Dotkernel API documentation + ## The `src` directory This directory contains all source code related to the Module. It should contain following directories, if they’re not empty: