Astro Foundations & Mental Model
The idea in one sentence
Section titled “The idea in one sentence”Astro renders your pages to HTML on the server (at build time or per request) and ships zero JavaScript by default — you opt into interactivity, island by island. Most of a content site is static; Astro treats that as the default and makes the interactive parts explicit.
Every Astro feature — islands, client directives, content collections, server islands — is a consequence of that one commitment: send the browser finished HTML, and only the JavaScript it actually needs.
What this module covers
Section titled “What this module covers”| Lesson | What you’ll learn |
|---|---|
| Why Astro & islands | The islands architecture and the zero-JS-by-default thesis |
| Project & .astro files | The project layout and the .astro component (frontmatter + template) |
| The component model | Astro components, props, slots, and scoped styles |
| Rendering & output modes | Static (SSG) vs on-demand (SSR), and how the build works |
The lens for the whole course
Section titled “The lens for the whole course”Two ideas explain almost everything Astro does:
flowchart TB html["Server-first: render to HTML (build time or per request)"] --> ship["Ship finished HTML, no JS by default"] islands["Islands: opt into interactivity per component, not per page"] --> ship ship --> fast["Fast pages, minimal JavaScript"]
- Because Astro is server-first, your components run to produce HTML — the framework code and templating never reach the browser.
- Because interactivity is opt-in via islands, a page can be 99% static HTML with one small interactive widget hydrated, instead of shipping a whole framework to run the entire page.
Hold those two and Astro’s design stops feeling like a pile of directives and starts feeling like one coherent bet.