Back home

How this site was built

helloanurag.com is a static Astro site with three hand-built graphics pieces on top: the intro, the 3D village and the text reveal. Each one loads only when it is needed, and on the home page the big ones load behind the intro. A case study opens in a panel beside the village, or in a sheet over it on a phone. When you open one from a link, its words come first: on a wide screen the village loads after the study’s first picture, and on a phone it waits until you fold the study away or leave it. I designed it and built it with Claude Code.

The layers

LayerBuilt withWhat it does
Site shellAstro 7, TypeScript (strict), VercelStatic pages, with the case studies written in MDX, hosted on Vercel.
IntroRaw WebGL2, with its own shadersThe sound screen, then liquid that swells while the opening quote writes itself.
Villagethree.js 0.169, plus the site’s own engineThe island you land on: buildings you can look inside, villagers on their routines, and a day and night that follows your clock.
Walk modeA lazy moduleWalk beside a villager, or into the shop, with the keyboard or a tap. It downloads in the background once the village has arrived.
Text revealRaw WebGL1, one shared canvasHeadings and dialog titles that materialize letter by letter. The words stay real text in the page; the canvas only draws the reveal over them.
IconsPhosphor Regular, animated with Motion’s mini animateThe small icons in the sidebar and the buttons, and the short movements they make when you point at or press them.
FontsSelf-hosted Instrument Serif, Satoshi and CaveatServed from the site itself, never from a font service.
ServerTwo Vercel functionsThe contact form, which sends through Resend, and the GitHub month on the village’s tally board, cached at the edge for an hour.

How heavy it is

WhatSizeWhen it loads
Home page, up front107 KBEvery visit to the home page: the page’s own script, the router, the sidebar and the stage.
The intro14 KBA full load of the home page, unless you have asked your system for reduced motion. The village loads behind it.
The village, default view317 KBRight after the intro’s code, so it can build behind the sound screen. This includes the sidebar’s and the stage’s scripts, which the first row counts too.
Walk mode8 KBIn the background once the village has arrived, ready for “Walk with them”.
Text reveal7 KBWhen the first text reveals: the intro’s quote on the home page, or the first heading of a case study.
Models1.8 MB56 models, fetched while the village builds: the outdoor pieces first, the indoor ones when nothing else is waiting.
Fonts137 KBFour files on a full visit to the home page: Instrument Serif (regular and italic), Satoshi and Caveat, which arrives once the village draws its handwriting or the Paper opens. A case study gets Caveat only when the village comes.
A case study, up front106 KBOpened from a link: the home page’s scripts, less the intro’s. The village follows the study’s words: on a wide screen after its first picture, and on a phone once you fold the study away.
This page90 KBNo 3D at all: no three.js, no village and no intro.

For scale, three.js alone is about 158 KB, and the budget I gave the village was 350 KB for everything its default view loads.

Scripts are gzip, as sent. The models and fonts are already compressed files, so they are shown as they are. KB is 1,000 bytes.

How it was built

The lab came first. The village began as a single-file prototype, and it went through 13 versions. That is where the look, the layout and the feel were worked out.

Then the port, task by task. I ported it into the site with Claude Code, in about twenty tasks. One agent built each task and a fresh reviewer checked it, sending the work back when it found a problem. A last review read the whole branch before release.

A seeded world. The island is generated from a fixed seed, so it is the same for every visitor, and tests hold it to the prototype’s.

Mostly code. Most of the village is built in code. Low-poly CC0 model kits from Quaternius fill in props, walls, roofs and plants; I restyle them to match and compress them with meshoptimizer.

Kept smooth. It builds in small steps and compiles its shaders behind the intro. It stops drawing when the tab is hidden or the village is scrolled out of view. When frames run slow it lowers its resolution a step at a time, and phones and other weaker devices get fewer villagers.

Care taken

Third-party code

The open-source code and assets this site stands on are listed, with their licences, in third-party-licenses.txt. The main ones: