Skip to content
← Writing

How this site is built

Next.js 16, Cache Components, Better Auth, Stripe, and MDX, wired up on Vercel.

·1 min read#engineering#nextjs

A quick tour of the stack behind peery.me, for the curious.

The stack

LayerChoice
FrameworkNext.js 16 (App Router, Cache Components)
UIReact 19, Tailwind CSS 4, Motion
ContentMDX files in the repo
AuthBetter Auth + Drizzle on Neon Postgres
PaymentsStripe Checkout + webhooks
EmailResend
FilesVercel Blob

Content is just files

Posts are .mdx files with typed frontmatter. A cached loader reads them at build time:

src/lib/content.ts
export async function getPosts(): Promise<Post[]> {
  "use cache"
  cacheLife("max")
  return load("blog")
}

Because the loader is cached, every post is prerendered into the static shell and served from the edge. Publishing is a git push.

Payments without the success-page trap

Fulfilment happens in the Stripe webhook, never on the success page. Customers don't always make it back to your site, but webhooks always arrive (and retry).

That's the gist. Questions? Get in touch.