Lauren logoLauren
← Home
Export this page

Core Concepts

Lauren's mental model is small but explicit. Master these six concepts and the rest of the framework is just composition:

📦 Modules — The unit of dependency visibility. Imports, exports, and the boundary that keeps large codebases honest.

🔀 Controllers — Class-based HTTP route groups. Constructor injection, decorator metadata, automatic request scoping.

💉 Injectables & Providers — Three scopes, Protocol binding, multi-bindings, and list[T] injection that stays type-correct everywhere.

🗺 Class Inheritance Rules — Lauren's strict opt-in inheritance model and why subclassing never silently turns a class into a controller.

Lifecycle Hooks@post_construct and @pre_destruct in topological order, with timeouts and best-effort teardown.

Request & Response — Immutable response builders, typed State and AppState, and the auto-serialization rules.

The mental model in one diagram

Mermaid Diagram
Scroll to explore

Rendering diagram...

Initializing Mermaid renderer...

Everything in the Startup column is validated and frozen. Everything in the Runtime column is allowed to be hot-path-fast because it never has to ask "is this configured correctly?" — that question was answered at boot.