Strict semantic conventions designed to eliminate ambiguity and technical debt through static analysis.
Benefits: Naming consistency simplifies navigation, and automated linter checks prevent architectural debt accumulation.
Universally using kebab-case. Exceptions: hooks (use prefix), utility files (entity.type.ts format), and standard Next.js files.
1// kebab-case и семантические расширения
2src/entities/tour/schema/finance-info.schema.ts
3src/entities/tour/api/tour.service.ts
4src/entities/tour/converters/tour.converters.ts
5src/entities/tour/handlers/tour.handlers.ts
6src/entities/tour/mock/tour-finance.mock.ts
7src/entities/tour/constants/tour-status.config.tsInterfaces with I prefix, types with T prefix, enums with ENUM_ prefix. Components use PascalCase.
1// Префиксы для типов и интерфейсов
2interface IEntity { ... }
3type TResponse = { ... }
4const ENUM_STATUS = { ... } as const;Classic layer hierarchy: shared is the lowest, app is the highest. Upward imports or imports between elements of the same layer are strictly prohibited.
1// FSD Import Boundaries (Classic)
2app -> [pages, widgets, features, entities, shared]
3pages -> [widgets, features, entities, shared]
4widgets -> [features, entities, shared]
5features -> [entities, shared]
6entities -> [shared]
7shared -> []Specific exceptions for external libraries (shadcn-ui), type declarations (.d.ts), and system configurations where strict naming might interfere with operation.
1// Проектные послабления (Relaxations)
2// 1. Shared UI (shadcn-ui/custom): любые имена, разрешен any
3src/shared/ui/shadcn-ui/Button.tsx
4
5// 2. Декларации (.d.ts): именование не контролируется
6src/shared/types/api.d.ts
7
8// 3. Конфиги (*.config.ts): разрешены require и console
9tailwind.config.ts