Astro Projects Structure: Folders

Learn about the basic structure of Astro projects and explore the src, public, .astro, and dist folders.

Now that we’re familiar with the basics of Astro, let’s see what an Astro project is made of. Let’s understand the structure of our application. Some of the files and folders are specific to Astro. Let’s go through them one by one to better understand their purpose.

The src folder

The src folder holds all application-related files. This folder can hold any custom-named files or subfolders but it must contain a folder called pages. The pages folder is responsible for routing in Astro. Astro uses file-based routing, where each route is named by the file name.

This is where we can also place ...