Skip to content
agenoverse
Tutorials

How this site works: Next.js, Sanity and no database

A look under the hood: static pages, a headless CMS as the only database, and webhooks that refresh pages the moment content changes.

Agenoverse Team

1 min read

Agenoverse is a content site, so we built it like one. There are no accounts and no database to run. Sanity holds the content; Next.js turns it into fast pages.

The moving parts#

  1. Sanity Studio: where we write posts, guides and projects.
  2. Next.js: fetches content on the server and renders static pages.
  3. A webhook: tells the site to refresh a page when its content changes.

Fetching content#

Pages are Server Components that ask Sanity for exactly what they need, tagged so they can be refreshed individually.

app/blog/page.tsx
const rows = await sanityFetch({  query: blogListQuery,  tags: ['blog'], // refreshed when a blog post changes})

Why tags matter#

Each fetch carries a cache tag. When an editor publishes a post, Sanity calls our webhook, the webhook revalidates the blog tag, and the next visitor gets fresh HTML. No rebuild, no waiting.

Note

The result: pages are served from the CDN like a static site, but editors see changes within seconds.

What we would do again#

Keep the CMS as the single source of truth, and keep the website a rendering layer. It makes the site cheap to run and easy to change.

Written by

Agenoverse Team

Sample author

A placeholder profile created to preview the blog. Replace it with a real team member, or delete it, in Sanity.