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
| Layer | Built with | What it does |
|---|---|---|
| Site shell | Astro 7, TypeScript (strict), Vercel | Static pages, with the case studies written in MDX, hosted on Vercel. |
| Intro | Raw WebGL2, with its own shaders | The sound screen, then liquid that swells while the opening quote writes itself. |
| Village | three.js 0.169, plus the site’s own engine | The island you land on: buildings you can look inside, villagers on their routines, and a day and night that follows your clock. |
| Walk mode | A lazy module | Walk beside a villager, or into the shop, with the keyboard or a tap. It downloads in the background once the village has arrived. |
| Text reveal | Raw WebGL1, one shared canvas | Headings and dialog titles that materialize letter by letter. The words stay real text in the page; the canvas only draws the reveal over them. |
| Icons | Phosphor Regular, animated with Motion’s mini animate | The small icons in the sidebar and the buttons, and the short movements they make when you point at or press them. |
| Fonts | Self-hosted Instrument Serif, Satoshi and Caveat | Served from the site itself, never from a font service. |
| Server | Two Vercel functions | The 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
| What | Size | When it loads |
|---|---|---|
| Home page, up front | 107 KB | Every visit to the home page: the page’s own script, the router, the sidebar and the stage. |
| The intro | 14 KB | A full load of the home page, unless you have asked your system for reduced motion. The village loads behind it. |
| The village, default view | 317 KB | Right 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 mode | 8 KB | In the background once the village has arrived, ready for “Walk with them”. |
| Text reveal | 7 KB | When the first text reveals: the intro’s quote on the home page, or the first heading of a case study. |
| Models | 1.8 MB | 56 models, fetched while the village builds: the outdoor pieces first, the indoor ones when nothing else is waiting. |
| Fonts | 137 KB | Four 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 front | 106 KB | Opened 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 page | 90 KB | No 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
- Accessibility. The sidebar is the real navigation. Everything in the village can be reached from it with a keyboard or a screen reader, and the canvas is hidden from assistive technology. The intro, the arrival and the camera flights are skipped when your system asks for reduced motion.
- Privacy. Villagers appear by name only if they agreed to it. Everyone else is shown as someone with a coffee or a sketchbook.
- Security. A strict content security policy lets the page load scripts, fonts and data only from itself. The build then scans its own output and fails if it finds a villager’s name, an email address, a borrowed word or one of the build machine’s variables.
- Everything self-hosted. The fonts, models, icons and scripts all come from the site itself. Nothing loads from a CDN or another host.
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:
- three.js3D engine under the village
- Astrothe site framework
- Motionthe icons’ small movements
- Phosphor Iconsthe icons
- Instrument Serifheadings
- Satoshibody text
- Caveathandwriting
- Quaterniusthe CC0 low-poly model kits