rubbs is an in-house Ruby gem for building Telnet BBS servers — from a one-screen line prompt to a full Synchronet-style multi-window application, all in Ruby. It powers our BBS Server.
Info, Form, MasterDetail, Stream (chat / log), opened imperatively or from a window DSL.synchronet, nortoncommander, dosnavigator, neumanntronics, mono), each a frozen role-name → ANSI palette, overridable per key.BBS::Store: a thread-safe, upsert-by-session_id CSV file with an in-memory cache.The gem is named bbs. It boots a TCP listener, handles Telnet negotiation, hands each connection a Session, and gives you three layers to build on. Your code declares only screens, windows and services.
require 'bbs'
BBS.configure do |c|
c.flow = BBS::Flow.define do
big_banner 'My BBS'
ask :name, prompt: 'Your name'
say 'Welcome!', style: :success
end
end
BBS.start
Connect with telnet localhost 2323.
| Layer | What it is | When to use |
|---|---|---|
BBS::Flow |
Line-oriented declarative dialogue (ask / say / menu / persist) | Login, registration, simple wizards |
BBS::TUI |
Single-screen page router with frame-buffer delta rendering | Single-purpose full-screen UIs |
BBS::Application |
Widget framework: Menubar, Window, Button, TextInput, ListBox, … | Multi-window Synchronet-style BBSes |
They mix in one session — typically Flow for login, then Application for the main shell. Inside a flow you can hand off and return when the user exits.
TCPServer → Session → FlowRunner ─┬→ TUIRunner
├→ Application#run
└→ FlowRunner (sub-flow)
gem 'bbs', git: 'https://git.teletypegames.org/engines/rubbs.git'
Our public BBS Server (games.teletype.hu:2323) runs on rubbs. The gem provides the ANSI interface, menubar, stacked modal windows, Telnet server and mouse support; the bbs-server repo holds only Teletype-specific configuration — service wiring, window definitions, formatters.
| File | Responsibility |
|---|---|
lib/bbs.rb |
Public surface: BBS.configure, BBS.config, BBS.start. |
bbs/server.rb |
TCP accept loop, one thread per client. |
bbs/session.rb |
Telnet negotiation, mouse enable/disable, idle timer. |
bbs/telnet.rb |
Telnet protocol, key parsing, xterm SGR mouse. |
bbs/flow.rb, bbs/flow_runner.rb |
Flow DSL + interpreter. |
bbs/tui.rb, bbs/tui_runner.rb |
Page router with frame-buffer rendering. |
bbs/frame_buffer.rb |
Double-buffer, delta diff, ANSI string utilities. |
bbs/application.rb |
Widget event loop, window stack, builder DSL. |
bbs/widgets.rb, bbs/widget.rb, bbs/container.rb |
Widget tree + built-in widgets. |
bbs/window.rb, bbs/windows/* |
Window + pre-built window types. |
bbs/theme.rb |
Style palette presets. |
bbs/markdown.rb |
Markdown → ANSI line renderer. |
bbs/store.rb |
Thread-safe cached CSV upsert. |
https://git.teletypegames.org/engines/rubbs