
Implementing Authentication in Next.js Using NextAuth.js
A practical guide to implementing authentication in Next.js with NextAuth.js, including sessions, callbacks, route protection, and router‑specific trade‑offs.
Articles
Next.js is an open‑source React framework created by Vercel. It is used to build fast, scalable websites and web applications, combining React with routing, data fetching, API routes, automatic code splitting, TypeScript support, server‑side rendering (SSR), and static site generation (SSG).
Below you will find a subset of articles from my blog specifically about Next.js as well as Next.js platform consulting. This is an area I have worked with for many years, and it has been a regular subject in my writing. There are fifty‑two articles collected together for you below.

A practical guide to implementing authentication in Next.js with NextAuth.js, including sessions, callbacks, route protection, and router‑specific trade‑offs.

Websites have not been set‑and‑forget for a long time now, and without the technical know‑how to update a static site, CMSes are a key part of web development.
Fix window is not defined in Gatsby or Next.js by understanding SSR, guarding browser globals, lifecycle timing, dynamic imports, and third‑party modules.

How Incremental Static Regeneration affects CMS publishing freshness, including rebuild timing, stale pages, previews, and editorial expectations.

Preview Mode in Next.js explained with a headless CMS, draft content workflows, preview cookies, and how editors can see unpublished pages safely.

p Tags from Contentful List ItemsOne of the quirks of rendering Rich Text from Contentful is that list items come wrapped in paragraph <p> tags. Fortunately, this is a simple one to resolve.

next/image`next/image` explained with responsive sizing, lazy loading, layout shift reduction, and why image optimisation matters in real Next.js applications.

Dynamic imports and code splitting in Next.js explained with `next/dynamic`, lazy‑loaded components, SSR trade‑offs, and when splitting really helps.

getStaticPaths in Next.js`GetStaticPaths` in Next.js explained with dynamic routes, pre‑rendered paths, fallback behaviour, and how static generation works for slug‑based pages.

getStaticProps with CMS DataUse getStaticProps with CMS data without hiding freshness, build‑time, preview and validation risks in Pages Router content workflows.

getStaticProps vs. getServerSideProps in Next.js`GetStaticProps` vs. `getServerSideProps` in Next.js explained with build‑time and request‑time data fetching, trade‑offs, and practical page examples.

Compare static generation and server‑side rendering in Next.js through freshness, request‑time data, performance, SEO, operational cost, and page intent.

Dynamic routes in Next.js explained with `[slug]` pages, route params, nested segments, and why file‑based dynamic routing simplifies content‑driven sites.

_app and Custom _document in Next.jsCustom `_app` and `_document` in Next.js explained clearly, including shared layout, global setup, server‑rendered HTML, and what each file is actually for.

next/link for Client‑Side Navigation
File‑system routing in Next.js explained clearly, including the `pages` directory, nested routes, index files, and why routing feels simpler than custom setups.