Programming & AI · · 17 min read
Updated

I didn't write this website


The homepage figure in its five scenes: waving in a cape, running, cycling on a race bike, typing at a desk, and reading a book.

Fifteen days from my first question to today, 132 commits, about 1,670 requests to Claude, and roughly $142 if I’d paid API prices. I didn’t write any of the code.

This site is a mostly staticA site made of ready-made files. Nothing runs on a server when you visit; the files are just sent to you. blog with an animated homepage, and Claude Code (Anthropic’s coding agent, which works in the terminal) wrote all of it. My part was deciding what it should be, and saying yes, no, or “the motion is not smooth”. Claude Code also drafted this post; I chose what went in.

Why I built it is on the About page.

first chat to today
15 days
commits
132
packages added
6
homepage size
105 KB
Lighthouse scores
99–100
requests to Claude
~1,670
input tokens (read)
~402M
output tokens (written)
~1.1M
at API prices
~$142
at API prices, no cache
~$1,660

Numbers are for the whole site so far (21 October), not just this post. Dotted words have a definition: tap or click them. Code and longer explanations are folded away; open what interests you.

The anatomy of this website

A website is a few layers, and most of them are invisible. Hover over a part, or tap it on a phone, to see what it does, what I picked and why.

What you see

Behind it

Address

The name you type to reach a site. It points your browser to the servers that hold it.

Picked
shrey.cloud, bought through Vercel. Until then it was a free my-website-phi-topaz.vercel.app address.
Why
Short, and .cloud leaves room for other projects on subdomains later (like lab.shrey.cloud). Buying it through Vercel meant no DNS settings to touch.
Alternatives
Cloudflare or Namecheap. shreyans.page cost half as much per year; shrey.gg was $130 a year.

Look and feel

CSS: the rules for colours, fonts, spacing and layout.

Picked
Plain CSS. Dark background, one green accent for everything you can click, and the JetBrains Mono font.
Why
Nothing extra to learn or download. The font file is served from this site, so visiting doesn’t ping Google.
Alternatives
Tailwind (utility classes), a ready-made theme, Google Fonts.
show the colours
/* src/styles/global.css: colours are named by role, not shade */
:root {
	--bg: #0a0b0d;
	--text: #c9d1d9;
	--accent: #39f58c;
}

Homepage figure

The animation on the homepage. Your scroll position decides the figure’s pose.

Picked
A body made of CSS shapes, props drawn in SVG, moved by GSAP ScrollTrigger.
Why
The whole homepage is about 105 KB, and shapes stay sharp at any size. GSAP handles the scroll timing and is free.
Alternatives
A 3D figure in Three.js (built, then dropped: about 600 KB and I liked the 2D one more), a video, Lottie.
show the code
// src/scripts/homepage.ts (simplified): one pose per scene,
// angles in degrees. Scrolling blends from one pose to the next.
const poses = {
	run:  { torso: 4,  armL: 40,  armR: -45, legL: 30, legR: -35 },
	bike: { torso: 72, armL: -32, armR: -34, bike: 1 },
};

Posts

The writing itself.

Picked
Markdown files in the code, one per post, checked by a schema.
Why
Posts are plain text with full version history. A typo in a topic name stops the build instead of publishing a broken page.
Alternatives
A CMS such as WordPress or Sanity, or a database.
show a post file
---
title: 'Hello, world'
description: 'Why I started this site'
pubDate: '2026-10-07'
topic: 'programming-ai'
---

The post, written in Markdown.

Hosting: Vercel

Keeps the site’s files on servers around the world (a CDN) and sends them to each visitor from the nearest one.

Picked
Vercel.
Why
It rebuilds the site on every push. Every branch gets its own preview link, so changes can be checked before they go live. It also runs the few small server functions. HTTPS included, free.
Alternatives
Netlify, Cloudflare Pages, GitHub Pages.

Build: Astro

Turns posts and components into plain HTML, CSS and JavaScript files, once, before anyone visits.

Picked
Astro 7, starting from its official blog template.
Why
Made for content sites. It sends almost no JavaScript, and RSS, a sitemap and post pages come built in. After each build, Pagefind adds a search index as more plain files.
Alternatives
Next.js, Hugo, WordPress.
show the command
npm run build   # writes the finished site to .vercel/output/, plus a search index

Code: GitHub

Stores the code and every version of it.

Picked
GitHub, private repository.
Why
Every change can be undone. Vercel watches it, and each roadmap step got its own branch.
Alternatives
GitLab, Bitbucket.
show the command
git push   # Vercel sees this and deploys

Analytics

Counts visits: which pages, which countries, which devices.

Picked
Vercel Web Analytics.
Why
No cookies, so no cookie banner. One script tag.
Alternatives
Plausible, Umami, Google Analytics.
show the code
<script defer src="/_vercel/insights/script.js"></script>

Backend: a little

Code and data that live on a server: here, reader accounts, comments, messages and view counts.

Picked
Supabase for sign-in and the database, three tiny Vercel functions that save comments and messages, and Resend to email me about them.
Why
Pages stay plain files; only the reader features need a server. The database’s own rules (row level security) decide who may read or change what. All on free plans.
Alternatives
Giscus (comments stored on GitHub), Firebase, a full Node server.

The short version: posts are MarkdownPlain text with a few symbols for formatting, like # for a heading and * for a list. files, Astro buildsA step that runs once, before anyone visits, and turns your files into plain HTML, CSS and JavaScript. them into plain files, GitHub stores the code, and Vercel sends the files to visitors from a CDNContent delivery network: copies of your site on servers around the world, so each visitor gets it from one nearby.. There’s no server running code and no database, so there’s very little to keep running or patch. (That changed three days later, when readers got accounts and comments: see Adding readers below.)

Look around first

Before building anything, spend an evening looking at what others have made. Two good places to start: Awwwards, which collects award-winning sites, and recent.design, a gallery of recent web design.

The one that stuck with me was the scroll animation on Atelier’s Virtual Economy page, where the story moves as you scroll. I found it through this YouTube video. That’s where the idea for the homepage figure came from.

The figure

The homepage figure is made of plain shapes: rounded rectangles for the body, SVGAn image format made of shapes described in code, so it stays sharp at any size. drawings for the bike, desk, book and brain. A library called GSAP watches how far down the page you’ve scrolled and sets the figure’s pose to match.

The core idea fits in one sentence: scroll position is one number between 0 and 1, and every joint angle is worked out from it. Try it:

t = 0.00
Drag the slider. Every joint angle is start + (end − start) × t: standing at t = 0, running at t = 1.

The real figure does this for about twenty values at once (every joint, plus where it stands and which props are visible), across five scenes.

Two layers per joint1 minHow the scroll pose and the running motion avoid fighting each other.

Scroll sets the pose. But in some scenes the figure also moves on its own: legs stride while running, feet pedal on the bike, hands type at the desk. Those loops play on a timer, not with your scroll.

If both wrote to the same joint, one would overwrite the other. So every joint is two nested elements. The outer one gets the pose from scroll; the inner one gets the loop’s small extra swing on top. A loop only plays while its scene is on screen, and resets its inner layer to zero when it stops.

The bug that led to this: GSAP applies an animation’s starting values the moment it’s created, unless you tell it not to (immediateRender: false). For a while every scene had bent knees, because the running loop had quietly set them on page load.

Feet that stay on the pedals1 minInverse kinematics, in two lines of trigonometry.

When cycling, the pedal goes round in a circle and the foot has to stay on it. Instead of setting hip and knee angles by hand, the code knows where the foot must be and works backwards to the angles. That’s called inverse kinematicsInverse kinematics: working out the joint angles from where the end should be, like bending a knee so the foot lands on the pedal..

With two bones (thigh and shin) and a known distance from hip to pedal, the knee angle comes from the law of cosines. Then the hip angle is the direction to the pedal, corrected for the bent knee. That runs every frame, about sixty times a second.

The plan was a 3D figure, built with Three.js. Claude Code built it in one evening on a separate branchA separate copy of the code where you can try a change without touching the live site. (it’s still there), with all five scenes, lighting and a real turn of the body. I looked at it next to the 2D one and kept the 2D one.

Left: the 3D figure from the Three.js experiment. Right: the 2D figure that’s on the homepage.

Building something just to throw it away sounds wasteful. Here it was a cheap way to decide: one evening of the agent’s time, and then I could compare the two side by side. The 3D version would also have added about 600 KB to a homepage that’s about 105 KB now.

What I planned vs what shipped

Most of the plan changed once I saw it running.

planned or first built → shipped

Planned: 3D figure in Three.js

Shipped: 2D figure: CSS shapes and SVG

Why: built the 3D one, preferred the 2D one

Planned: no idle animation

Shipped: running, pedalling, typing loops

Why: I wanted it to move

Planned: keyboard shortcuts to open a topic

Shipped: buttons only

Why: I asked for buttons only

Planned: topics in the header

Shipped: topic chips on the blog page

Why: topics are part of the blog

Planned: a smiley face

Shipped: a superhero cape

Why: I didn’t like the face

Planned: SPEC.md, HANDOFF.md and hooks

Shipped: one file: docs/plan.md

Why: one file both Claudes read

How I worked with Claude Code

I used two Claudes. In the claude.ai app I talked through ideas and made decisions. Claude Code, in the terminalThe text window where you type commands instead of clicking., did the building: it reads the code, edits files, runs the build and pushes to GitHub. The two can’t see each other. The only link is a file in the repoRepository: the folder of code plus its full history of changes..

claude.ai chatDesignideas, decisions, questions
in the repodocs/plan.mdroadmap, decisions, build notes
Claude CodeBuildingcode, previews, commits
Two Claudes and a text file. Neither can see the other, only the file.

docs/plan.md (in the site’s repo, which is private) holds the roadmap, the decisions and a log of every time the build departed from the plan. Claude Code updates it after each step. It only works if both sides see the latest copy. When I asked the claude.ai project to review it while writing this post, it was reading a copy from before most of the build, with seven steps and none ticked.

What made the biggest difference:

  • Standing rules. A CLAUDE.md file is read at the start of every session. Mine says: explain every change and the reasoning, ask before adding a dependency, one branch per roadmap step, never push without being asked (later relaxed: small, safe fixes may go live directly), and open preview links in my browser.
  • A previewA private copy of the site, with its own link, built from a branch so you can check it before it goes live. for every step. Each step got a branch; Vercel built a private copy of the site for it; I looked; then it was merged.
  • Checking its own work. Before showing me a layout, Claude Code took screenshots with a headless browser (Chrome without a window) at phone, tablet and desktop sizes. The images in this post were made the same way.
  • A second agent in parallel. Analytics was built by another agent in its own copy of the repo while the first one was still polishing the homepage.
  • A second model as reviewer. When I said the bike proportions looked weird, a different Claude model (Fable) reviewed them: road-bike wheel size, a head tube, a fork that leans forward. The bike looks like a bike now. Fable also reviewed this post, and drew the map on the About page.
  • Permissions. A settings file lists 14 commands it can run without asking, including the build, the dev server, reading the git history, committing, installing packages and pushing. Everything else goes past auto mode’s safety check, which only asks me when it isn’t sure. More on that, and on what could go wrong, in my setup post.
show the settings file

The whole file, as of 21 October. The hooks part at the bottom is explained below the box:

{
  "permissions": {
    "allow": [
      "Bash(npm run build)",
      "Bash(npm run preview)",
      "Bash(npx astro dev *)",
      "Bash(git status *)",
      "Bash(git diff *)",
      "Bash(git log *)",
      "Bash(git commit *)",
      "Bash(git add *)",
      "Bash(open https://*)",
      "Bash(git push *)",
      "Bash(npm run check)",
      "Bash(npm install *)",
      "Bash(npx pagefind *)",
      "Bash(curl -s http://localhost*)"
    ]
  },
  "hooks": {
    "SubagentStop": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "node \"$CLAUDE_PROJECT_DIR/scripts/agent-hooks.mjs\" subagent-stop",
            "timeout": 10
          }
        ]
      }
    ],
    "Stop": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "node \"$CLAUDE_PROJECT_DIR/scripts/agent-hooks.mjs\" stop",
            "timeout": 10
          }
        ]
      }
    ]
  }
}
  • Hooks (added 21 October). When a helper agent finishes, a script logs it to an inbox file, and the main session is stopped once when it tries to end its turn and told to copy each new result into my follow-up list.

Advice I got and didn’t use: plan mode, custom skills, and a cheaper model for routine edits. For a project this size, plain conversation plus the CLAUDE.md file was enough. My setup post goes through every file, including what I left out.

The numbers

627289101112131415341663176186191120821
Commits per day, October 2026, up to 21 October

Most of the work happened in two days: 97 of the 132 commits are from 16 and 17 October. When I first published this, eleven days after my first question, the count was 47, and 34 of those came from that first evening.

Claude Code works in tokensThe unit AI models read and write in. Roughly ¾ of a word.. It ran on Claude Opus 5.5 (with a few requests to Fable, the reviewer) under a Claude Max subscription. By the time I first published, over about 480 requests it wrote roughly 370,000 tokens: code, explanations, commands. Every request also sends the whole conversation and the relevant code again, which added up to about 122 million input tokens: roughly 330 read for every one written. Nearly all of that came from a cache, which makes re-sending it cheap.

What would that cost without a subscription? Counting every session up to 21 October (about 1,670 requests, mostly to Opus 5.5), pay-as-you-go API prices come to about $142. Without the cache, re-sending all that context at full price would have been about $1,660, more than ten times as much.

How I worked out the cost1 minToken counts from Claude Code's own logs, times the published prices.

Claude Code saves every session as a log file on my Mac, including how many tokens each request used. A short script added them up, counting each request once. Then I multiplied by the API prices per million tokens:

  • Opus 5.5: $4 for fresh input, $0.20 for input read from the cache, $8 for writing to the cache (the one-hour kind Claude Code uses), $20 for output. That’s about $129 of the total, and $79 of it is cache reads.
  • Fable 5.1 (the reviewer): $10 in, $0.25 from the cache, $20 to write it, $50 out. About $13.

I actually pay a flat monthly fee for a Claude Max subscription, so this is what the same work would cost on the API, not what I paid.

When I first published, Google’s Lighthouse scored the homepage 97 for performance on a simulated slow phone, and 100 for accessibility, best practices and SEO.

Where the tokens went

Almost all of the tokens are the agent re-reading context it has already seen. That’s cheap per token, but there are so many that it’s still the biggest share of the bill. Writing new context into the cache costs more per token, so it comes second, ahead of everything the agent actually wrote.

By kind of token (cost at API prices)

  • Reading from the cache · 398M tokens$80
  • Writing to the cache · 4.2M tokens$40
  • Writing output · 1.1M tokens$22
  • Fresh input · 5k tokens<$1

By working session

  • First build: homepage, this post, About, bike post · 16–17 Oct · 876 requests$70
  • Reader features and newer posts · 20–21 Oct · 357 requests$38
  • Helper agents: reviews, research, map, bike drawing · 16–17 Oct · 160 requests$17
  • Setup questions · 8 Oct · 122 requests$9
  • Polish pass · 18 Oct · 86 requests$5
  • Claude Code setup post, in a second copy of the repo · 17 Oct · 50 requests$2
  • This update · 21 Oct · 23 requests$2
Claude Code token use for this site, 6–21 October 2026, about $142 in total at API prices

By session, the first big build session dominates: it was one long conversation, and every request re-sent all of it. Long sessions get more expensive with every message, which is why I now start fresh ones for separate tasks.

From a blank MacBook to a live site

Seven steps, plus an optional eighth. Each has the exact commands folded underneath.

  1. Install Homebrew, which installs other software for you. It also installs Apple’s command line tools, which include git.
show the command
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  1. Install Node and the GitHub command line. Node runs Astro’s build tools (and, later, a few small server functions on Vercel).
show the command
brew install node gh
node -v   # should be 22 or newer
  1. Make a GitHub account at github.com, then log in from the terminal.
show the command
gh auth login
  1. Start from Astro’s blog template and run it on your Mac.
show the command
mkdir -p ~/dev && cd ~/dev
npm create astro@latest my-website -- --template blog
cd my-website
npm run dev   # open http://localhost:4321
  1. Put it on GitHub.
show the command
git init -b main   # skip if the installer already made a repo
git add -A
git commit -m "Start from the Astro blog template"
gh repo create my-website --public --source=. --push
  1. Connect Vercel. Sign up at vercel.com with your GitHub account, choose Add New → Project, import the repo and press Deploy. A minute later you have a live link, and every push deploysPutting a new version of the site online. again.

  2. Install Claude Code and let it learn your project.

show the command
curl -fsSL https://claude.ai/install.sh | bash
cd ~/dev/my-website
claude   # then type /init inside it
  1. Optional: buy a domain. In Vercel, open Domains, search for a name and buy it; it connects to your project without touching any settings. Look at the renewal price, not the first-year price: some endings cost $2 the first year and $27 every year after. I went with shrey.cloud: $7.99 for the first year, about $24 a year after. .cloud leaves room to host other projects on subdomains later.
Things that bit us1 minThree of mine, two of Claude Code's, and one I avoided.
  • Pasting a long list of commands at once (me). One of them deleted some files, and zsh asked “are you sure?”. That question swallowed the rest of the paste.
  • Resetting git history (me). During setup I deleted the git history and started again. That’s only safe before you’ve pushed anywhere.
  • A minifier rewrote the CSS (Claude Code). The tool that shrinks CSS for the live site turned a short animation rule into animation: none, and the typing animation vanished. Writing the rule out in full fixed it.
  • SVG ignores hidden (Claude Code). The hover line on the About page’s chart stayed on screen, because the HTML hidden attribute does nothing inside an SVG drawing. One line of CSS fixed it.
  • The domain payment failed (me). There was no card on my Vercel account, so the first purchase of shrey.cloud didn’t go through. Adding one fixed it; nothing was charged twice.
  • Projects in ~/Documents (avoided, thanks to the chat). iCloud tries to sync that folder, including the thousands of files in node_modules. Use a folder like ~/dev.

Questions I asked along the way

I’m new to this. These are real questions from my chats, lightly tidied.

Should I move from the web chat to the terminal?

For building, yes. Claude Code can read and edit the files, run the build and see the errors itself. I kept the web chat for design discussions.

What is Vercel for?

It takes the code from GitHub, builds the site every time you push, and serves it from servers around the world. It also gives every branch its own preview link.

Is Node a backend?

Mostly not. Node builds the site on my Mac or on Vercel, and visitors get finished files. The exception came later: three tiny functions that save comments and messages and email me.

Wouldn't making my email address public cause spam?

Every git commit carries an email address, and in a public repo anyone can see it. GitHub gives you a private no-reply address for commits.

Why is deleting branches necessary?

It isn’t. Once a branch is merged, it’s just a label; deleting it loses nothing. It keeps the list short.

Is GSAP an alternative to Three.js, or do we use both?

They do different jobs. Three.js draws 3D scenes; GSAP changes values over time or with scroll. You can use them together. This site ended up needing only GSAP.

What are hooks?

Scripts Claude Code runs automatically at set moments, like before a command or when a session starts. Rules in CLAUDE.md are advice the model follows; hooks always run.

What is Lighthouse?

A tool built into Chrome that scores a page on speed, accessibility, good practice and search-engine friendliness, and lists what to fix.

Can we read visitors' cookies to see which other sites they visited?

No. A site can only read its own cookies; browsers block everything else on purpose. This site sets no cookies of its own. If you sign in, your session is kept in your browser’s local storage.

Since I first published this

I kept going the same day. What changed:

  • A domain. The site moved to shrey.cloud (step 8 above).
  • A review of this post. Fable and the claude.ai chat both read it. They caught a quote I never said, two plan-vs-shipped rows the record didn’t support, a link preview that showed the template’s stock picture, and a copy button covering code on phones. The chat also got one thing wrong: it said it had made up “seven steps, none ticked”, but the git history shows the 8 October plan had exactly seven unticked steps.
  • An About page with an interactive terminal (type help) and a map from Mumbai to Amsterdam whose coastlines Fable drew by hand in SVG.
  • Smaller things: a green >_ tab icon, a button on the homepage that points here, empty topic pages that suggest the latest post, a 404 page, and a percentage on the reading progress bar.
  • Better scores. After fixing a colour-contrast problem in the anatomy diagram, Lighthouse gives the homepage, this post and the About page 100 in all four categories.

By that evening (17 October), the counter read 69 commits (from 47), about 795 requests to Claude (from 480), roughly 198 million input tokens and 584,000 output tokens.

Adding readers

A few days later I wanted the site to talk back: comments under posts, a way to message me, and search. Each one meant giving up a bit of “just files”.

Sign-in and comments on a static site

I could have used GitHub-based comments, but then every reader would need a GitHub account. I wanted sign-in on the site itself, with an email link or Google. So the site now uses Supabase, which provides sign-in and a Postgres database. The pages are still static: the comments load in your browser, straight from Supabase.

That raises an obvious question: if the browser talks to the database directly, the key it uses is public. Anyone can read it in the page source. What stops someone from deleting every comment?

The answer is row level securityRow level security: rules inside the database that decide, row by row, who may read or change what.. The key itself allows almost nothing; the rules live in the database. Each table has a few one-line policies: comments are public to read, you can only post as yourself, and you can only delete your own (I can delete any). Even with the key, a stranger can only do what those rules allow.

Why some writes go through a server anyway1 minEmails need a secret, and secrets can't live in the browser.

I wanted an email whenever someone comments or sends me a message. Sending email needs a secret API key, and a secret in the browser isn’t secret. So those writes go through a tiny server functionA small piece of server code that starts only when a request arrives, runs for a moment, and stops. on Vercel: it checks who you are, saves the comment as you (so the same database rules still apply), then emails me. Everything else on the site is still plain files.

Messages work the same way: they’re saved privately and emailed to me with your address as the reply-to, so I answer from my normal inbox.

Sending email from my own domain

This was the least glamorous part and took the most clicking. Sign-in links, comment notifications and the contact form all send email, and email from a new domain lands in spam unless you prove you’re allowed to send it.

So shrey.cloud got a handful of DNSThe internet's address book: records that say which servers handle a domain's website and email. records for Resend, the email service: a DKIM key that signs each message, a send subdomain pointed at Resend (it carries the SPF record that lists who may send for the domain, and catches bounces). A DMARC policy tells inboxes what to do with fakes. Then Supabase was set up to send its sign-in emails through Resend too, from hello@shrey.cloud, instead of its own heavily rate-limited sender.

Google sign-in needed its own setup: a Google Cloud project, an OAuth client, a privacy page, and publishing the app so it works for anyone, not just me. Claude Code prepared each step; my part was mostly signing in and saving.

One thing I couldn’t fix for free: Google’s account picker says “continue to jbwncfjpalicjynssuqk.supabase.co” instead of shrey.cloud. Changing that is a paid Supabase add-on.

Search without a server

Search usually means a server that looks things up. Here it’s Pagefind, which runs right after each buildA step that runs once, before anyone visits, and turns your files into plain HTML, CSS and JavaScript.: it reads every post and writes a search index as more static files, split into small chunks. When you search, your browser downloads only the chunks it needs. No search server, no extra database, and it’s fast.

Only the post text is indexed, not menus or footers, so results point at what you actually wrote. The downside: the index only exists after a build, so search doesn’t work while developing locally. I test it on a built copy.

What surprised me

How easy it was, mostly. When I said the bike looked weird, Fable came back with road-bike wheel sizes, a head tube and a fork that leans forward: details I wouldn’t have known to ask for. Claude Code was also more self-sufficient than I expected: it ran the build, checked its own work with screenshots at phone, tablet and desktop sizes, and opened previews in my browser. And the animations on the homepage and the interactive parts of this post came out better than I’d hoped.

The second round surprised me the other way. Adding accounts and email was mostly not code: it was DNS records, admin consoles and sign-in screens, and that’s where most of my time went.

What’s next

Newsletter emails (you can already subscribe), other projects on shrey.cloud, more experiments like asking three AIs instead of one, and posts on the other topics: running and biking.


I chose what went into this post. Claude Code drafted it from notes the two Claudes wrote about the project, the git history and my chats with Claude. Fable reviewed it.