The book/topic field was really always a general-purpose tag, and now
that notes can come from more than just books (camera-scanned pages,
free text), "book" was misleading in the UI as well as the code.
Renames files, functions, variables, the API route (/api/books ->
/api/topics), the note payload field, and the cache TTL env var
(BOOK_CACHE_TTL_MS -> TOPIC_CACHE_TTL_MS) for consistency.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C3DGg1pvmvf81zXs4pk1J7
Whole-page photos carry far more text than the one sentence someone
wants, hurting OCR accuracy and letting stray text leak into notes.
Adds a crop overlay (drag-to-select via Pointer Events, works for
touch and mouse) between capture and OCR, with a "use full photo"
escape hatch for already-tight shots. recognizeText now takes a Blob
so it accepts either the cropped canvas output or the original file.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C3DGg1pvmvf81zXs4pk1J7
Lets a photo of a book page fill in the note text instead of typing
it out. OCR runs entirely client-side (tesseract.js, dynamically
imported so it doesn't bloat the main bundle) - no server changes, no
API keys, and the photo never leaves the device. Recognized text is
appended into the textarea for the user to review/edit before saving.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C3DGg1pvmvf81zXs4pk1J7
The generated icons were solid brand-blue squares with no glyph.
gen-icons.py now procedurally draws a page/notes icon (folded corner,
text lines) with anti-aliasing, kept within the maskable-icon safe
zone so Android's adaptive-icon masks don't clip it. Also adds an
apple-touch-icon and wires favicon/apple-touch-icon links into
index.html, and marks manifest icons purpose "any maskable".
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C3DGg1pvmvf81zXs4pk1J7
Datalist suggestions are unreliably supported on mobile/PWA browsers,
so existing books/topics silently failed to show up when starting the
app on a new device. Replaced with a native <select> (plus an "add
new" option) and made the field mandatory end-to-end.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C3DGg1pvmvf81zXs4pk1J7
Notes are saved as markdown pages in a Nextcloud collective via the Collectives OCS API (page metadata/creation) and WebDAV (content read/append), following the same npm-workspaces + session-auth architecture as CityTracker.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NvmYFQSMqs2N3q2zUDNTVn