Strict isolation of logic and UI through layers to ensure predictable development and zero side effects.
Maximum of 3 files in the root of the model. Mandatory index.ts and types.ts for all segments.
^[a-z0-9-]+\.(config|types|schema|converters|service)\.ts$
1import { useAuthStore } from "@/entities/session"; // OK: feature -> entity
2import { Button } from "@/shared/ui"; // OK: feature -> shared1import { logoutFeature } from "@/features/auth"; // ERROR: entity -> feature (LAYER VIOLATION)Transformation layer ensuring the UI receives precise, ready-to-render data structures.
1├── api/ # API services (RTK Query)
2├── types/ # Data structures
3│ ├── index.ts
4│ ├── invoice.interface.ts
5│ └── invoice.types.ts
6├── constants/ # Lists, mappings, defaults
7├── converters/ # Data transformations
8├── handlers/ # Business logic & validation
9├── mock/ # Test data
10├── ui/ # (Optional) Cards, list items
11└── index.ts # Public API1├── model/ # Widget logic & state
2│ ├── config/ # Form/column configs
3│ ├── schema/ # Validation schemas (Zod)
4│ ├── types/ # Local types
5│ └── index.ts
6├── ui/ # Internal display components
7│ ├── general-info/
8│ └── rooms/
9├── accommodation-edit.tsx # Main component
10└── index.ts # Public API