MVC::Keayl
Every page of the MVC::Keayl manual, in reading order.
- Overview The latest version of this documentation lives at https://docs.keayl.dev/.
- Application & configuration MVC::Keayl::Application ties together the router, middleware stack, and configuration, runs initializers at boot, and builds the endpoint that serves...
- Command-line interface bin/keayl drives an application from the shell. It is a thin dispatcher over MVC::Keayl::CLI, where each command is a plain function, so the same behavior...
- Request MVC::Keayl::Request is a read-only wrapper around a single incoming HTTP request. The server adapter builds one per request from the raw method, target,...
- Response MVC::Keayl::Response is a mutable builder for a single outgoing HTTP response. Controllers and middleware set the status, headers, and body on it; the...
- Middleware MVC::Keayl processes a request through a stack of middleware wrapped around a single innermost endpoint. The model mirrors Rack: each middleware receives...
- Server adapters A server adapter bridges a concrete HTTP server to the framework. Its one job is the abstract contract: a request comes in, a status / headers / body go...
- Routing Routes are declared in config/routes.raku with a declarative DSL. A routes block builds a router that maps an incoming method and path to a controller...
- Engines An engine is a self-contained application packaged to mount inside a host. It carries its own routes, controllers, view paths, and initializers under an...
- Controllers A controller is a subclass of MVC::Keayl::Controller. Each public method is an action. The framework builds one controller instance per request,...
- Views MVC::Keayl::View renders templates. It resolves a template by name, format, and handler, compiles it through a pluggable handler, and caches the result....
- View helpers View helpers build HTML. They return SafeString values, so their markup is not re-escaped when emitted with !=. In templates they are called as bare...
- Asset pipeline The asset pipeline fingerprints assets with a content hash, records the mapping in a manifest, and resolves the view helpers through it so a changed asset...
- Internationalization MVC::Keayl::I18n is a translation and localization backend. It loads locale files into one store, looks up translations by dotted key, interpolates and...
- Content negotiation MVC::Keayl::Mime is the format registry. mime-type maps a format to its MIME type and mime-format maps a type (ignoring parameters and aliases) back to a...
- Cookies MVC::Keayl::Cookies is the cookie jar. A controller exposes it as cookies, built from the request's Cookie header and flushed to the response as...
- Sessions MVC::Keayl::Session is the per-request session. A controller exposes it as session, loaded from a store at the start and persisted after the action runs....
- Flash The flash carries short messages across a redirect. It is stored in the session, so it needs a session store. A controller exposes it as flash.
- CSRF protection Cross-site request forgery protection checks that an unsafe request carries a token that was issued to the current session. Enable it on a controller with...
- Parameter filtering MVC::Keayl::ParameterFilter redacts sensitive parameters so they are safe to log. It replaces the value of any matching key with [FILTERED], recursing...
- Transport & host security Three middleware harden requests in transit. Add them to the middleware stack.
- HTTP authentication MVC::Keayl::Controller provides the three ActionController::HttpAuthentication schemes as controller helpers: Basic, Token, and Digest. The parsing,...
- Secrets MVC::Keayl::Secrets resolves the application secret and derives the keys used for signing and encryption.
- Encrypted credentials MVC::Keayl::Credentials stores secrets in an encrypted file checked into the repository, decrypted at runtime with a master key kept out of it. The file...
- Caching & streaming fresh-when sets validators on the response and renders a 304 Not Modified when the request's If-None-Match/If-Modified-Since show the client already has...
- Live streaming & SSE A live action writes a response body incrementally instead of returning it all at once. It is the push counterpart of the pull-based stream primitive: the...
- Mailer MVC::Keayl::Mailer builds email the way a controller builds a response: an action renders HAML views into the parts of a message, and a delivery method...
- Background jobs MVC::Keayl::Job runs work either now or later. A job subclass implements perform, and the framework runs it synchronously or hands it to a queue adapter...
- WebSockets MVC::Keayl::Cable is an ActionCable-style abstraction for real-time messaging: a connection holds a client, channels group its subscriptions, and a...
- Action Mailbox Action Mailbox routes inbound email into mailbox classes. A raw message enters through an ingress, becomes an inbound-email record with a processing state...
- Active Storage Active Storage attaches files to model records through a pluggable storage service. Blob and attachment records hold the metadata, a service stores the...
- Action Text Action Text adds rich-text content to a model. Content is stored as sanitized HTML against an allowlist, edited through a Trix editor, rendered with...
- Logging The framework writes one line per request: the method, path, controller action, status, total duration, action and view timings, and the request...
- Instrumentation MVC::Keayl::Notifications is a pub/sub bus modeled on ActiveSupport::Notifications. The framework instruments the points it controls, subscribers receive...
- Error reporting An unhandled error from a controller action becomes a 500. What the response shows depends on the environment, and every such error is offered to the...
- Health checks & PWA The framework ships two small controllers that a generated app wires up by default: a health-check endpoint for uptime monitors and load balancers, and a...
- Test support MVC::Keayl::TestSupport drives requests through an application in-process and asserts on the result, with helpers for routing, controllers, mailers, jobs,...