# Your website as a city: an n8n workflow builds it as a miniature town

> Enter a domain, explore a 3D city: sections become districts, subpages high-rises, headers watchtowers. An n8n workflow with AI and a download.

Author: Daniele Michelin · Published: 2026-11-07 · Updated: 2026-11-07 · Language: en
Canonical: https://daniele-michelin.com/en/blog/n8n-website-city/

Every website is a city. An n8n workflow reads the sitemap and builds a miniature town from it: sections as districts, subpages as high-rises, security headers as watchtowers. Everything is clickable.

**Update 8 November: a realistic city.** After the feedback “too futuristic” it now looks like a real miniature town: a sky with the sun at your local time, streets, cars, shadows and a lighthouse.

**Earlier updates:** 7 November brought the new graphics with clickable districts, the morning of 8 November the real 3D scene.

Try it first: [your website as a city](https://daniele-michelin.com/en/website-city/). Enter a domain, press “Build the city”, and a few seconds later the city stands. No domain at hand? The demo button fills in daniele-michelin.com.

## How to read the city

- **Environment:** a real sky with the sun at your browser's local time, so morning, day, evening or night. The switch “🌅 Morgen · ☀ Tag · 🌇 Abend · 🌙 Nacht” lets you pick it yourself. Buildings cast real shadows, and a tilt-shift effect makes everything look like an architect's model.

- **Home page = landmark:** a town hall or a skyscraper with a flag stands on the central square. That is the home page.

- **Districts = sections of the site:** the workflow reads every URL in the sitemap and groups them by the first path segment. Each section, such as `/blog` or `/tools`, becomes a block with streets and pavements, each in its own architectural style: glass and steel, brick or terraced houses. Its name is on a street sign. Up to ten districts, the rest goes into the district “…”. Translated sections like `/fehler`, `/en/errors` and `/it/errori` are counted together.

- **High-rises = subpages:** the biggest subsections are the tallest buildings in the district, each with a sign. Their height grows with the number of pages.

- **Everything is clickable:** clicking a building or a district opens exactly that page of the website. The city is a sitemap you can walk through.

- **Traffic = response time:** cars drive through the streets. Above 1500 ms there is a traffic jam with red brake lights.

- **Watchtowers = security headers:** six gates or watchtowers on the edge of town stand for HSTS, CSP, nosniff, frame protection, Referrer-Policy and Permissions-Policy. If a header is missing, a building site with a crane and barriers stands in its place.

- **Lighthouse = TLS:** its light rotates and shows the days left on the certificate. Without HTTPS it stays dark or glows red.

- **Post office = e-mail:** the flag on the roof is green, yellow or red depending on SPF and DMARC.

- **Technologies = billboards:** the detected technologies appear as billboards on the rooftops.

- **Evening and night:** windows and street lamps switch on.

- **Accessible:** drag to rotate the city, use the mouse wheel or two fingers to zoom. The “2D” button switches to the flat view. With a keyboard or screen reader, use the city plan below: the same city as a list with bars and every link.

## What the workflow shows

- **Check first, then in parallel:** the webhook first calls a checkpoint. It measures headers, SPF and DMARC, TLS and response time, and returns the final address after redirects. Then three HTTP nodes run at the same time: homepage, `sitemap.xml` and `sitemap_index.xml`.

- **Merge:** a Merge node with three inputs waits until all answers are in. If the sitemap is an index, the workflow fetches up to eight child sitemaps from the same host and extrapolates the page count. It follows the WordPress redirect to `wp-sitemap.xml` once.

- **Code does the maths:** the Code node “Stadt vermessen” (surveying the city) counts pages, kilobytes, scripts and images and recognises 40 technologies from headers and HTML. The AI calculates nothing.

- **AI with rules:** the city guide is gpt-oss-120b at IONOS in Germany. It gets the measurements as JSON and may use only those numbers. Three to four sentences, at most 380 characters, weaknesses told with gentle humour, no insults, no emojis, JSON only.

- **Fallback:** all HTTP nodes carry on after errors. If the AI does not answer or answers too briefly, a Code node writes the guide from the same numbers using a template. So the city always stands.

- **Sharing with a picture:** the server stores the city with a number and a link and draws a skyline as the preview image. WhatsApp and LinkedIn show the city when shared, not just a link.

## Under the hood

- **Three.js hosted locally:** the library sits on my own server. The Content Security Policy does not allow scripts from a CDN, so everything comes from my own domain.

- **Instancing:** windows, trees, cars and street lamps are each one object with many instances. A few draw calls instead of thousands keep the scene smooth.

- **Paused when nobody looks:** if the scene is off screen or the tab is in the background, the render loop stops. That saves battery and CPU.

- **Fallback without WebGL:** without WebGL the page shows an SVG city automatically. Nobody gets an empty box.

## Build it yourself

The workflow is ready as [JSON to import](https://daniele-michelin.com/assets/n8n/website-city.json). Placeholders are marked: the checkpoint address, the token and the page that receives the result. On my server the checkpoint is a small PHP script, so you need an endpoint of your own for it. Any OpenAI-compatible API works for the AI.

The skeleton also fits something serious: check first, then several requests in parallel, merge, calculate and let an AI put it into words. More workflows to click and download are on the [n8n overview](https://daniele-michelin.com/en/n8n/).
