How-tos
Practical, goal-oriented guides for solving specific problems with Stario.
For narrative walkthroughs and API depth, see Tutorials, Reference, and Explanation.
Not using Datastar? Plain HTML handlers and SSE without Datastar are first-class—see The Stario way and Realtime tiles.
Start here
AI-assisted development — copy AGENTS.md, scaffold
app/features/on day one, same path for humans and agents.
Datastar (signals and forms)
Datastar: Reading and writing signals —
read_signals, validation at your boundary,SSE(w).patch_signals.Static assets and fingerprinting —
AssetManifest,StaticAssets.register,ASSETS.hrefin views.
Infrastructure and security
Authentication with cookie sessions — signed cookies and
c.state.Injecting dependencies — closures, services, and
bootstrap(database example).User uploads and storage — beyond static assets: object storage vs local files, naming, and minimal handlers.
Deployment: Containers, TLS, and safe releases —
stario serve,STARIO_*, Docker, TLS with Caddy, Unix sockets.
Local development and observability
Hot reload for local development —
stario watch, watch paths, and optional dev resync.Mapping errors to HTTP responses — async
app.on_errorand stable status bodies.Getting insights from SQLite tracer — SQL over local span data (v4 schema).
Layout and testing
Structuring larger applications — feature modules,
UrlPathconstants,register_*, handler factories.Testing with TestClient — in-process HTTP tests with
UrlPath.href().