mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-08 11:37:25 +00:00
1.2 KiB
1.2 KiB
Claude guidance for this project
Project conventions
- Domain language lives in
CONTEXT.md. Read it before naming or discussing BulkUpload, Portfolio, Property, etc. concepts. - Architectural decisions live in
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
useEffectanduseMemo. 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 rawfetch, for client-side HTTP. Reads useuseQuery; writes useuseMutation. This project is on v4 — note thatrefetchInterval's callback signature is(data, query), not v5's(query).
Next.js 15 route handlers
paramsis aPromise— type as{ params: Promise<{ ... }> }andawait paramsbefore destructuring.- Error responses use
{ error: string }consistently. Don't drift to{ msg }or other shapes.