tasks/README.md
Padreug bc88b421b6 scaffold tasks extension
Empty skeleton mirroring the events extension layout: config/manifest,
pyproject + Makefile + ruff/mypy config, FastAPI routers wired into
tasks_ext, NostrClient bootstrap stubs, and an empty static/routes.json.

Models, migrations, CRUD, Nostr publisher/sync, and the API/template
layers land in follow-up commits.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 11:34:04 +02:00

1.2 KiB

Tasks — LNbits extension

LNbits-side counterpart to the webapp tasks module. Stores and syncs recurring tasks / chores as Nostr NIP-52 calendar events.

Data model

  • Kind 31922 — task (parameterized replaceable). Tagged with event-type: task so activities consumers can filter it out (see aiolabs/webapp#25 for context).
  • Kind 31925 — task completion / RSVP-ish status update. Carries task-status (claimed, in-progress, completed, blocked, cancelled), an optional occurrence date for recurring tasks, and completed_at when finalized.
  • Kind 5 — NIP-09 deletions for the above.

Recurrence is encoded as task-only tags: recurrence (daily | weekly), recurrence-day (weekday name for weekly), recurrence-end (YYYY-MM-DD).

What this extension does

  • Caches tasks and completions in a local sqlite/postgres schema.
  • Publishes mutations to Nostr via the nostrclient extension's internal WebSocket bridge.
  • Subscribes to inbound 31922/31925 events filtered to event-type=task so the local DB stays in sync with the relay set.

Status

Early scaffold. Mirrors events' extension layout. See ~/dev/webapp/src/modules/tasks/ for the canonical client-side model.