[feat](trx-frontend-http): add BookmarkStore backed by pickledb

Add pickledb and dirs dependencies. Introduce BookmarkStore wrapping
PickleDb behind Arc<RwLock<>> with list/get/insert/upsert/remove ops.
Keys stored as "bm:{id}" in ~/.config/trx-rs/bookmarks.db; falls back
to ./bookmarks.db when config dir is unavailable.

Wire BookmarkStore into build_server() as actix-web app_data so all
request handlers can share the store.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
2026-03-01 19:16:50 +01:00
parent 31238098ca
commit 34f6b42330
4 changed files with 114 additions and 0 deletions
@@ -23,3 +23,5 @@ futures-util = "0.3"
bytes = "1"
rand = "0.8"
hex = "0.4"
pickledb = "0.5"
dirs = "6"