Documentation
Avelon
One place for each kind of thing. Search a name, then open the guide or the package README.
Getting startedAn app from an empty folder: routes, a controller, a write, a test.
CLI
15 names
CLI
reeveBare reeve opens a TUI; arguments skip it.
REPL
reeve tinkerabout
reeve aboutroute list
reeve route:listmigrate
reeve migrateMigrations are driver-owned.
seed
reeve db:seedpublish stubs
reeve stub:publishEjects generator templates.
make model
reeve make:model -mfcpwAdds a policy and a ward.
make controller
reeve make:controller --resourcemake request
reeve make:requestmake policy
reeve make:policymake errand
reeve make:errandmake listener
reeve make:listener --queuedmake auth
reeve make:authnew project
create-avelonD19 packaging; copy examples/gazette until the scaffolder exists.
HTTP
10 names
web routes
routes/web.tsSource of truth; codegen is one-way.
resource routes
Route.resourceSeven REST actions.
route binding
.bind(param, Model)A miss is 404 before your code runs.
controllers
app/Http/ControllersTypeScript classes in a fixed directory.
form requests
app/Http/RequestsZod parse plus an authorize hook.
middleware
app/Http/MiddlewareKernel runs aliases, including auth.
serializers
app/Http/ViewsModels never cross the view boundary.
views
view(ref, props)Opaque view references; the adapter renders.
route helper
route(name, params)From the generated manifest.
writes
generated server actionsWrites leave the GET URL (D9).
Data
14 names
models
Scrivener (@avelonjs/orm)Produces Query IR; never a vendor builder.
query IR
Query IRDrivers compile it. Semantics are frozen.
transactions
DB.transactionMissing on drivers with transactions: false.
row access
WardsDeclared once, enforced as IR and as RLS.
soft deletes
softDeletesfillable
static fillablecasts
static castseager load
with() → RelationLoadEager loads are explicit IR.
paginate
paginate()Count mode plus a page of rows.
findOrFail
findOrFailRaises NotFound, mapped to 404.
lifecycle hooks
ModelLifecycle eventsmigrations
driver-owned migrationsplan, apply, rollback, status (D13).
factories
assay defineFactoryseeds
database/seedsAuth and authorization
7 names
policies
PoliciesMay this actor perform this action.
gate
Gatecan and authorize.
row access
WardsWhich rows may this actor reach.
identity
identity driver + reeve make:authsocial login
social driverAPI tokens
tokens driver (Signet)current user
Auth.user() / Gate.actor()Never call the identity vendor from app/.
Async work
8 names
background work
ErrandsThree delivery modes: sync, after, queued.
queued delivery
delivery: 'queued'drain worker
reeve errand:workDrain-and-exit on serverless.
failed jobs
reeve errand:failedevents
Events / ListenersSync and ordered by default (D16).
notices
Notices + notifications drivermail
@avelonjs/resendMail driver; vendor stays in config.
queue dashboard
VigilNamed, not built.
Frontend and runtime
7 names
pages
RSC via @avelonjs/nextNext is the first adapter, not the core.
bundler
Next bundlerTailwind
Tailwind 4No bundled UI kit (D20). reeve ui:install is opt-in.
files
storage driverSigned uploads are deferred (D28).
cache
cache contract + fakev1 ships the contract and a fake.
realtime
PealNamed, not built.
local serve
bun + next devNode is the default deployed runtime (D27).
Tooling and packaging
15 names
package manager
bun / npm @avelonjsThe framework is a dependency (D19).
formatter
PrettierShipped config. Formatting is not a decision.
tests
bun test + Assaytypecheck
tsc strictplus noUncheckedIndexedAccess.
architecture lint
BailiffOpinions in a linter, not a README.
service registry
typed registry + providersNo IoC container (D17).
providers
providers listed in configD18. Explicit, tree-shakeable.
facades
capability-narrowed facadesMissing methods are compile errors.
config
config/ + avelon.config.tsVendor names only in config and drivers.
local environment
HearthThe local environment name.
admin panel
MootNamed, not built.
introspection
LanternNamed, not built.
feature flags
BannerNamed, not built.
search
search contract + fakepayments
payments contract + fake