04-code-organization/00-overview.md
Code organization overview
Code organization overview
This section defines how code should be organized inside Vroq apps and features.
The goal is to keep code small, consistent, reusable, and easy to debug. These docs describe how to structure components, sections, features, reducers, actions, API clients, and UI files so that fresh chats produce disciplined code instead of drifting into hacks.
Main goals
Good code organization should make it easy to:
- understand ownership quickly
- keep presentation and orchestration separate
- reuse existing code instead of duplicating logic
- keep files small and focused
- split large features cleanly
- debug through actions, reducers, and API boundaries
Main rule
Organize code by real responsibility boundaries.
Do not split code randomly, and do not mix unrelated responsibilities inside one file when a clearer separation is available.
What this section covers
This section documents:
- how to write components
- how to write features
- how to write sections
- how to write reusable sections with scoped paths
- how to write actions
- how to write reducers
- how to write API clients
- how to organize UI files
- how to split large files safely
Read next
Read these files next:
01-components.md02-features.md03-sections.md04-reusable-sections-with-paths.md05-actions.md06-reducers.md07-api-clients.md08-ui-files.md09-splitting-large-files.md