From db3609db8557973df5199f9b5278794d445be881 Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Wed, 6 May 2026 16:11:00 +0000 Subject: [PATCH] updated claude.md --- CLAUDE.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 588730b..5fd0594 100644 --- a/CLAUDE.md +++ b/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.