From e22530e6fd2b063adf7d6e84e6b16efaf02b9904 Mon Sep 17 00:00:00 2001 From: mikael-lovqvists-claude-agent Date: Sun, 24 May 2026 16:32:48 +0000 Subject: [PATCH] Update README to reflect current state of the app Co-Authored-By: Claude Sonnet 4.6 --- README.md | 53 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 8061f10..b76cc1e 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,14 @@ Personal inventory for tasks, ideas, notes, and anything else. Entries are organ - **Configurable entry types** — default types are task, idea, note; create your own - **Hierarchical entries** — unlimited nesting, any type can be a child of any other -- **Tree view** (roots only, expandable — children always shown unfiltered) and **flat view** -- **Filters** by status, priority, and tag; free-text search across title and body; clickable tag chips +- **Tree view** (root entries filtered; expanded children always shown) and **flat view** +- **Filters** by status, priority, and tag; free-text search across title and body; filter state stored in URL query params (`?status=open&priority=high&search=foo`); status defaults to `open` +- **Clickable chips** — type, status, priority, and tag badges are all clickable to filter or navigate +- **CodeMirror 6 editor** — markdown syntax highlighting, multi-cursor, write/preview tabs +- **Keyboard shortcuts** — `Ctrl+E` edit, `Ctrl+S` save, `Ctrl+D` discard, `Ctrl+Alt+PgUp/Down` switch write/preview tab - **Entry detail view** — full rendered markdown, metadata, children list; URL-addressable (`#4`) -- **URL routing** — `#all`, `#type/`, `#`, `#manage-types`; back/forward works -- **Markdown rendering** via a local Gitea instance — edit/preview tabs in the editor +- **URL routing** — `#` (all), `#type/`, `#type//tag/`, `#tag/`, `#`, `#edit/`, `#manage-types`; back/forward works +- **Markdown rendering** via a local Gitea instance - **Sequential integer IDs** — global across all entry types - **Flat NDJSON key-value store** — single file, no database required @@ -18,6 +21,7 @@ Personal inventory for tasks, ideas, notes, and anything else. Entries are organ ```bash npm install +make build # bundle CodeMirror vendor lib cp config.yaml.example config.yaml # edit config.yaml — add your Gitea URL and token node server.mjs @@ -35,7 +39,7 @@ gitea: token: your_token_here # needs read:misc scope minimum ``` -If Gitea is not configured, titles and bodies are shown as plain text. +If Gitea is not configured, markdown is shown as plain text. Environment overrides: @@ -86,7 +90,7 @@ DELETE /api/entry-types/:id blocked if type still has entries GET /api/entries ?type= to filter by type POST /api/entries body: { type, title, body?, status?, priority?, tags?, parent_id? } GET /api/entries/:id -PUT /api/entries/:id body: any subset of entry fields +PUT /api/entries/:id body: any subset of entry fields (including type) DELETE /api/entries/:id blocked if entry has children POST /api/render-markdown body: { text, mode? } → { html } @@ -102,37 +106,40 @@ sudo cp config.yaml.example /srv/task-inventory/config.yaml sudo chown task-inventory:task-inventory /srv/task-inventory/config.yaml # edit /srv/task-inventory/config.yaml -# Deploy (and on every update) +# Deploy (and on every update) — builds vendor bundle, rsyncs, runs npm ci make deploy DEST=/srv/task-inventory # Enable service (first time only) sudo systemctl enable --now "$(realpath deployment/task-inventory.service)" ``` -`make deploy` runs rsync (excluding `data/`, `config.yaml`, `node_modules/`), fixes ownership, and runs `npm ci` as the service user. `make sync` does the rsync+chown only, skipping `npm ci`. +`make deploy` builds the CodeMirror vendor bundle, rsyncs files (excluding `data/`, `config.yaml`, `node_modules/`), fixes ownership, and runs `npm ci` as the service user. `make sync` does the rsync+chown only, skipping build and `npm ci`. To bind to all interfaces instead of localhost, uncomment `Environment=BIND_ADDRESS=0.0.0.0` in `deployment/task-inventory.service`. ## File map ``` -server.mjs Entry point — Express 5, all routes -Makefile deploy / sync targets +server.mjs Entry point — Express 5, all routes +Makefile build / deploy / sync targets +codemirror-entry.mjs ESM entry point for esbuild CodeMirror bundle lib/ - config.mjs Loads config.yaml (ENOENT-safe) - kv-store.mjs Flat NDJSON key-value store (auto-load, debounced flush) - storage.mjs Entry types + entries CRUD, ID generation, migration + config.mjs Loads config.yaml (ENOENT-safe) + kv-store.mjs Flat NDJSON key-value store (auto-load, debounced flush) + storage.mjs Entry types + entries CRUD, ID generation, migration public/ - app.mjs SPA — state, routing, rendering, dialogs - index.html Shell - style.css All styles - templates.html HTML templates (injected at init) - gitea-markup.css Vendored Gitea markup + chroma CSS for markdown rendering + app.mjs SPA — state, routing, rendering, dialogs + index.html Shell + style.css All styles + templates.html HTML templates (injected at init) + gitea-markup.css Vendored Gitea markup + chroma CSS for markdown rendering + vendor/ Built by make build, not committed + codemirror-bundle.mjs Bundled CodeMirror 6 (ESM) lib/ - api.mjs fetch wrappers for all API endpoints - dom.mjs qs(), clone(), set_text(), show(), hide() -data/ Created at runtime, not committed - tasks.ndjson All entry records and entry type definitions + api.mjs fetch wrappers for all API endpoints + dom.mjs qs(), clone(), set_text(), show(), hide() +data/ Created at runtime, not committed + tasks.ndjson All entry records and entry type definitions deployment/ - task-inventory.service systemd unit file + task-inventory.service systemd unit file ```