Getting startedProject structure

Project structure

What create-smoodly-app puts in your project, and which files you change as you build the site. Everything is ordinary code in your repository; Smoodly adds a folder of setup and mounts the admin.

View as Markdown

The files

A single-language Lorem Co. site:

my-site/
├── astro.config.ts           the integration: smoodly() mounts the admin, the preview and the pages
├── src/
│   ├── layouts/Layout.astro  the site's document: head, header, footer
│   ├── page-types/           one .astro file per page type, by its name
│   ├── sections/             one .astro file per section
│   ├── elements/             one .astro file per element richtext may embed
│   ├── entry-pages/          one .astro file per collection with a path
│   ├── components/           every schema (Name.schema.ts) and the starter's helpers
│   ├── smoodly/              the Smoodly setup
│   ├── live.config.ts        Smoodly's content as live collections
│   ├── strings.ts, messages/ the starter's fixed UI text
│   └── styles/global.css
├── scripts/seed.ts           the starter content, written from code
├── public/images/            the starter's photos
└── .env                      the space's values

A multilingual site adds i18n to astro.config.ts, with the same locales as src/smoodly/config.ts; the site checks that they agree when it starts. The root holds the usual package.json and tsconfig.json, plus a README.md, and an AGENTS.md for coding agents that CLAUDE.md points to.

The website

There are no route files. smoodly() in astro.config.ts serves the pages at every address a page file of your own under src/pages/ does not take. It also mounts the admin at /admin, and the preview address editors see the canvas through. src/pages/404.astro is yours: the site's "not found" page.

To serve the admin somewhere other than /admin, see The admin.

Your components

This is where you spend your time, in every framework.

Each section, element and page type is two files. src/components/…/Name.schema.ts holds the schema (the fields editors fill). A view named after the schema holds the markup: src/sections/hero.astro renders the section named hero.

src/page-types/One view per page type: which zones it renders and where. Lorem Co. has home, page, articlesIndex and newsIndex.
src/sections/One view per section editors place in zones: hero, points, quote and the rest. The header and footer are sections too.
src/elements/One view per element editors insert inside richtext, like callout and cta.
src/entry-pages/One view per collection with a path: articles and news.

A new section is its schema under src/components/sections/, the schema in src/smoodly/sections.ts and in the zone of each page type that may hold it, and its view in src/sections/. The site names a schema with no view, and a view with no schema, at the first request. Sections shows how.

The Smoodly setup

src/smoodly/config.tsThe registry and settings: the schemas of page types, sections, collections and globals, plus locales, time zone and styles, in one defineConfig(). It imports no view.
src/smoodly/sections.tsThe list of section schemas the config registers.
src/smoodly/collections.tsCollections such as articles and people.
src/smoodly/globals.tsGlobal content such as the header and footer.
src/smoodly/elements.tsThe list of element schemas richtext may embed.
src/smoodly/toolsets.tsWhat each richtext field offers.
src/live.config.tsOne loader per collection, global item, the pages and the page tree. Your views read through getLiveCollection and getLiveEntry.

You edit all of them as the site grows. There is no file of wiring: the integration in astro.config.ts reads the config and finds the views by their file names.

scripts/seed.ts is how the starter's content got there: a script that writes pages and entries under the same rules as the admin. Content from code shows how to write your own.

Next, make your first page.

Edit this page on GitHubLast updated 16 Oct 2026