Skip to content
Rafhael Marsigli
6 min read

Why I Use Astro for Client Websites. And When I Don't

Why I Use Astro for Client Websites. And When I Don't

Building websites isn't something I do all that often, especially since my main focus is software engineering and architecture. But with Rush CMS, my workload has shifted a little, giving me the opportunity to reflect on what I've found to be the best setup for my workflow when working with a Headless CMS. If you still build websites, or manage the people who do, this article might be useful.

Let me get one thing out of the way: I'm not here to convert anyone. No framework-as-a-religion debates! What I have to show you is boring, but useful: I currently run 10 client websites on Astro, most of them powered by Rush CMS. From my own rafhael.pro to the CTB Brasil homepage, featuring more than 30 photos (and a PageSpeed Insights score of 97), plus websites for a construction company, a school, a bakery, a pharmacy... This is a real portfolio, running in production and paying the bills. This post is an honest account of what Astro brings to the table in this scenario, and I'll also explain why it is not the right tool for everything.

The Problem Astro Solves for Me

Most of the websites I deliver fall into what the Astro team honestly calls "content-driven" websites: corporate websites, landing pages, blogs, portfolios. These are websites where content needs to reach the reader quickly. They're not authenticated dashboards or social networks. They need to be fast, sometimes even faster than they need to be pretty.

The problem is that the industry spent years pushing web app tools to solve website problems. Next.js and Nuxt are great for complex applications with global state and authenticated areas. But their SPA model was originally designed to render the entire website on the client, and SSR came later, mostly as a way to patch performance issues. For a landing page or a website whose only job is to deliver a message and convert visitors, shipping a React runtime on the first load is more than overkill: it's throwing money away.

Astro flips that approach: it's server-first by default. Astro follows the same approach PHP, WordPress, Laravel, and Rails have been using for decades, except you don't need to learn a second server-side language. Everything is still HTML, CSS, and JavaScript.

Personal take: I particularly hate the WordPress dinosaur, and I don't want to have to press every single button in the cockpit just to build a landing page with Next.js (thankfully, those dark days are behind me). I want to deliver the best possible work using only what is actually necessary. The first time I tried Astro, it felt like coming home, only with modern tooling.

What Is Islands Architecture?

This is a pretty elegant idea, and it's simple to explain. It also has a direct impact on performance: instead of hydrating the entire page in the browser, Astro renders everything as static HTML and isolates interactivity into "islands" that load JavaScript only when needed.

In practice, with Rush CMS, this means that 90% of a corporate website (header, hero, text sections, footer) is delivered as plain HTML, with zero client-side JavaScript. If the page has a contact form or a carousel, only that component loads its own script:

---
// The .astro file is rendered on the server. Header, Hero, and Footer
// become plain HTML: zero JavaScript shipped to the client.
import Header from '../components/header.astro'
import Hero from '../components/hero.astro'
import ContactForm from '../components/contact-form.ts'
import Footer from '../components/footer.astro'
---
<Header />
<Hero />
<!-- JavaScript only loads when the component enters the viewport -->
<ContactForm client:visible />
<Footer />

The client:visible directive is the important detail here: the form only downloads and executes its JavaScript when the user scrolls down to it. On a landing page, that often means the JavaScript is never downloaded because the CTA has already converted the visitor.

Enough Theory. Show Me the Numbers!

According to the official documentation, Astro can deliver websites up to 40% faster, with 90% less JavaScript than (probably) Next.js.

The article Why Speed Matters breaks down, with real-world examples, the impact that making your website faster can have, regardless of the language or framework you're using. It includes cases like:

  • Every 100ms improvement in load time brought Mobify a 1% increase in conversions.
  • Pinterest reduced load times by 40% and saw a 15% increase in sign-ups.
  • AutoAnything made its website 50% faster and increased sales by 12%.

You can achieve these results with React, Next.js, or any trendy framework out there. But when it comes to websites, why reinvent the wheel when I already have an extremely easy-to-use framework that delivers incredible results with so little effort?

Performance has a measurable financial impact, and Astro's architecture makes performance the default rather than a constant uphill battle.

In my most recent case, the CTB Brasil website (linked at the beginning of this post), I measured a 97 Lighthouse score on mobile for a homepage with more than 30 photos. That's over thirty images that would normally be a performance massacre, all without having to do anything particularly complicated: astro:assets, lazy loading, automatic WebP conversion. No sweat!

The right tool isn't always the heavyweight one

It All Comes Down to Flexibility and Convenience

This is one of my favorite parts! Astro is UI-agnostic. If you need to, feel free to use React, Vue, Svelte, Solid, or whatever you want inside your islands.

In practice, this means that if I decide tomorrow that Svelte is a better fit for a specific component, or inherit a Vue component from an old project, I don't have to rewrite the website.

Astro + Bun

If Astro handles performance on the client side, Bun tackles the other side of the equation: build times and CI/CD.

Astro officially supports Bun, but I prefer using this approach:

Terminal window
bun create astro

Let me be specific about my skepticism again: Bun's speed improvements are real and well documented when it comes to dependency installation and cold starts, but the exact numbers depend on your project and runner.

I use this combination daily, and the improvement shows up mostly where it hurts the most: in the pipeline that runs on every push.

"Wow! Where did all these five hundred warnings and two hundred errors on my little website come from??"

Where Astro Is NOT the Answer

You probably already know this, but I use Astro for websites and landing pages. For pretty much anything else, I'll reach for the beautiful Svelte or the ugly React (yes, ugly, but it pays the bills).

Trying to force Astro into application UIs, platforms, and similar projects seems like a great way to shoot yourself in the foot. It's not impossible, but it can become limiting.

What about you? Have you tried Astro when building a website, or have you delegated everything to that AI agent that absolutely loves Next.js?

Start typing to find something.