Writes Lauren guards, interceptors, and middlewares. Covers @guard, can_activate, ExecutionContext, @interceptor, intercept/CallHandler, @middleware() (parentheses required), dispatch/call_next, use_guards, use_interceptors, use_middlewares, set_metadata, propagate_metadata, and WebSocket guards via WsConnectionContext. Use when protecting routes, transforming responses, or adding cross-cutting logic to a Lauren app.
Adds signed-cookie sessions to a Lauren app. Covers sessions=SessionConfig(...), session: Session injection, request.state.session, SessionStore backends (InMemorySessionStore, SignedCookieSessionStore, Redis), secure cookie defaults, regenerate_id()/invalidate(), rolling/idle expiry, secret rotation, and the SessionConfigError startup checks. Use when persisting per-client state across requests (carts, flash messages, the authenticated user id).
Implements an in-memory session store with cookie-based session IDs in Lauren. Use when you need server-side session state without a JWT or external cache.
Writes Lauren controllers with route handlers, typed extractors, and auto-serialization. Covers @controller, @get/@post/@put/@patch/@delete, Path/Query/Header/Cookie/Json/Form/Bytes extractors, field descriptors, pipes, all return-type patterns, propagate_metadata, and reflect_routes/get_all_routes. Use when adding routes, extractors, or HTTP handlers to a Lauren app.
Tests Lauren apps with TestClient (sync) and httpx.AsyncClient (async). Covers conftest setup, env vars before imports, app startup, mock providers, common assertion patterns, e2e multi-backend testing, and Hypothesis property tests. Use when writing unit, integration, e2e, or property tests for a Lauren app.
Writes Lauren SSE endpoints with EventStream/ServerSentEvent and WebSocket gateways with ws_controller/on_connect/on_message/on_disconnect/BroadcastGroup. Use when adding real-time streaming or bidirectional communication to a Lauren app.
Scaffolds and builds Lauren Python web framework applications. Covers LaurenFactory.create(), the @module system, project file layout, and wiring everything together. Use when creating a new Lauren project, setting up AppModule, or understanding how Lauren's startup phases work.
Provides copy-paste complete Lauren framework patterns for the most common production scenarios. Covers authenticated CRUD endpoints, health check module, background job with lifecycle hooks, and typed SSE streaming. Use when scaffolding a new feature or when a complete working example is needed rather than API reference.