📖 docs (readme): update component directory structure and descriptions

This commit is contained in:
Abizrh
2025-09-07 22:59:57 +07:00
parent 263f9dbc7f
commit ea2076d097
+10 -6
View File
@@ -20,16 +20,20 @@ RSSA - Front End
- `app.vue`: Main layout
- `components` : Contains all reusable UI components.
- `components/flow` : Entry point for business logic and workflows. Pages or routes call these flow components to handle API requests and process application logic
- `components/app` : View-layer components that manage and present data. These are used within `flow/` to render or handle specific parts of the UI, and return results back to the flow
- `components/content` : Entry point for business logic and workflows. Pages or routes call these content components to handle API requests and process application logic
- `components/app` : View-layer components that manage and present data. These are used within `content/` to render or handle specific parts of the UI, and return results back to the content
- `components/pub` : Public/shared components used across different parts of the app.
- `composables` : Contains reusable logic and utility functions (e.g. composables, hooks)..
- `layouts` : Reusable UI layout patterns used across pages.
- `models` : Contains data definitions or interfaces.
- `schemas` : Contains JSON schemas used for validation.
- `services` : Contains reusable API calls and business logic.
## Directory Structure for `app/pages`
- `pages/auth` : Authentication related pages.
- `pages/(features)` : Grouped feature modules that reflect specific business flow or domains.
- `pages/(features)` : Grouped feature modules that reflect specific business content or domains.
## Directory Structure for `server/`
@@ -50,16 +54,16 @@ The basic development workflow follows these steps:
- Keep components pure, avoid making HTTP requests directly within them.
- They receive data via props and emit events upward.
### Business Logic in `components/flow`
### Business Logic in `components/content`
- This layer connects the UI with the logic (API calls, validations, navigation).
- It composes components from `components/app/`, `components/pub/`, and other flow.
- It composes components from `components/app/`, `components/pub/`, and other content.
- Also responsible for managing state, side effects, and interactions.
### Create Pages in `pages/`
- Define permissions and guards for each page.
- Pages load the appropriate flow from `components/flow/`.
- Pages load the appropriate content from `components/content/`.
- They do not contain UI or logic directly, just route level layout or guards.
## Code Conventions