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.
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
- Mutating data during render. Rendering can run more than once, and background revalidation and prefetch will double count views.
- Calling cookies() in a static page. A single call can force the whole route to become dynamic.
- Shipping a markdown parser to the client. Parse on the server and send HTML.
- Passing full objects into client components. Every field is serialized into the RSC payload.
- Trusting the middleware alone. Admin routes also need a server-side session check.
A minimal data flow
The pattern that has held up:
- The page fetches the post with a single query that includes type, category, author and tags.
- Translations are merged in one function, so locale logic lives in one place.
- SEO metadata and JSON-LD are generated from the same localized object.
- 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.
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
Gift card fraud signals that survive a manual review
Gift card fraud rarely looks like one stolen card. It looks like small behavioural deviations across velocity, devices, geography and timing.
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.
Wallet key management: five controls that actually matter
Most wallet incidents are not exotic cryptography failures. They are key lifecycle mistakes that a short checklist would have caught.