Skip to content

Commit

Permalink
Update file-structure.md
Browse files Browse the repository at this point in the history
we should split this page in 2 or more pages
  • Loading branch information
arhimede authored May 13, 2024
1 parent 051fbd4 commit ae56bdc
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions docs/book/v4/introduction/file-structure.md
Original file line number Diff line number Diff line change
@@ -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.

Check failure on line 5 in docs/book/v4/introduction/file-structure.md

View workflow job for this annotation

GitHub Actions / ci / QA Checks (Documentation Linting [8.2, latest], ubuntu-latest, laminas/laminas-continuous-integra...

Trailing spaces [Expected: 0 or 2; Actual: 1]

Check failure on line 5 in docs/book/v4/introduction/file-structure.md

View workflow job for this annotation

GitHub Actions / ci / QA Checks (Documentation Linting [8.2, latest], ubuntu-latest, laminas/laminas-continuous-integra...

Trailing spaces [Expected: 0 or 2; Actual: 1]

## 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

Check failure on line 11 in docs/book/v4/introduction/file-structure.md

View workflow job for this annotation

GitHub Actions / ci / QA Checks (Documentation Linting [8.2, latest], ubuntu-latest, laminas/laminas-continuous-integra...

Multiple consecutive blank lines [Expected: 1; Actual: 2]

Check failure on line 11 in docs/book/v4/introduction/file-structure.md

View workflow job for this annotation

GitHub Actions / ci / QA Checks (Documentation Linting [8.2, latest], ubuntu-latest, laminas/laminas-continuous-integra...

Multiple consecutive blank lines [Expected: 1; Actual: 2]
These directories reside in one of the following directories:
## Main directories

Check failure on line 12 in docs/book/v4/introduction/file-structure.md

View workflow job for this annotation

GitHub Actions / ci / QA Checks (Documentation Linting [8.2, latest], ubuntu-latest, laminas/laminas-continuous-integra...

Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## Main directories"]

Check failure on line 12 in docs/book/v4/introduction/file-structure.md

View workflow job for this annotation

GitHub Actions / ci / QA Checks (Documentation Linting [8.2, latest], ubuntu-latest, laminas/laminas-continuous-integra...

Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## Main directories"]
* `bin` - executable files from CLI

Check failure on line 13 in docs/book/v4/introduction/file-structure.md

View workflow job for this annotation

GitHub Actions / ci / QA Checks (Documentation Linting [8.2, latest], ubuntu-latest, laminas/laminas-continuous-integra...

Lists should be surrounded by blank lines [Context: "* `bin` - executable files fro..."]

Check failure on line 13 in docs/book/v4/introduction/file-structure.md

View workflow job for this annotation

GitHub Actions / ci / QA Checks (Documentation Linting [8.2, latest], ubuntu-latest, laminas/laminas-continuous-integra...

Lists should be surrounded by blank lines [Context: "* `bin` - executable files fro..."]
* `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

Check failure on line 22 in docs/book/v4/introduction/file-structure.md

View workflow job for this annotation

GitHub Actions / ci / QA Checks (Documentation Linting [8.2, latest], ubuntu-latest, laminas/laminas-continuous-integra...

Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## Special purpose folders"]

Check failure on line 22 in docs/book/v4/introduction/file-structure.md

View workflow job for this annotation

GitHub Actions / ci / QA Checks (Documentation Linting [8.2, latest], ubuntu-latest, laminas/laminas-continuous-integra...

Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## Special purpose folders"]
* `.github` - containes workflow files

Check failure on line 23 in docs/book/v4/introduction/file-structure.md

View workflow job for this annotation

GitHub Actions / ci / QA Checks (Documentation Linting [8.2, latest], ubuntu-latest, laminas/laminas-continuous-integra...

Lists should be surrounded by blank lines [Context: "* `.github` - containes workf..."]

Check failure on line 23 in docs/book/v4/introduction/file-structure.md

View workflow job for this annotation

GitHub Actions / ci / QA Checks (Documentation Linting [8.2, latest], ubuntu-latest, laminas/laminas-continuous-integra...

Lists should be surrounded by blank lines [Context: "* `.github` - containes workf..."]
* `.laminas-ci` - contains laminas-ci workflow files
* `docs` - Dotkernel API documentation


Check failure on line 27 in docs/book/v4/introduction/file-structure.md

View workflow job for this annotation

GitHub Actions / ci / QA Checks (Documentation Linting [8.2, latest], ubuntu-latest, laminas/laminas-continuous-integra...

Multiple consecutive blank lines [Expected: 1; Actual: 2]

Check failure on line 27 in docs/book/v4/introduction/file-structure.md

View workflow job for this annotation

GitHub Actions / ci / QA Checks (Documentation Linting [8.2, latest], ubuntu-latest, laminas/laminas-continuous-integra...

Multiple consecutive blank lines [Expected: 1; Actual: 2]
## The `src` directory

This directory contains all source code related to the Module. It should contain following directories, if they’re not empty:
Expand Down

0 comments on commit ae56bdc

Please sign in to comment.