Note taking app with sync to a wiki / md
Find a file
Claudio Schaad 366d43a13c Detect the page number from the scanned photo
After the cropped text is recognized, run a second OCR pass on the full,
uncropped photo (the crop usually cuts off the header/footer) and look
for a printed page number in the outermost lines: a standalone number
("42", "- 17 -"), a labelled one ("Seite 128", "p. 12"), or a number at
either end of a short running header on the first line.

The result fills the Page field only if it is still empty, with a hint
asking the user to check it. Failures are silent; the user can still
type the page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 15:27:49 +01:00
client Detect the page number from the scanned photo 2026-11-06 15:27:49 +01:00
server Support running behind a TLS-terminating reverse proxy 2026-11-02 17:10:50 +01:00
shared Rename Book to Topic throughout the app 2026-08-27 18:55:51 +02:00
.env.example Support running behind a TLS-terminating reverse proxy 2026-11-02 17:10:50 +01:00
.eslintrc.json Scaffold Reading Notes app: React/Vite PWA client, Express server with Nextcloud Collectives integration 2026-08-26 20:07:40 +02:00
.gitignore Scaffold Reading Notes app: React/Vite PWA client, Express server with Nextcloud Collectives integration 2026-08-26 20:07:40 +02:00
docker-compose.yml Support running behind a TLS-terminating reverse proxy 2026-11-02 17:10:50 +01:00
Dockerfile Scaffold Reading Notes app: React/Vite PWA client, Express server with Nextcloud Collectives integration 2026-08-26 20:07:40 +02:00
LICENSE Initial commit 2026-08-26 15:20:01 +00:00
package-lock.json Add camera scan-to-text for notes via on-device OCR 2026-08-27 18:19:25 +02:00
package.json Scaffold Reading Notes app: React/Vite PWA client, Express server with Nextcloud Collectives integration 2026-08-26 20:07:40 +02:00
README.md Support running behind a TLS-terminating reverse proxy 2026-11-02 17:10:50 +01:00

Notes

A small PWA for jotting down short notes while reading — e.g. an interesting sentence from a book. Each note is tagged with a topic (existing or new) and can optionally include a page number. Notes are saved as markdown directly into pages of a Nextcloud Collective, one page per topic, nested under a parent page (default: "Reading Notes"). A note's text can be typed by hand or filled in by scanning a photo of the page (on-device OCR via tesseract.js — no image or text ever leaves the device for this step).

Stack

npm workspaces monorepo:

  • shared/ — TypeScript types & Zod schemas shared by client and server
  • server/ — Express API: session auth, and a Nextcloud integration that talks to both the Collectives OCS API (page metadata/creation) and WebDAV (page content read/append)
  • client/ — React + Vite PWA

Setup

  1. Copy .env.example to .env and fill in:
    • SESSION_SECRET, ADMIN_USERNAME, ADMIN_PASSWORD — the app's own login
    • NEXTCLOUD_URL, NEXTCLOUD_USERNAME, NEXTCLOUD_APP_PASSWORD — generate an app password under Nextcloud Settings → Security → App passwords
    • COLLECTIVE_NAME — the exact name of an existing collective the user has access to
  2. Install dependencies: npm install
  3. Run in dev mode: npm run dev (client on http://localhost:5173, proxies /api to the server on port 3000)

Build & run

npm run build
npm run start

Docker

docker compose up --build

Reads secrets from .env in the project root (same variables as above).

Behind Nginx Proxy Manager (HTTPS)

HTTPS is required for the camera scan and the PWA install. Let the proxy terminate TLS and forward to the container over plain HTTP:

  1. In .env, set SECURE_COOKIES=true and TRUST_PROXY=1. Without TRUST_PROXY the server thinks requests are plain HTTP and won't set the secure session cookie, so login doesn't stick.
  2. In Nginx Proxy Manager, add a proxy host: scheme http, forward to the container's host/IP and HOST_PORT (or notes:3000 if NPM shares a Docker network with it), request an SSL certificate, and enable Force SSL.