Skip to content
InsightLogEditorial Notes
Menu

Designing a blog with server components in the Next.js App Router

Splitting data flow around server components simplifies caching for a blog. Here is the structure and the pitfalls.

Daniel OkaforUpdated November 20, 20262 min read683 views
Share on X
100% positive

Key summary · TL;DR

Blogs are read far more than they are written. Render lists and article pages on the server with ISR, and isolate only the stateful pieces such as votes and view counts into client components.

Key facts

  • An ISR window of about 30 seconds is enough for most article pages.
  • Side effects such as view counting belong in an API route, not in render.
  • Admin areas should enforce both middleware and a server-side session check.

Start with the structure

The central decision in the App Router is how much to keep on the server. A blog is read far more than it is written, so most routes should render on the server and ship as little client JavaScript as possible.

  • Lists, article pages and taxonomy pages: server components plus ISR
  • Votes, view counts and reading progress: small client components
  • Admin forms: server actions

Draw the boundary around interaction, not around files. If a component does not need local state or a browser event, it does not need to be a client component.

Caching strategy

One revalidation line on an article page is usually enough:

  • article pages: 30 to 60 seconds
  • listings: one minute
  • taxonomy counts: a few minutes
  • feed, llms.txt and sitemap: longer windows

Caching is not only a performance tool. It also protects the database from crawler spikes after a post is shared.

Common mistakes

  1. Mutating data during render. Rendering can run more than once, and background revalidation and prefetch will double count views.
  2. Calling cookies() in a static page. A single call can force the whole route to become dynamic.
  3. Shipping a markdown parser to the client. Parse on the server and send HTML.
  4. Passing full objects into client components. Every field is serialized into the RSC payload.
  5. Trusting the middleware alone. Admin routes also need a server-side session check.

A minimal data flow

The pattern that has held up:

  1. The page fetches the post with a single query that includes type, category, author and tags.
  2. Translations are merged in one function, so locale logic lives in one place.
  3. SEO metadata and JSON-LD are generated from the same localized object.
  4. Client components receive only an id, a slug and a formatted count.

Fewer shapes of data mean fewer bugs, and a smaller client surface means a faster page.

Summary

For read-heavy services, server rendering plus minimal client state is still the simplest and fastest architecture. The App Router makes that easy; it does not make it automatic.

Frequently asked questions

Should view counts be incremented inside a server component?

No. Rendering can run multiple times and prefetching happens too. Increment views from a client call or a route handler.

Was this article helpful?

Your rating tells other readers how reliable this article is.

100% positive

Daniel Okafor
Daniel Okafor

Senior data editor · InsightLog

Builds data pipelines and measurement systems, and writes about the context behind every number.

Markdown source: /en/posts/nextjs-app-router-blog-architecture/raw

Cite this article: https://insightlog.site/en/posts/nextjs-app-router-blog-architecture

Continue reading

Read next

GuideWeb Development

The real cost of hydration in a server-first blog

Server components remove JavaScript from the bundle, but the client boundary still ships state. Measure the boundary before optimizing the framework.

1 min read404 views29 upvotes