Published
Our website, rebuilt on Astro for a faster and more accessible visit

On 25 November 2026 we moved hlorenzoz.com, the website of Lorenzoz Agency, from Next.js 16 to Astro 7. Visitors kept the same addresses, the same design and the same content in English and Spanish. What changed is how much work each page asks of their phone: the pages now load a few kilobytes of JavaScript instead of more than half a megabyte, and they respond to the first tap without waiting.
This article covers what we rebuilt, how we checked that nothing visible broke, and what the change means for someone visiting the site on an ordinary phone. Every figure comes from a test we ran, with its date and conditions, and the before and after comparison sits in one table.
Where the site started

The site launched in April 2026 on Next.js 16, exported as static files, with Tailwind CSS 4, Cloudflare in front of it and tests in Vitest and Playwright. A separate article tells the story of that first build.
It worked, but every page carried a React runtime to make interactive a page that never changes after the build. On a site that mostly presents text, images and a booking button, that JavaScript is a cost the visitor pays on every visit and gets nothing back for. After building the GERP DJ site on Astro and seeing how it performed, we gave our own site the same treatment.
One rule: only the framework changes

The migration followed a single rule: same URLs, same head tags, same design, same commands, agents and scripts. A visitor with a bookmark, a search engine with the page in its index and a link shared months ago all had to land on the same page and see the same thing. Only the framework underneath was allowed to change.
To hold ourselves to it, we compared the new build with the old one before switching. The head tags and the JSON-LD structured data came out identical on all 48 pages, in both languages. Screenshots of every route at 390 and 1440 pixels wide, a phone width and a desktop width, differed by 0.25% of pixels or less, with identical page heights. The sitemap and the robots file came out byte for byte the same.
What we rebuilt
Every component of the site became a native Astro component. Astro turns them into plain HTML at build time, one file per page, with no server code running when someone visits. The parts that react to the visitor, such as the mobile menu, the carousels and the frequently asked questions, each got a small script in plain JavaScript that does that one job.
React stays in exactly one place: the ElevenLabs voice widget, which lets a visitor talk to our AI assistant. As the heaviest piece of the site, it is left out of the first load and mounts only once the visitor scrolls past half the screen.
The tests moved too, and grew. At the end of the migration Vitest ran 1,096 passing tests, rendering components through Astro's Container API and checking the built HTML of every page, and Playwright ran 37 passing end to end tests in a real browser. A new test checks every internal link, image address, anchor, redirect and offline cache entry in the built site, and fails if any of them points nowhere. Lighthouse CI audits 14 key URLs on every run.
We also dropped a leftover of the old build: on 46 of the 48 pages it told the browser to fetch a small footer icon early, competing with the content that matters first. And the service worker that keeps the home page available offline got new cache names, so copies stored from the old site are discarded at the switch instead of showing stale pages.
Before and after, measured
Before switching, we served both builds locally and measured the same pages with Lighthouse in its mobile profile, which simulates a modest phone on a slow mobile connection. Each figure is the median of several runs, measured on 25 November 2026. Lab scores move by a few points between runs, so the medians matter more than any single number.
Two rows explain the rest. Total Blocking Time is how long the phone is too busy running scripts to react to a tap or a scroll, and it fell to zero. The JavaScript each page loads fell by more than 98%, from over half a megabyte to a few kilobytes. The last two rows are the proof that the speed did not come from removing anything: same head, same structured data, same picture on screen.
The lab rows and the live PageSpeed Insights score measure the same page in two different setups, which is why the home page reads 89 in one and 98 in the other. In the lab, both builds were served from a local static server with no compression, so every file travelled at full size through the simulated slow connection; that penalises both builds equally and keeps the comparison between them fair. In production, Cloudflare compresses every file with Brotli and serves it from its edge, so the same Astro page reaches the phone smaller and sooner. We kept no PageSpeed Insights report of the live Next.js site, so its live score is not in the table.
| Measure | Next.js 16 | Astro 7 |
|---|---|---|
| Performance, English home page (local lab) | 77 | 89 |
| Performance, Local SEO service page (local lab) | 89 | 94 |
| Performance, GERP DJ case study (local lab) | 72 | 86 |
| Performance, English home page (live, PageSpeed Insights, 25 November 2026) | Not measured | 98 |
| Total Blocking Time | 66 to 83 ms | 0 ms |
| JavaScript loaded per page | 534 to 645 KB | 2.6 to 8.9 KB |
| Head tags and JSON-LD on 48 pages | Reference | Identical |
| Screenshot difference at 390 and 1440 px | Reference | 0.25% of pixels or less |
Faster to show, quicker to respond
For the visitor, less JavaScript means the page is ready sooner. A browser has to download, read and run every script it receives, and with the old build that was more than half a megabyte on every page. Now the HTML arrives ready to read and the scripts that follow weigh a few kilobytes, which is why the Performance score rose on all three pages we compared.
Response matters as much as appearance. With 66 to 83 ms of blocking time, a tap during the load could wait for scripts to finish before anything happened. At 0 ms, the menu opens, the accordion unfolds and the booking button reacts the moment it is touched.
The gain is largest where visitors need it most. The lab profile behind these numbers imitates a modest phone on a slow connection, which is the situation of many people who look up a local business while out, on mobile data or patchy Wi-Fi. A page that weighs little and asks little of the processor stays usable there, and it uses less of the visitor's data and battery.
A page that stays still while it loads
Few things are as irritating as a page that jumps while you read it or reach for a button. The site is built so that does not happen. Images declare their size in advance, so the browser reserves their space before they arrive. The Inter typeface is self hosted and loaded as a single file, and while it downloads the text is shown in a fallback font adjusted to the same size, so lines do not rewrap when the real font appears.
The cookie banner and the answers to the frequently asked questions are part of the page from the start, hidden until they are needed, instead of being added later by a script. The banner appears a few seconds after the page loads and floats over the bottom of the screen rather than pushing the content down.
The screenshot comparison confirmed it from another angle: every route kept exactly the same page height as on the old site, so the change of framework moved nothing on screen.
Usable with a keyboard or a screen reader
After the switch we ran the Lighthouse accessibility audit on every route and fixed each issue it raised, until all 48 pages scored 100 on mobile. Most of those issues predated the migration; the rebuild was the moment to close them.
The fixes are concrete. Two pieces of light grey text without enough contrast are now darker. The previous, next and dot buttons of two image carousels have names a screen reader announces in English and Spanish, and the dots are spaced so each one is a target a finger can hit. Footer titles, portfolio cards and the services directory no longer jump from the main heading straight to the third level, so screen reader users can move through each page by its headings. The label of the language switcher now starts with the language code shown on screen, so voice control users can say what they see.
A few behaviours changed on purpose. The language switcher is now made of ordinary links, which work with a keyboard and can be followed by search engines. The Escape key closes the mobile menu. In the feature carousel only the header of each item acts as a button, so the links inside it behave like links again.
Links that work, offline access and privacy
We then audited every page, setting and link. An automated browser opened all 48 routes, the root address and the 404 page, at desktop size and on an emulated Pixel 5, both on the development server and on a local copy of the production Worker. Every page answered correctly, with no console errors and no failed requests to the site itself.
The audit caught small faults worth fixing. Links from the menu and footer to sections of the home page relied on a redirect and now point straight at the canonical address. The install manifest and the offline cache now point at the English home page instead of the root redirect. The WhatsApp icon on the digital business card, broken since before the migration, was redrawn.
Privacy came along without extra effort. The typeface is served from our own domain, so reading the site sends no request to an external font service. Optional cookies stay off until the visitor decides, through a banner that offers accept and reject with equal weight next to a link to the cookie policy. The voice assistant, which connects to ElevenLabs, loads only after the visitor starts scrolling, so someone who only glances at the first screen never loads it.
The live site in PageSpeed Insights

Once production served the Astro build, we tested the live English home page with Google PageSpeed Insights on mobile. The report from 25 November 2026 at 3.20pm gives 98 for Performance and 100 for Accessibility, Best Practices and SEO.
PageSpeed Insights runs Lighthouse from Google servers, so it measures the page as a phone receives it over the internet, through the Cloudflare network in front of the site. Its setup differs from our local lab runs, so its score is not comparable with the local median of 89, and each figure is reported with its own date and conditions.
The panel for real user data shows no data yet. It summarises what Chrome users experienced over the previous 28 days, and Google publishes it only once a site has enough of that traffic.
What this means for a local business
Everything here is the standard we apply to client sites. Many people look for a local business on a phone, often on the move, and a page that appears at once and reacts to the first tap is part of the service they receive before they ever call. A page that keyboard and screen reader users can use is open to more customers.
It also shows how we handle a change like this: one rule written down before starting, measurements before and after, and checks that prove the visible site did not move. None of this guarantees a position in Google, and we never promise one. It removes the technical reasons a good business gets passed over.
The case study for this site shows the PageSpeed report and the rest of the evidence, and the live site is one click away, so you can judge it for yourself.
