Hazem Azzam

HomeWriting

Blog

Long-form notes on frontend, backend, system design, and security. Build logs, post-mortems, and the occasional opinion piece.

2026-05-08reactdnd-kit

Drag-and-Drop Row Reordering in React Tables with dnd-kit

A practical guide to letting users drag rows into the order they want, using @dnd-kit alongside TanStack Table. Covers sensors, accessibility, persisting the new order, and how to make drag and column-sort coexist cleanly.

2026-05-08reacttanstack-query

Optimistic Mutations with TanStack Query: The Four Hooks You Actually Need

Optimistic UI doesn't need a clever abstraction — it needs four well-placed hooks. Here's how onMutate, onError, onSuccess, and onSettled fit together, and where most implementations quietly leak bugs.

2026-05-08htmlforms

Nested Forms Break Submit Propagation — and the Fixes That Actually Work

Nesting one <form> inside another seems harmless until a button stops submitting, two endpoints fire at once, or your validation runs against the wrong fields. Here's why HTML forbids it, what browsers actually do, and how to refactor cleanly.

2026-05-08nextjslocalization

Practical Localization in Next.js: useTranslate, Localized APIs, Mappers, and Caching

A practical architecture guide for multilingual Next.js apps using useTranslate, backend fields like description_ar/description_en, mapper-layer normalization, and cache-aware fetching so UI components stay clean.

2026-05-08nextjsserver-components

Next.js Server vs Client: What Runs Where, and What Must Stay Secure

A practical guide to Server Components, Client Components, Route Handlers, and Server Actions in Next.js. Learn what belongs on the server, what belongs in the browser, and why network requests are always visible to users.

2026-05-08business-logiccheckout-security

Order-Total Tampering at Checkout (CWE-840, CWE-602, CWE-345)

A practical analysis of checkout price manipulation where attackers tamper with order totals in client requests. Learn the business-logic root cause, exploit flow, impact, and robust server-side controls to prevent fraudulent purchases.

2026-05-08idorcwe-639

Mass Account Takeover via Order-ID Enumeration (CWE-639, CWE-284, CWE-863)

A deep dive into a critical authorization flaw where predictable order IDs allow attackers to enumerate accounts and trigger mass account takeover. This post explains root cause, impact, reproduction logic, and concrete backend defenses.

2026-05-08clean-architecturedependency-injection

Clean Architecture in Real Projects: A Practical Guide

A practical walkthrough of Clean Architecture and dependency injection in real codebases. Learn how to keep business rules independent of frameworks, wire ports and adapters cleanly, and evolve a codebase without rewrites.