Quickstart
Four commands take you from nothing to a production server: init, dev, build, serve.
Create an app
albedo init my-appThis writes a working starter into my-app/: four routes, a database with two collections, password sign-in, and one component at each rendering tier. Nothing is installed; the project is ready to run.
Run it
cd my-app
albedo devThe development server starts on http://127.0.0.1:3000 — the server block in albedo.config.ts sets the address. Save a file and it rebuilds and reloads the page.
Open /guestbook in two tabs and sign it in one. The other tab updates without a refresh and without any code in the page asking it to: the list is a live collection.
Build it
albedo buildThe build compiles every component and prints the tier it was given and why:
A Hero no hooks, no async, no IO, no side effects - static markup
B Guestbook state escapes this client - server-owned, no component JS
C Counter hooks + a client-satisfiable handler - ships a client islandThat listing is the answer to "what does this page send to the browser". Only C components ship their own JavaScript. Rendering tiers explains the three letters.
albedo build fails on anything albedo serve would refuse to run, so a green build is one that will boot.
Serve it
albedo serveserve builds and then runs the production server on the built output. It is the same binary and the same server you deploy — Deploy covers packaging it, and HTTPS.
Commands
| Command | Does |
|---|---|
albedo init <name> | Creates a new app in a new directory |
albedo dev | Runs the development server; rebuilds on save |
albedo build | Compiles for production and prints every component's tier |
albedo serve | Builds, then runs the production server |
albedo ship --target <binary|docker|fly> | Packages the app for a deploy target |
albedo doctor | Reports what the compiler decided about each route, and why |
albedo budget | Checks the build against tier-budget.toml |
albedo email test <address> | Sends one real message through your email provider |
Every command after init takes an optional project directory; without one it uses the current directory.