---
title: "Ahmed Mahmoud (@ahmed-mahmoud) | Hashnode"
description: "Ahmed Mahmoud (@ahmed-mahmoud) writes on Hashnode. Read their latest articles and follow their work."
url: "https://hashnode.com/@ahmed-mahmoud"
---

@ahmed-mahmoud

# Ahmed Mahmoud

@ahmed-mahmoud · Joined June 2026

### [Speculation Rules in Next.js: Prerendering Hard Navigations Without Breaking Analytics or CSP — Field Notes 9bfd6b](https://engahmed.hashnode.dev/speculation-rules-in-next-js-prerendering-hard-navigations-without-breaking-analytics-or-csp-field-notes-9bfd6b?utm_source=hashnode&utm_medium=feed)

Headline: The Speculation Rules API is a JSON block (<script type="speculationrules">) that tells Chromium-based browsers to prefetch or fully prerender a likely next page before the user clicks. In a

9 min read · [engahmed.hashnode.dev](https://engahmed.hashnode.dev/speculation-rules-in-next-js-prerendering-hard-navigations-without-breaking-analytics-or-csp-field-notes-9bfd6b?utm_source=hashnode&utm_medium=feed)

[1d ago](https://hashnode.com/posts/speculation-rules-in-next-js-prerendering-hard-navigations-without-breaking-analytics-or-csp-field-notes-9bfd6b/6b0d1fc5b3f38cd4a50f8c00)

### [Cache Stampedes in Node.js: Request Coalescing, Redis Locks, and Stale-While-Revalidate for Hot Keys — Field Notes 53b5c6](https://engahmed.hashnode.dev/cache-stampedes-in-node-js-request-coalescing-redis-locks-and-stale-while-revalidate-for-hot-keys-field-notes-53b5c6?utm_source=hashnode&utm_medium=feed)

Headline: A cache stampede happens when a popular cache key expires and every concurrent request misses at the same moment and recomputes the same value against the database. In Node.js I prevent it i

12 min read · [engahmed.hashnode.dev](https://engahmed.hashnode.dev/cache-stampedes-in-node-js-request-coalescing-redis-locks-and-stale-while-revalidate-for-hot-keys-field-notes-53b5c6?utm_source=hashnode&utm_medium=feed)

[1d ago](https://hashnode.com/posts/cache-stampedes-in-node-js-request-coalescing-redis-locks-and-stale-while-revalidate-for-hot-keys-field-notes-53b5c6/6b0c89dd0ce3ac5b73179f9e)

### [Typed API Contracts from NestJS to Next.js with OpenAPI: openapi-typescript, openapi-fetch, and Where the Types Lie — Field Notes 693ab1](https://engahmed.hashnode.dev/typed-api-contracts-from-nestjs-to-next-js-with-openapi-openapi-typescript-openapi-fetch-and-where-the-types-lie-field-notes-693ab1?utm_source=hashnode&utm_medium=feed)

Headline: The most reliable way I have found to keep a Next.js frontend in sync with a NestJS REST API is to treat the OpenAPI spec as the contract: the @nestjs/swagger CLI plugin generates the spec a

10 min read · [engahmed.hashnode.dev](https://engahmed.hashnode.dev/typed-api-contracts-from-nestjs-to-next-js-with-openapi-openapi-typescript-openapi-fetch-and-where-the-types-lie-field-notes-693ab1?utm_source=hashnode&utm_medium=feed)

[3d ago](https://hashnode.com/posts/typed-api-contracts-from-nestjs-to-next-js-with-openapi-openapi-typescript-openapi-fetch-and-where-the-types-lie-field-notes-693ab1/6b0a7ccc28c62bebd9ee832c)

### [The Transactional Outbox Pattern in Postgres and NestJS: Ending Dual Writes Between Your Database and Your Queue — Field Notes a99fcf](https://engahmed.hashnode.dev/the-transactional-outbox-pattern-in-postgres-and-nestjs-ending-dual-writes-between-your-database-and-your-queue-field-notes-a99fcf?utm_source=hashnode&utm_medium=feed)

Headline: Saving a row in Postgres and then publishing a message to a queue is a dual write, and it loses or invents events whenever the process dies between the two calls. The transactional outbox pa

10 min read · [engahmed.hashnode.dev](https://engahmed.hashnode.dev/the-transactional-outbox-pattern-in-postgres-and-nestjs-ending-dual-writes-between-your-database-and-your-queue-field-notes-a99fcf?utm_source=hashnode&utm_medium=feed)

[4d ago](https://hashnode.com/posts/the-transactional-outbox-pattern-in-postgres-and-nestjs-ending-dual-writes-between-your-database-and-your-queue-field-notes-a99fcf/6b092b4680deec484de5bde3)

### [JSON-LD in the Next.js App Router: Typed Schema, XSS-Safe Serialization, and What Google Still Uses — Field Notes 8a12b6](https://engahmed.hashnode.dev/json-ld-in-the-next-js-app-router-typed-schema-xss-safe-serialization-and-what-google-still-uses-field-notes-8a12b6?utm_source=hashnode&utm_medium=feed)

Headline: In the Next.js App Router, JSON-LD belongs in a plain <script type="application/ld+json"> rendered by a Server Component, serialized with JSON.stringify(data).replace(/</g, '\\\\u003c') so pag

10 min read · [engahmed.hashnode.dev](https://engahmed.hashnode.dev/json-ld-in-the-next-js-app-router-typed-schema-xss-safe-serialization-and-what-google-still-uses-field-notes-8a12b6?utm_source=hashnode&utm_medium=feed)

[5d ago](https://hashnode.com/posts/json-ld-in-the-next-js-app-router-typed-schema-xss-safe-serialization-and-what-google-still-uses-field-notes-8a12b6/6b0813f177fb86decf608a79)
