Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.

Project structure · Frontend

Astro project structure

Opens with credits

For developers building content-heavy websites (blogs, docs, society or portfolio sites) that should load fast with little JavaScript. The example is a university tech society site from the blog template: content collections for posts, events and the team, a couple of React islands, an Action-backed join form, and a few on-demand pages through the Node adapter while everything else stays static.

Curated by Tauseef FayyazBeginner164 files and foldersAstro 7.3, Node 22.12+, TypeScript 6Checked October 2026
Explore the filesPick any file to see what it is, why it exists and when you add it.

How it grows

Each stage opens the explorer there

  1. 1Day 1What the scaffold and your first hour give you47 files and folders
  2. 2GrowingWhat a real app with features and tests adds+62 files and folders
  3. ProductionWhat running it for real users adds+29 files and foldersOpens with credits
  4. ExpertWhat a team needs to keep it healthy for years+26 files and foldersOpens with credits

How it is organised

  • Static by default. Pages are prerendered at build time; only pages that need the request (account, join results, health) export `prerender = false`.
  • Ship HTML, not JavaScript. Use .astro components for everything, and make a React island only for the parts that are truly interactive, with the laziest `client:*` directive that works.
  • Content is data. Every Markdown or data file belongs to a collection in src/content.config.ts with a Zod schema, so a bad frontmatter field fails the build instead of the page.
  • Server code stays on the server. Forms call Actions, database and email code lives in src/lib, and islands never import it.
  • Environment variables are declared once in `env.schema` and read through `astro:env`, so a missing secret fails at startup and nothing secret is marked `client`.
  • Images you show go in src/assets and through `<Image />`; public/ is only for files that need a fixed URL.
  • Use one UI framework for islands. Astro can mix React, Vue and Svelte, but a team rarely benefits from paying for two.

At the top of the project

Open one in the explorer for the full story

Learn more on Sefism

Roadmaps, cheat sheets and projects that go with Astro.

See 9 more
Checked against 20 official sources, October 2026. If something has changed, the docs win.Show sources

Picked from the other libraries by shared topics.

Work with me

Stuck on something specific?

Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.

  • 1:1 Mentorship
  • Fresh Graduate Mentorship
  • Career Guidance

Brand deals, promos and partnerships: tauseeffayyaz@gmail.com