Why I chose Astro to build my portfolio
Content collections, static build, no database required — here's why Astro has become the framework I recommend for most web projects.
For years, I built websites with tools that imposed more complexity than my projects actually needed. WordPress, Craft CMS — solid environments, but ones that inevitably bring their share of infrastructure: a database to configure, a server to maintain, updates to manage. The result: slow sites, fragile to deploy, difficult to maintain over time.
Astro changed that equation.
A database isn’t always necessary
That’s the principle Astro is built on: most websites don’t need a database or client-side JavaScript to function. Content pages, portfolios, corporate sites — they are documents first and foremost, and they deserve to be treated as such.
By default, Astro generates pure HTML. No JavaScript is sent to the browser unless you explicitly ask for it. No database query at load time. On this portfolio, that translates directly into Lighthouse scores of 100 across performance, accessibility, best practices, and SEO.
The absence of a database also has a direct impact on security. A connected database is an attack surface: SQL injections, unauthorized access, data leaks. A static site has none of that to expose. There are no queries to intercept, no credentials to compromise, no administration panel accessible online. For content sites where these risks have no reason to exist, that’s a considerable advantage.
Content collections: content within the codebase
One of the features that definitively convinced me: content collections. Rather than storing content in an external database, everything lives in the repository as Markdown, MDX, or JSON files.
My portfolio projects, articles, SEO metadata — all versioned alongside the code.
This approach is a perfect fit for sites whose content evolves in a predictable way. No need for a CMS with a dashboard, user accounts, and a secure login just to publish an article or add a project.
For clients who need to update their content themselves, Astro integrates easily with popular headless CMS platforms via API: Contentful, Sanity, Storyblok, or DatoCMS. Content stays managed in a friendly interface while Astro compiles everything into static HTML at deploy time. The best of both worlds: a simple editing experience for the client, and a high-performance site for users.
Islands architecture: JavaScript only where it’s needed
For the parts of a site that require interactivity — an animation, a contact form, a search component — Astro introduces the concept of islands. These interactive components are hydrated in isolation, without weighing down the rest of the page.
Astro is also framework-agnostic on the UI side: you can integrate React, Vue, or Svelte components as needed.
Deployment without infrastructure
A compiled Astro site is a folder of static files. You can work locally with no internet connection — no remote server, no database to start up. Once you’re happy with the result, you push to the Git repository, merge the branch to production, and the deployment triggers automatically. The site is live in seconds, with no manual intervention.
You can deploy to Vercel, Netlify, or any host, with no server to configure, no database to maintain.
For the majority of projects I take on — portfolios, presentation sites, landing pages, campaign microsites, lightweight storefronts — this is exactly what’s needed. That means lower infrastructure costs, and a site that will keep working years from now without intervention.
Astro doesn’t solve every problem. For an application with authentication, real-time data, highly personalized content, or complex e-commerce, other tools are better suited. But for building a fast, maintainable, and frictionlessly deployable site — it’s my first choice today.