Install via CLI
$ npx @airuleshub/cli@latest add nextjs-feature-based-architecture-rulesRule Content
šÆ RULE: ROUTING + FEATURES MUST BE SEPARATED
app/ā routing onlyfeatures/ā business logic
š FOLDER STRUCTURE (NEXT.JS)
ā” NEXT.JS RULES
app/MUST NOT contain business logic- All logic MUST live inside
features/ - Server components MUST NOT include client-side logic unnecessarily
- TanStack Query MUST be used for client-side server state
- API routes MUST remain thin (no heavy logic)
- Middleware MUST handle authentication and routing guards
š« COMMON FORBIDDEN
- API calls inside components
- Cross-feature imports
- Global business logic
- useEffect for fetching
- Monolithic folders
