Files
Tom FluxandClaude Opus 5 2ae11e8d1e Add a Sinatra server that keeps boards in SQLite
Nullboard's storage layer bottoms out in getItem/setItem/delItem over
string keys, with boards, revisions and undo history all modelled on top
of them client-side. So the server needs to be nothing more than a
key/value store, and it doesn't parse a board anywhere.

One password, bcrypt-hashed, in the same database as the boards. The
session secret lives there too, so restarting the service doesn't sign
you out and the secret never has to exist in the unit file or in git.

Until a password is set every route returns 503 pointing at
bin/validboard-passwd. A first-run setup page would be friendlier, but it
would also hand the board to whoever found the URL first.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UU1vyTHj3uE9PJYSxRxwkU
2026-08-14 22:40:51 +01:00

20 lines
604 B
Ruby

# frozen_string_literal: true
#
# On Debian/Ubuntu the dependencies are all packaged, and that is how the
# systemd unit runs — no bundler involved:
#
# apt install ruby-full ruby-sqlite3 ruby-sinatra ruby-bcrypt \
# ruby-rack ruby-rack-protection ruby-json puma
#
# This Gemfile is here for anyone who'd rather use bundler, and to pin the
# versions the code was written against. Sinatra 4 moved sessions around, hence
# the ~> 3.0.
source 'https://rubygems.org'
gem 'bcrypt', '~> 3.1'
gem 'puma', '~> 6.0'
gem 'rack', '~> 2.2'
gem 'sinatra', '~> 3.0'
gem 'sqlite3', '~> 1.4'