mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-08 11:37:25 +00:00
updated claude.md
This commit is contained in:
parent
2c8336a6d6
commit
db3609db85
1 changed files with 8 additions and 3 deletions
11
CLAUDE.md
11
CLAUDE.md
|
|
@ -1,11 +1,16 @@
|
|||
# Claude guidance for this project
|
||||
|
||||
## Project conventions
|
||||
|
||||
- **Domain language lives in [`CONTEXT.md`](./CONTEXT.md).** Read it before naming or discussing BulkUpload, Portfolio, Property, etc. concepts.
|
||||
- **Architectural decisions live in [`docs/adr/`](./docs/adr/).** Read existing ADRs before proposing changes that touch state machines or core flows. Write a new ADR for any decision that's hard to reverse, surprising without context, and the result of a real trade-off.
|
||||
|
||||
## React
|
||||
|
||||
- **Avoid `useEffect` and `useMemo`.** Derive values inline, use Server Components + Route Handlers, event handlers. If a hook is genuinely the only option, flag it and ask before using it.
|
||||
|
||||
- Instead of raw fetch use useQuery to allow handling of mutations
|
||||
- **Avoid `useEffect` and `useMemo`.** Derive values inline, prefer Server Components + Route Handlers, prefer event handlers. If a hook is genuinely the only option, flag it and ask before using it.
|
||||
- **Use TanStack Query (`@tanstack/react-query`), not raw `fetch`, for client-side HTTP.** Reads use `useQuery`; writes use `useMutation`. This project is on **v4** — note that `refetchInterval`'s callback signature is `(data, query)`, not v5's `(query)`.
|
||||
|
||||
## Next.js 15 route handlers
|
||||
|
||||
- `params` is a `Promise` — type as `{ params: Promise<{ ... }> }` and `await params` before destructuring.
|
||||
- Error responses use `{ error: string }` consistently. Don't drift to `{ msg }` or other shapes.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue