Install via CLI
$ npx @airuleshub/cli@latest add react-feature-based-architecture-rulesRule Content
šÆ RULE: FEATURE-BASED STRUCTURE IS MANDATORY
All code MUST be organized by feature. Each feature MUST be self-contained and isolated.
š FOLDER STRUCTURE (REACT)
ā” REACT RULES
- Features MUST NOT import from other features
- Components MUST NOT call APIs directly
- All server state MUST use TanStack Query
- Hooks MUST encapsulate all business logic
- Shared layer MUST remain generic (no domain logic)
- Query keys MUST be structured and typed
š« COMMON FORBIDDEN
- API calls inside components
- Cross-feature imports
- Global business logic
- useEffect for fetching
- Monolithic folders
