Project layout

Project layout

An ALB'DO app is a config file, a src/ directory of components, and a public/ directory of static files. There is no server directory: the server is the binary.

What albedo init writes

my-app/
├── albedo.config.ts     configuration — and the backend: data, sign-in, email
├── tier-budget.toml     per-route ceilings that `albedo build` enforces
├── package.json         scripts, and dev-only packages (TypeScript)
├── tsconfig.json        TypeScript settings for your editor and `tsc`
├── .gitignore           keeps everything the app writes at run time out of git
├── public/              static files, served as they are
└── src/
    ├── albedo-env.d.ts  types for JSX and the framework's functions
    ├── styles.css       the global stylesheet
    ├── components/
    │   ├── Hero.tsx     a component with no state (Tier A)
    │   └── Counter.tsx  a component with local state (Tier C)
    └── routes/
        ├── layout.tsx   wraps every route
        ├── index.tsx    /
        ├── guestbook.tsx     /guestbook
        ├── sign-in.tsx       /sign-in
        └── room/[id].tsx     /room/lobby, /room/anything

The pieces

albedo.config.ts

One default-exported object. root names the source directory, server the address the server binds, and the blocks after that declare the backend: forge for data, auth for accounts and sign-in, email for mail. The file init writes explains every block in comments.

Secrets are never written into it. A key is declared as { env: "RESEND_API_KEY" } and read from the environment when the server starts.

src/routes/

Every file here is a URL. Routing has the rules; the short version is that guestbook.tsx serves /guestbook, and layout.tsx wraps the routes beside and below it.

src/components/

Components that are not routes. Nothing about this directory is special — a route imports from it with an ordinary relative import. The compiler decides each component's rendering tier wherever it lives.

src/styles.css

Every plain .css file under src/ is inlined into the pages it reaches. Outside routes/ that is every page; inside it, only the pages in that directory. Styling has the details.

public/

Served at the site root as they are: public/fonts/body.woff2 is /fonts/body.woff2. Fonts, images, robots.txt.

package.json and tsconfig.json

For your editor, and for type-checking with npm run typecheck. albedo build compiles your TypeScript but does not type-check it, so run that as well — in CI if nowhere else.

What the app writes as it runs

PathWhat it is
forge.db (and -shm, -wal)The database. One file, beside the config unless ALBEDO_FORGE_DB moves it
.albedo/Build output and generated types — .albedo/forge.d.ts types your collections
uploads/Uploaded files, if the app declares upload buckets
.albedo-acme/The Let's Encrypt account key and certificates, when serving with --domain

All four are in the generated .gitignore. The database and the certificate cache hold data you do not want in version control; keep them that way.

Next: how files become URLs.