Reactive web pages in Ruby

Mayuisaliveupdatingserver-siderenderingwebframeworkwritteninRuby

Interactive web apps without JavaScript

  • Use Haml for markup, Ruby for logic.
  • All code runs on the server.
  • All HTML is rendered on the server.
  • DOM-patches are streamed to the browser.

How does it work?

  • Mayu implements a Virtual DOM in Ruby.
  • All DOM updates are streamed to a small browser runtime that takes care of patching the DOM.
  • Event handlers run on the server.

Efficient

  • HTTP/2 Streams with compression and MessagePack.
  • Designed to be deployed on the edge.
  • Pages are interactive immediately on FCP.
  • Prometheus-endpoint for real-time metrics.

Developer friendly

  • Hot reloading updates the page as soon as you save.
  • Asynchronous code without async/await or promises.
  • Ruby and Haml are really nice languages to work with.

Interactivity

This text was rendered on the server at 2024-11-21 05:21:03 UTC.

The counter below was also rendered on the server. The only JavaScript required to make it interactive is a small runtime that makes a connection to the server and updates the DOM whenever the state changes on the server.

7
Show source

Loading…

Server time

This clock is being rendered on the server.

It shows the current UTC-time.

Show source

Features

Here's a list of core features:

  • 100% Server Side
  • 100% Async
  • Haml-based components
  • CSS-modules
  • Automatic asset handling
  • Hot-reloading in development
  • … and much more!

Read more on GitHub