Ruflet is a Ruby port of Flet for building web, desktop, and mobile apps in Ruby.
Class-based apps are the recommended and documented standard:
class MyApp < Ruflet::App- implement
def view(page)
- Install mobile client app from releases:
- Ruflet Releases
- Install latest Android APK or iOS build.
- Install Ruflet CLI from RubyGems:
gem install ruflet_cli- Create and run your first app:
ruflet new my_app
cd my_app
bundle install
ruflet run main.rbCLI output after creation:
Ruflet app created: my_app
- Open Ruflet mobile client and connect:
- Enter URL manually, or
- Tap
Scan QRand scan QR shown byruflet run ...
Ruflet is split into packages:
ruflet: core runtime (includes protocol + UI)ruflet_server: WebSocket runtime (Ruflet.runbackend)ruflet_cli: CLI executable (ruflet)ruflet_rails: Rails integration/protocol adapter
Monorepo folders:
packages/rufletpackages/ruflet_serverpackages/ruflet_clipackages/ruflet_rails
ruflet new <appname> generates a Gemfile using RubyGems dependencies:
gem "ruflet", ">= 0.0.2"gem "ruflet_server", ">= 0.0.2"
It does not add ruflet_cli to app dependencies.
That keeps CLI global/tooling-level and app deps runtime-focused.
Use class-based apps:
require "ruflet"
class MyApp < Ruflet::App
def view(page)
page.vertical_alignment = Ruflet::MainAxisAlignment::CENTER
page.horizontal_alignment = Ruflet::CrossAxisAlignment::CENTER
page.title = "Hello"
page.add(text(value: "Hello Ruflet"))
end
end
MyApp.new.runWidget builders are global/free helpers (text, row, column, container, etc.).
Use page only for runtime/page operations (add, update, go, show_dialog, pop_dialog).
ruflet new <appname>
ruflet run [scriptname|path] [--web|--mobile|--desktop]
ruflet build <apk|ios|aab|web|macos|windows|linux|zip>By default ruflet build ... looks for Flutter client at ./ruflet_client.
Set RUFLET_CLIENT_DIR to override.
cd /Users/macbookpro/Documents/Izeesoft/FlutterApp/ruflet
/opt/homebrew/opt/ruby/bin/bundle install- Creating New App
- Widgets Guide
- Example apps: main.rb, solitaire.rb, calculator.rb