class

Finfry::Web

Inherits Reference < Object

The web UI: a small multi-page app over the same App/Store the CLI uses. Pages are server-rendered (ECR) from the query layer; every write is a form POST that runs the matching command through App#execute — so the account policy, balance guards and undo journal apply exactly as on the command line — then redirects with the command's own output as a note. A few lines of JS let the due and reconcile pages save a toggle without a round trip, but every action works with JS off.

Local-only by design: it binds 127.0.0.1 and has no authentication.

Constants

DEFAULT_HOST = "127.0.0.1"
DEFAULT_PORT = 4747
DEV_JS = {{ read_file("/tmp/tmp.dKDNgG/src/src/finfry/web/dev.js") }}
DEV_NOTES = "dev/ui-notes.md"

Where serve --dev appends UI notes picked in the browser.

FLASH_COOKIE = "finfry_flash"
SCRIPT = {{ read_file("/tmp/tmp.dKDNgG/src/src/finfry/web/app.js") }}
STYLE = {{ read_file("/tmp/tmp.dKDNgG/src/src/finfry/web/style.css") }}

Assets are baked into the binary so finfry serve stays self-contained.

Constructors

new(store : Store, host : String = DEFAULT_HOST, port : Int32 = DEFAULT_PORT, dev_notes : String | Nil = nil)

dev_notes enables the in-page note picker and names the file it appends to (see web/dev.js); nil serves no dev tooling at all.

Source

Instance methods

handle(ctx : HTTP::Server::Context) : Nil

Route one request. Public so specs can drive it without a socket.

Source
run

Serve until interrupted. Yields the URL once bound, before listening.

Source

Nested types