Project Structure

This is what create jaf writes.

Four folders carry the meaning: pages/ is your site, config/ is settings, src/ boots the app, and llm/ teaches your coding assistant.

my-app
skills/

Select a file to see what it is for

There is no public/ folder by default.

Add one when you have static assets - Vite serves its contents from the site root, unchanged.

Pages Directory

The pages/ folder is where your routes live.

Each .html file becomes a route:

  • pages/index.html becomes /
  • pages/about.html becomes /about
  • pages/blog/index.html becomes /blog
  • pages/blog/[slug].html becomes /blog/:slug (dynamic route)

Only .html files are routes. Anything else you keep in pages/ - stylesheets, images - is left alone.

Layouts

Any layout.html file wraps all pages in that directory and subdirectories.

Use <slot /> to specify where child content appears.

Components Directory

Shared components live in pages/components/.

They're auto-discovered by filename, so you can use them anywhere without explicit import statements.

If you have duplicate names, you will get a warning at build time, so you can choose your preferred one.

To keep them somewhere else, set componentsPath in your config.

Configuration

config/jaf.config.js is optional.

Add settings when you want to change defaults - routing, file locations, build settings, or plugins etc.

That path is fixed: config/jaf.config.js, with a .js extension. A jaf.config.ts, or the same file at the project root, is not picked up.