Commit Graph
137 Commits
Author SHA1 Message Date
Tom FluxandClaude Opus 5 8338374a8d Follow the OS dark mode on the login page
The board's dark theme is a saved preference, which there is no way to
know before you're signed in, so the login page follows
prefers-color-scheme instead. Palette taken from nullboard's .theme-dark.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UU1vyTHj3uE9PJYSxRxwkU
2026-08-14 22:44:41 +01:00
Tom FluxandClaude Opus 5 00d3cb0e61 Add systemd unit, nginx config and a README
The nginx block is plain http; certbot adds the TLS server block and the
redirect itself. It sets X-Forwarded-Proto, which is load-bearing: the
app compares the browser's Origin against the URL it believes it is
serving, and without that header it thinks it is on http while the
browser says https, decides every save is cross-site and drops the
session.

Upstream's README is kept as README.nullboard.md.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UU1vyTHj3uE9PJYSxRxwkU
2026-08-14 22:41:11 +01:00
Tom FluxandClaude Opus 5 d94984cd97 Add tests for the store and the API
Rack::MockRequest with a cookie jar rather than rack-test, so the suite
needs nothing beyond the Debian packages the app already uses.

Covers key validation and batch atomicity, password hashing, the schema
version guard, auth and lockout, the storage API, and that a note
containing a closing script tag can't break out of the bootstrap block.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UU1vyTHj3uE9PJYSxRxwkU
2026-08-14 22:41:11 +01:00
Tom FluxandClaude Opus 5 7e2f280acc Store boards on the server rather than in localStorage
Adds Storage_Server next to upstream's Storage_Local and swaps which one
is instantiated; the rest of nullboard.html is untouched so upstream
changes still merge.

The Storage contract is synchronous — setItem has to return true or false
there and then — which no round trip can satisfy. So the whole keyspace
is held in memory and the server is somewhere to push it to:

  - The initial copy is embedded in the page by the server, already
    parsed and in hand before the app boots. In the page rather than a
    .js file so another site can't <script src> it and read the boards.
  - Writes are collected by key, so a note edited repeatedly is one
    write, and flushed shortly after as a single transaction. A failed
    batch goes back on the queue and retries with a backoff rather than
    being dropped.
  - The logo shows saving/not saved, and closing the tab with writes
    still queued asks first.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UU1vyTHj3uE9PJYSxRxwkU
2026-08-14 22:41:01 +01:00
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
Alex Pankratov db65363530 Extract default backup agent config into a variable of its own 2023-11-05 18:35:09 +01:00
Alexander PankratovandGitHub d6384d0522 Merge pull request #66 from rpavlik/eslint
Eslint fixes
2023-11-05 16:10:17 +01:00
Alexander PankratovandGitHub 91411d9b67 Merge pull request #87 from RageGamerBoi/master
Make site scale correctly on Mobile
2023-11-05 16:06:28 +01:00
B2server e241fb5046 Make site scale correctly on Mobile 2023-11-01 22:37:05 -05:00
Alexander PankratovandGitHub b67c2a5451 + nbagent by luismedel 2023-09-23 13:42:29 +02:00
Alexander PankratovandGitHub b4ea5a316e + link to justinpchang/nullboard-agent-express 2023-08-09 18:51:25 +02:00
Ryan Pavlik a3cc607a8d Remove trailing whitespace 2022-11-14 09:29:55 -06:00
Ryan Pavlik 478d6af8f3 Fix typos found by eslint 2022-11-14 09:29:55 -06:00
Ryan Pavlik 486747d28e Remove apparent stray brace 2022-11-14 09:29:55 -06:00
Alex Pankratov 2fcfcb624f Fix left-hand side menu back color in dark mode 2022-11-12 18:03:33 +01:00
Alex Pankratov 226dc457f3 codeVersion -> 20221112 2022-11-12 17:52:51 +01:00
Alexander PankratovandGitHub 96a8f71d48 Merge pull request #64 from rpavlik/control-hover
Be able to use Control instead of CapsLock to reveal links.
2022-11-12 17:31:05 +01:00
Alexander PankratovandGitHub 0f91f5a515 Merge pull request #65 from rpavlik/print-links
Improve print formatting
2022-11-12 17:24:23 +01:00
Alexander PankratovandGitHub a2192dc529 Merge pull request #74 from justinpchang/fix-load-list-width
Fix: Load the saved listWidth alongside fontSize and lineHeight on startup
2022-11-12 17:12:21 +01:00
Justin Chang 07b7941b31 Load list width on load 2022-11-10 12:50:04 -05:00
Justin Chang 50403323d5 Only prime note for dragging on left mouse down 2022-11-10 12:30:28 -05:00
Ryan Pavlik 963a00b37a Improve print formatting
Underline links, use grayscale, outline lists,
and turn off as much text shadow as we can.
2022-08-30 14:35:59 -05:00
Ryan Pavlik 6b0a8f65ab Be able to use Control instead of CapsLock to reveal links. 2022-08-26 14:53:29 -05:00
Alex Pankratov a50a9fabb6 Bump up codeVersion to 20220810 2022-08-10 17:19:07 +02:00
Alex Pankratov c05defba0e Customize confirm() and alert() a bit 2022-08-10 17:18:21 +02:00
Alex Pankratov a456a76aa7 Improve board import flow in case of duplicate board.id or title 2022-08-10 17:17:46 +02:00
Alexander PankratovandGitHub d2fa350a9a Merge pull request #51 from ct16k/wip-jquery-update
Update jQuery from 3.3.1 to 3.6.0
2022-08-10 15:56:36 +02:00
Alexander PankratovandGitHub 8568cda7e6 Merge pull request #61 from gf-mse/cosmetic
checkImport(): a minor fix in returned message
2022-08-10 15:48:27 +02:00
GF 7355e0300b checkImport(): a minor fix in returned message 2022-08-06 18:41:04 +10:00
Alex Pankratov 46525687c4 Fix using (just) Enter to end editing of board/list titles 2021-12-10 18:23:46 +01:00
Alex Pankratov 7781f0b2a0 add favicon 2021-12-10 17:53:00 +01:00
ct16k f2f1915fb7 update jQuery from 3.3.1 to 3.6.0 2021-11-24 12:24:07 +02:00
Alex Pankratov 723c4220cb + support for Ctrl-Enter in list and board titles 2021-10-23 15:13:51 +02:00
Alex Pankratov f803756b05 fix version # display in About 2021-08-04 12:44:59 +02:00
Alex Pankratov e709839efe add support for marking up local (file) links with 2021-08-04 12:40:53 +02:00
Alex Pankratov d63251f975 Merge branch 'master' of github.com:apankrat/nullboard 2021-08-04 12:05:11 +02:00
Alex Pankratov f40c242109 disable user-select on <body> when dragging notes 2021-08-04 12:05:04 +02:00
Alexander PankratovandGitHub 15da6226d3 Update README.md 2021-04-26 20:17:35 +02:00
Alexander PankratovandGitHub 3abbdd5b1e + auto-backup mention and link to the /backups page on nullboard.io 2021-04-26 20:15:02 +02:00
Alex Pankratov 4ba5bb43c0 codeVersion -> 20210426 2021-04-26 20:08:10 +02:00
Alex Pankratov 41e519a362 + runPendingBackups 2021-04-25 20:33:33 +02:00
Alex Pankratov 6fb8729a0d ready for runPendingBackups 2021-04-25 16:37:15 +02:00
Alex Pankratov 66b63b900e bugfixes 2021-04-25 16:30:17 +02:00
Alex Pankratov 438d3ef39f keep backupStatus of the app's config 2021-04-25 16:04:11 +02:00
Alex Pankratov 850a16acfd serialize requests in BackupStorage 2021-04-25 14:37:57 +02:00
Alex Pankratov 9923868e56 change BackupStorage.checkStatus to re-use put/config 2021-04-22 16:32:02 +02:00
Alex Pankratov f5c23e6a68 codeVersion -> 20210419 2021-04-19 18:17:07 +02:00
Alex Pankratov 147f3f3c0b backup config verification, pt 3 2021-04-19 17:52:26 +02:00
Alex Pankratov eb2c2a2fbc backup config verification, pt 2 2021-04-19 13:09:04 +02:00
Alex Pankratov 70eaf3a06e backup config verification, pt 1 2021-04-19 11:49:23 +02:00