MadeWithPrompts
All posts

I Built This Blog in a Day Using AI. Here's What Actually Happened.

I went down a Claude Code rabbit hole at midnight, bought a domain, and built a blog the next day. Here's the honest account including everything that went wrong.

A person sits at a desk late at night, lit by the glow of a laptop screen, focused and building something for the first time

I went down a rabbit hole researching Claude Code late last night. By the time I closed my laptop I'd decided I was going to build a blog. Not just any blog, one specifically about building things with AI. I bought the domain madewithprompts.co.uk at gone midnight, created GitHub and Vercel accounts, and told myself I'd actually build it tomorrow.

Today I built it. Here's what actually happened, including all the bits that went wrong.

The Setup (More Painful Than Expected)

First thing this morning I installed Node.js and Git, then installed Claude Code. Simple enough in theory. Except the first thing I hit was a PowerShell script execution error, Windows blocking the script from running. Quick fix once you know what it is, but if you've never seen that error before it's a bit alarming.

Then Git Bash threw an error. Turned out Git wasn't properly installed. Fixed that, restarted, and we were finally moving.

Building the Site

Once Claude Code was running, I described what I wanted. A dark-mode blog with Next.js, Tailwind CSS, and Sanity CMS for managing content. The stack came out as:

  • Next.js 15 (App Router)
  • Tailwind CSS v3
  • Sanity CMS v3 for blog posts and projects
  • TypeScript throughout
  • Deployed on Vercel, domain connected via madewithprompts.co.uk

Claude Code generated the full project structure, pages, components, Sanity schemas, everything. Within a couple of hours I had it running on localhost. That part was genuinely impressive.

Going Live (Also More Painful Than Expected)

Getting it onto Vercel was straightforward enough, connect GitHub repo and deploy. The problem came after. I logged into Sanity Studio, wrote a test blog post, published it, refreshed the site. Nothing. Just "No posts yet, check back soon."

Turned out two issues were stacked on top of each other.

First issue: the Sanity environment variables only existed in my local .env.local file, which never gets pushed to GitHub. Vercel didn't have them. Added them in Vercel's environment variable settings and redeployed, but the post still wasn't showing.

Second issue: the pages were set to cache for 3600 seconds. Even after a redeploy, Next.js was serving a stale cached version with no posts. Dropped this to 60 seconds and disabled the Sanity CDN cache in the client config. After pushing that fix, the post appeared.

The Problem That Kept Happening

Every time I published new content in Sanity it wouldn't show on the live site until I manually triggered a redeploy in Vercel. That's not a workflow. Nobody wants to push to GitHub every time they write a post.

The fix was setting up a Sanity webhook. Now whenever I publish something in Sanity Studio, it sends a request to a small API route in the Next.js app, which tells Vercel to immediately refresh the affected pages. Publish in Sanity, live on the site within seconds. That's the setup you're looking at right now.

What I'd Do Differently

  • Set the Vercel environment variables before the first deployment, not after wondering why nothing works
  • Start with a lower revalidation time, 3600 seconds is way too long during initial setup when you're constantly publishing test content
  • Set up the webhook on day one, not after manually redeploying five times

What's Next

The site is live, content is flowing, and the webhook means I'm not babysitting deployments. Next up I want to build an AI agent that can publish posts directly to Sanity. The idea being I describe a topic and it drafts and publishes without me touching the CMS at all. That'll be the next post.

Follow along at madewithprompts.co.uk