Skip to content

Commit 7932156

Browse files
committed
feat(app): add readme
1 parent ae9eeb0 commit 7932156

File tree

1 file changed

+82
-0
lines changed

1 file changed

+82
-0
lines changed

packages/app/README.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# App
2+
3+
This is an PWA application built with Vue 3 and Vite.
4+
5+
## Project setup
6+
7+
### Install dependencies
8+
```
9+
npm install
10+
```
11+
12+
### Compiles and hot-reloads for development
13+
```
14+
npm run dev
15+
```
16+
17+
## Important Notes
18+
19+
- Currently we are changing the project structure to simplify the development process and support, so the project structure is not stable yet and patterns are not migrated yet.
20+
21+
22+
## Project patterns
23+
24+
### Global components
25+
26+
**Description:** Global components lives under the `components` folder and they are automatically registered in the application using auto-import.
27+
28+
**filename convention:** The filename of the component should be in `PascalCase` and must have the prefix `Is`.
29+
30+
**Example:**
31+
32+
```
33+
components/
34+
├── IsButton.vue
35+
├── IsInput.vue
36+
└── IsSelect.vue
37+
```
38+
39+
### Global composables
40+
41+
**Description:** Global composables lives under the `composables` folder. They are automatically registered in the application using auto-import.
42+
43+
**filename convention:** The filename of the composable should be in `camelCase`
44+
45+
**Example:**
46+
47+
```
48+
composables/
49+
├── useCounter.ts
50+
├── useLocalStorage.ts
51+
```
52+
53+
### Pages
54+
55+
**Description:** Pages lives under the `pages` folder, the page should be a folder, and they are registered in the app router.
56+
57+
**filename convention:** The filename of the page should be in `PascalCase` and must have the prefix `Page`.
58+
59+
**Rules:**
60+
61+
- The page should be a folder
62+
- The page folder should have a `[PageName].vue` file inside
63+
- Page local components should be inside the page `components` folder and should have the prefix of the page name
64+
- Page local composables of the page should be inside the page `composables` folder
65+
66+
**Example:**
67+
68+
```
69+
pages/
70+
├── HomePage/
71+
│ ├── HomePage.vue
72+
| ├── composables/
73+
| | ├── useHomePage.ts
74+
| | └── useHomePage.spec.ts
75+
│ └── components/
76+
│ ├── HomePageHeader.vue
77+
│ └── HomePageFooter.vue
78+
├── AboutPage/
79+
│ ├── AboutPage.vue
80+
│ └── components/
81+
│ ├── AboutPageHeader.vue
82+
```

0 commit comments

Comments
 (0)