Senior Frontend-Focused Full-Stack Engineer | React, TypeScript, Node.js
Senior frontend-focused full-stack engineer with 11+ years in software engineering. I build with React, TypeScript and Node.js, and write about frontend architecture, system design, AI engineering and lessons from building real products.
Markdown supported · ⌘↵ to post
mohammad garmabi
Really like the "ownership first, tool second" framing, especially treating the AI suggestion → draft → saved message as three different authorities.
On the session/cache gap in section 9: one pattern that's worked for me is to put the user id into the root of every query key (
['user', userId, 'tickets', params]) and callqueryClient.clear()pluscancelQueries()inside logout before clearing Context. Then even an in-flight request from the previous session can only write into a key nobody reads anymore.The axios layer is the other place where these boundaries leak. Right now a 401 means logout, but once you add refresh tokens, the refresh flow, the retry and the query cache all have to agree on which session a request belongs to. I ended up building a small fetch adapter for TanStack Query (tanstack-fetch) mostly to keep that logic in one place instead of split between interceptors and queryFns.