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.md
+5-39Lines changed: 5 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
16
16
| G-4 | For changes >300 LOC or >3 files, **ask for confirmation**. | ❌ Refactor large modules without human guidance. |
17
17
| G-5 | Stay within the current task context. Inform the dev if it'd be better to start afresh. | ❌ Continue work from a prior prompt after "new task" – start a fresh session. |
18
18
| G-6 | Modify API contracts only with explicit developer approval and clear documentation. | ❌ Change API contracts (e.g., endpoints, DTOs, mapping logic) without approval. |
19
+
| G-7 | Use git commands only when explicitly requested by the developer. | ❌ Stage, commit, or push changes without explicit developer request. |
19
20
20
21
## Plan & Review
21
22
@@ -105,52 +106,17 @@ Each feature follows feature slice architecture patterns with three layers:
105
106
106
107
-**presentation/** - UI components, UI-wise hooks
107
108
-**application/** - Business logic, state management, logic-wise hooks
108
-
-**infrastructure/** - Reexports from centralized API lib, feature-specific wrappers
109
-
-**types/** - Type reexports from API lib, feature-specific types
110
-
111
-
### API Architecture
112
-
113
-
The centralized API layer (`src/lib/api/`) is organized by domain and endpoint structure:
114
-
115
-
```
116
-
src/lib/api/
117
-
├── auth/
118
-
│ ├── login/
119
-
│ │ ├── login-dto.ts # Login types
120
-
│ │ └── login-command.ts # Login functionality
121
-
│ └── users/{user-id}/
122
-
│ ├── user-dto.ts # User types
123
-
│ └── user-query.ts # User queries
124
-
├── carts/
125
-
│ ├── {cart-id}/
126
-
│ │ ├── cart-dto.ts # Cart types
127
-
│ │ ├── cart-query.ts # Cart queries
128
-
│ │ ├── cart-products-query.ts # Cart products
129
-
│ │ ├── add-to-cart-command.ts # Add to cart
130
-
│ │ ├── clear-cart-command.ts # Clear cart
131
-
│ │ └── purchase-command.ts # Purchase
132
-
│ └── cart-query-keys.ts # Cart query keys
133
-
└── products/
134
-
├── {product-id}/
135
-
│ ├── product-dto.ts # Product types
136
-
│ └── product-query.ts # Single product
137
-
├── products-list/
138
-
│ ├── products-list-dto.ts # Products list types
139
-
│ └── products-list-query.ts # Products list
140
-
└── products-query-keys.ts # Product query keys
141
-
```
109
+
-**infrastructure/** - Data fetching, external APIs, contracts, DTOs
110
+
-**types/** - Type definitions
142
111
143
112
### Key Patterns
144
113
145
114
-**Co-location** - Related files (component + story + test) are grouped together
146
-
-**Centralized API** - All API logic consolidated in `src/lib/api/` with endpoint-based organization
147
-
-**Type centralization** - Types defined in API lib, reexported through features
148
-
-**Kebab-case naming** - Consistent kebab-case naming for all API files
149
-
-**No barrel exports** - Direct imports instead of index.ts files
150
115
-**MSW handlers** - API mocking is centralized in `test-lib/handlers/`
151
116
-**Fixture pattern** - Test data generation in `test-lib/fixtures/`
152
117
-**Strong typing** - Comprehensive TypeScript usage with branded types
153
-
-**Component Composition**: Features export composed components for pages to use
118
+
-**Component Composition**: Features export composed components for pages to use,
119
+
-**Centralized API** - All API logic consolidated in `src/lib/api/` with endpoint-based organization
0 commit comments