Hanami is a Ruby framework designed to create software that is well-architected, fast, testable, and secure. Created by Luca Guidi, Hanami emphasizes immutability, explicit dependencies, and modular architecture โ built around dry-rb libraries.
Hanami 2 is a complete rewrite that introduces dependency injection through dry-system, container-based applications, and a focus on small objects and clear boundaries.
Modern web framework for Ruby. Modular, fast, sustainable โ Rails alternative for the long term.
โจ Features
Group code into bounded contexts. Each slice has its own actions, views, dependencies.
Powered by dry-system. Explicit dependencies, no global state, painless testing.
Boots in milliseconds. Lazy loading means dev iteration stays fast even at scale.
CSRF, secure headers, content security policy โ wired up from the first commit.
Each HTTP action is its own class. Easy to test, easy to compose, easy to reason about.