From 1da829391447c0b563724c9d39e7cc484b45946f Mon Sep 17 00:00:00 2001 From: Elia Bieri Date: Wed, 29 Mar 2023 13:00:25 +0000 Subject: [PATCH] Merged in docs/component_folder_structure (pull request #50) Add documentation for frontend folder structure * Add documentation for frondend folder structure Approved-by: Daniel Egger --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index b43ca54b..6dbaa62f 100644 --- a/README.md +++ b/README.md @@ -167,3 +167,20 @@ The following steps were taken to set it up: > 💡 The number of cypress worker jobs depends on the number of cypress tests. > Too many workers for too few tests will result in a lot of idle workers. + +## Frontend folder structure + +There are some rules when it comes to the folder structure of the frontend. + +- Every page should have its own folder in the `pages` folder. +- A page component name must have the `Page` suffix. E.g. `MyPage.vue`. +- A page is defined by being a routing target. +- The components solely being used in a page should be in the same folder as the page. + +``` +📦 client +└─ pages +   ├─ AbcPage.vue +   ├─ AbcButton.vue +   └─ AbcListTile.vue +```