Mastery ๐¶
Checkmate.
Thirty minutes ago you had never seen Heaven. You now know the whole framework โ not a useful subset of it, the whole thing.
What you know¶
flowchart LR
A["<b>3 objects</b><br/>req ยท res ยท ctx"] --> B["<b>1 signature</b><br/>(req, res, ctx)"]
B --> C["<b>2 registrations</b><br/>app.GET ยท app.schema.GET"]
C --> D["<b>2 interception points</b><br/>BEFORE ยท AFTER"] Everything else is a detail hanging off those four ideas:
- Routing is
app.METHOD(path, handler), with:params,*wildcards, and typed query strings. - Middleware is a
BEFOREorAFTERhook โ the same function shape as a handler. - Validation is a
TypedDictregistered on the sidecar, which also writes your API docs. - State is
app.keep()for the process andctxfor the request. - Testing is
app.earth, in-process, returning the same three objects.
Where to go next¶
-
Reference
API Reference โ every method, one page Performance โ benchmarks, honestly reported Recipes โ auth, pagination, real patterns
-
Operations
Going to Production โ headers, CSP, secrets Plugins โ extending Heaven Marketplace โ community plugins
Before you ship¶
The production checklist is short and each item exists because it bites people. The two that matter most:
Leave debug off, and let your proxy serve static files
Debug mode serves tracebacks to clients, so keep it to development. app.ASSETS() is safe to leave mounted, but a proxy or CDN will serve those files faster. Both are covered in Security and Templates & Assets.
Contributing¶
Heaven is small enough to read in an afternoon โ roughly 2,400 lines across fifteen modules. That is by design, and it means a first contribution is genuinely approachable.
Star the repo, file an issue, or open a PR โ
"Simplicity is the ultimate sophistication." โ Leonardo da Vinci
May your response times be low and your uptime high. โก