Brut aims to be a simple, yet fully-featured web framework for Ruby. It's different than other Ruby web frameworks. Brut has no controllers, verbs, or resources. You build pages, forms, and single-action handlers. You write HTML, which is generated on the server. You can write all the JavaScript and CSS you want. Here’s a web page that tells you what time it is: class TimePage < AppPage def initialize(clock:) @clock = clock end def page_template header do h1 { "Welcome to the Time Page!" } TimeTag(timestamp: @clock.now) end end end Brut is built around low-abstraction and low-ceremony, but is not low-level like Sinatra. It’s a web framework. Your Brut apps have builtin OpenTelemetry-based instrumentation, a Sequel-powered data access layer, and developer automation based on OptionParser-powered command-line apps. Brut can be installed right now, and you can build and run an app in minutes. You don’t even have to install Ruby. > docker run \ -v "$PWD":"$PWD" \ -w "$PWD" \ -it \ thirdtank/mkbrut \ mkbrut my-new-app > cd my-new-app > dx/build && dx/start > dx/exec bin/setup > dx/exec bin/dev # => localhost:6502 is waiting There’s a full-fledged example app called ADRs.cloud you can run right now and see how it works. What You Get Brut has extensive documentation, however these are some highlights: Brut’s core design is around classes that are instantiated into objects, upon which methods are called. No excessive include calls to create a massive blob of functions. No Hashes of Whatever. Your session, flash, and form parameters are all actual classes and defined data types. Minimal reliance of dynamically-defined methods or method_missing. Almost every method has documentation. Brut leverages the modern Web Platform. Client-side and server-side form validation is unified into one user experience. BrutJS is an ever-evolving library of autonomous custom elements AKA web components to progressively enhance your HTML. With esbuild, you can write regular CSS and have it inst...
First seen: 2025-07-08 18:31
Last seen: 2025-07-09 07:33