README

MVC::Keayl

A Model-View-Controller web framework for Raku.

Homepage: keayl.dev

MVC::Keayl is the web layer. The model layer is delegated to ORM::ActiveRecord and default view rendering to Template::HAML; both are pluggable. The HTTP server is reached through an abstract adapter, with the default adapter built on Cro.

Installation

zef install MVC::Keayl

Getting started

Scaffold a new application, then boot it:

keayl new blog
cd blog
bin/dev

keayl new writes a starter layout: config/application.json, config/application.raku, config/routes.raku with a root route, a HomeController rendering through an application layout, an assets/ directory served by the static middleware, bin/server/bin/dev/bin/test scripts, a browser spec for the home page, a META6.json, a health-check endpoint at /up, a PWA manifest and service worker, and static exception pages.

bin/dev serves the app over HTTP with the Cro adapter, defaulting to 127.0.0.1:3000. Other commands include keayl routes, keayl console, and keayl generate. See the CLI docs for the full command list.

Features

  • Request and Response wrappers over the HTTP server.

  • Rack-like middleware stack and endpoint protocol, with built-in middleware for static files, host authorization, request logging, request IDs, SSL redirection, and secure headers.

  • Abstract server adapter contract, with a Cro-based default adapter and an in-memory test adapter.

  • Routes file DSL with resourceful routes, mounts, redirects, path patterns, and URL helpers.

  • Base controller with per-request state, action dispatch, and filters.

  • Inline controller DSL through method and class traits: is before-action, is after-action, is around-action, is rescue-from, is helper-method, is layout, is protect-from-forgery, is rate-limit, is wrap-parameters, is filter-parameters, is add-flash-types, and is http-basic-authenticate-with.

  • View resolution, pluggable view handlers with a HAML handler, and view caching.

  • URL, asset, date/time, form, number, options, tag, and text view helpers.

  • Custom view helper modules from app/helpers, with an ApplicationHelper and per-controller <Name>Helper loaded into the view context and reloaded on change in development.

  • Cookie jar with signed and encrypted variants.

  • Session abstraction with cookie-backed and server-side stores.

  • Flash messages that survive one redirect.

  • CSRF authenticity tokens and forgery protection.

  • Parameter filtering to redact sensitive values from logs.

  • Transport and host security: SSL enforcement, host authorization, and secure headers.

  • Secrets resolution, credentials, and key derivation.

  • Content negotiation with MIME types, respond-to, and an API controller base.

  • Conditional GET, cache headers, fragment caching, and response streaming.

  • Application object with configuration loading, boot, and request dispatch.

  • Internationalization with locales and pluralization.

  • HTTP authentication helpers.

  • Logging, instrumentation and notifications, error reporting, and a developer exception page.

  • Background jobs with async, inline, test, and database queue adapters, plus GlobalID serialization.

  • Mailer with file, SMTP, and test delivery, previews, and a delivery job.

  • Action Mailbox for routing and ingesting inbound mail.

  • Action Text for rich text content.

  • Active Storage with services, attachments, variants, and blob serving.

  • Cable with channels, connections, in-memory and external pub/sub, and broadcasting.

  • Live streaming responses.

  • Asset pipeline with serving and asset helpers.

  • Health check and PWA controllers.

  • Mountable engines.

  • CLI with code generators and test support utilities.

Documentation

Full documentation lives at docs.keayl.dev.

License

Artistic-2.0. See LICENSE.

MVC::Keayl v0.9.1

Model-View-Controller web framework

Authors

  • Greg Donald

License

Artistic-2.0

Dependencies

Cro::HTTPCrypt::RandomDigest::HMACDigest::SHA1::NativeOpenSSLMIME::Base64YAMLishORM::ActiveRecord:auth<zef:gdonald>Template::HAML:auth<zef:gdonald>

Provides

  • MVC::Keayl
  • MVC::Keayl::APIController
  • MVC::Keayl::ActionText
  • MVC::Keayl::ActionText::Repository
  • MVC::Keayl::ActionText::RichTextable
  • MVC::Keayl::Adapter
  • MVC::Keayl::Adapter::Cro
  • MVC::Keayl::Adapter::Test
  • MVC::Keayl::Application
  • MVC::Keayl::Assets
  • MVC::Keayl::Assets::Serving
  • MVC::Keayl::CLI
  • MVC::Keayl::CSRF
  • MVC::Keayl::Cable::Broadcasting
  • MVC::Keayl::Cable::Channel
  • MVC::Keayl::Cable::Connection
  • MVC::Keayl::Cable::PubSub
  • MVC::Keayl::Cable::PubSub::External
  • MVC::Keayl::Cable::PubSub::InMemory
  • MVC::Keayl::Cache
  • MVC::Keayl::Caching
  • MVC::Keayl::Config
  • MVC::Keayl::Controller
  • MVC::Keayl::Cookies
  • MVC::Keayl::Credentials
  • MVC::Keayl::Dispatcher
  • MVC::Keayl::Endpoint
  • MVC::Keayl::Engine
  • MVC::Keayl::ErrorReporter
  • MVC::Keayl::ErrorReporting
  • MVC::Keayl::Errors
  • MVC::Keayl::ExceptionPage
  • MVC::Keayl::Flash
  • MVC::Keayl::HealthController
  • MVC::Keayl::Helpers::Asset
  • MVC::Keayl::Helpers::DateTime
  • MVC::Keayl::Helpers::Form
  • MVC::Keayl::Helpers::Number
  • MVC::Keayl::Helpers::Options
  • MVC::Keayl::Helpers::Tag
  • MVC::Keayl::Helpers::Text
  • MVC::Keayl::Helpers::Url
  • MVC::Keayl::HttpAuthentication
  • MVC::Keayl::I18n
  • MVC::Keayl::I18n::Locale
  • MVC::Keayl::I18n::Pluralization
  • MVC::Keayl::Job
  • MVC::Keayl::Job::GlobalID
  • MVC::Keayl::Job::QueueAdapter
  • MVC::Keayl::Job::QueueAdapter::Async
  • MVC::Keayl::Job::QueueAdapter::Database
  • MVC::Keayl::Job::QueueAdapter::Inline
  • MVC::Keayl::Job::QueueAdapter::Test
  • MVC::Keayl::Live
  • MVC::Keayl::LogEvent
  • MVC::Keayl::Logger
  • MVC::Keayl::Mail
  • MVC::Keayl::Mailbox
  • MVC::Keayl::Mailbox::Ingress
  • MVC::Keayl::Mailbox::Router
  • MVC::Keayl::Mailer
  • MVC::Keayl::Mailer::Delivery
  • MVC::Keayl::Mailer::Delivery::File
  • MVC::Keayl::Mailer::Delivery::SMTP
  • MVC::Keayl::Mailer::Delivery::Test
  • MVC::Keayl::Mailer::DeliveryJob
  • MVC::Keayl::Mailer::Preview
  • MVC::Keayl::Middleware
  • MVC::Keayl::Middleware::Database
  • MVC::Keayl::Middleware::HostAuthorization
  • MVC::Keayl::Middleware::Logger
  • MVC::Keayl::Middleware::RequestId
  • MVC::Keayl::Middleware::SSL
  • MVC::Keayl::Middleware::SecureHeaders
  • MVC::Keayl::Middleware::Static
  • MVC::Keayl::MiddlewareStack
  • MVC::Keayl::Mime
  • MVC::Keayl::Notifications
  • MVC::Keayl::PWAController
  • MVC::Keayl::ParameterFilter
  • MVC::Keayl::Parameters
  • MVC::Keayl::Params
  • MVC::Keayl::Request
  • MVC::Keayl::Response
  • MVC::Keayl::Router
  • MVC::Keayl::Routing
  • MVC::Keayl::Routing::Mount
  • MVC::Keayl::Routing::PathPattern
  • MVC::Keayl::Routing::Redirect
  • MVC::Keayl::Routing::Resources
  • MVC::Keayl::Routing::Route
  • MVC::Keayl::Routing::RouteMatch
  • MVC::Keayl::Routing::UrlHelpers
  • MVC::Keayl::SafeString
  • MVC::Keayl::Secrets
  • MVC::Keayl::Session
  • MVC::Keayl::Storage
  • MVC::Keayl::Storage::Attached
  • MVC::Keayl::Storage::Repository
  • MVC::Keayl::Storage::Service
  • MVC::Keayl::Storage::Serving
  • MVC::Keayl::Storage::Variant
  • MVC::Keayl::TestSupport
  • MVC::Keayl::View
  • MVC::Keayl::View::Context
  • MVC::Keayl::View::Handler
  • MVC::Keayl::View::Handler::HAML

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.