You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .claude/rules/architecture.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,14 +52,14 @@ Each feature follows feature slice architecture patterns with four layers:
52
52
53
53
-**components/** - UI components, presentational and decoupled from business logic (application) and router state. Data access is only through `providers/`.
54
54
-**application/** - Business logic, portable state management (stores, FSMs, form validation), custom hooks. Should not depend on router state or external APIs directly (only through `providers/`).
55
-
-**providers/** - Data fetching, external APIs, platform/SDK interactions, commands/mutations, and API type definitions (DTOs). Library-specific code (React Query, SWR, etc.) must not leak beyond this layer.
55
+
-**providers/** - Hook composition and data access gateway for the feature slice. Exposes query hooks, mutations, loaders, and DTOs sourced from `src/lib/api/`. Library-specific code (React Query, etc.) must not leak beyond this layer.
56
56
-**models/** - Domain type definitions, utilities, and type mapping functions.
57
57
58
58
**Dependency rule:**`components/` and `application/` import from `models/` and `providers/`. `providers/` and `models/` have no internal feature dependencies.
59
59
60
60
## API Layer
61
61
62
-
`src/lib/api/` is the global home for all HTTP logic: query/mutation hooks, loaders, query keys, and DTOs, organised by resource. Feature `providers/` do not implement API logic — they re-export selectively from `src/lib/api/` to decouple feature internals from the global API structure. New API logic always goes in `src/lib/api/` first, then gets exposed through the relevant feature's `providers/`.
62
+
`src/lib/api/` is the global home for all HTTP logic: `queryOptions` factories, loaders, mutation hooks, query keys, and DTOs, organised by resource. Query files expose `queryOptions` factories (no `useQuery` hooks — hook composition belongs in `providers/`). Feature `providers/` compose hooks on top of those factories and re-export them for feature slice. New API logic always goes in `src/lib/api/` first, then gets exposed through the relevant feature's `providers/`.
Copy file name to clipboardExpand all lines: .github/instructions/architecture.instructions.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,14 +49,14 @@ Each feature follows feature slice architecture patterns with four layers:
49
49
50
50
-**components/** - UI components, presentational and decoupled from business logic (application) and router state. Data access is only through `providers/`.
51
51
-**application/** - Business logic, portable state management (stores, FSMs, form validation), custom hooks. Should not depend on router state or external APIs directly (only through `providers/`).
52
-
-**providers/** - Data fetching, external APIs, platform/SDK interactions, commands/mutations, and API type definitions (DTOs). Library-specific code (React Query, SWR, etc.) must not leak beyond this layer.
52
+
-**providers/** - Hook composition and data access gateway for the feature slice. Exposes query hooks, mutations, loaders, and DTOs sourced from `src/lib/api/`. Library-specific code (React Query, etc.) must not leak beyond this layer.
53
53
-**models/** - Domain type definitions, utilities, and type mapping functions.
54
54
55
55
**Dependency rule:**`components/` and `application/` import from `models/` and `providers/`. `providers/` and `models/` have no internal feature dependencies.
56
56
57
-
## API Layer
57
+
###API Layer
58
58
59
-
`src/lib/api/` is the global home for all HTTP logic: query/mutation hooks, loaders, query keys, and DTOs, organised by resource. Feature `providers/` do not implement API logic — they re-export selectively from `src/lib/api/` to decouple feature internals from the global API structure. New API logic always goes in `src/lib/api/` first, then gets exposed through the relevant feature's `providers/`.
59
+
`src/lib/api/` is the global home for all HTTP logic: `queryOptions` factories, loaders, mutation hooks, query keys, and DTOs, organised by resource. Query files expose `queryOptions` factories (no `useQuery` hooks — hook composition belongs in `providers/`). Feature `providers/` compose hooks on top of those factories and re-export them for feature slice. New API logic always goes in `src/lib/api/` first, then gets exposed through the relevant feature's `providers/`.
0 commit comments