rspace-online/backlog/tasks/task-105 - Listmonk-newslet...

2.3 KiB

id title status assignee created_date labels dependencies references priority
TASK-105 Listmonk newsletter integration with EncryptID auth Done
2026-03-10 19:26
rsocials
listmonk
auth
integration
modules/rsocials/mod.ts
modules/rsocials/lib/listmonk-proxy.ts
modules/rsocials/components/folk-newsletter-manager.ts
medium

Description

Replace the raw Listmonk iframe on the rSocials newsletter-list page with a custom newsletter manager UI backed by API proxy routes. Per-space Listmonk credentials are stored in module settings and injected server-side via Basic Auth. All API routes are gated by EncryptID auth + space role checks (moderator+ for reads, admin for campaign creation).

Acceptance Criteria

  • #1 Password setting type added to module settings framework
  • #2 Listmonk URL/user/password configurable per-space in rSocials settings
  • #3 API proxy routes forward requests to Listmonk with Basic Auth
  • #4 Newsletter status/lists/subscribers/campaigns endpoints gated by EncryptID + role
  • #5 Campaign creation restricted to admin role
  • #6 folk-newsletter-manager web component with Lists/Subscribers/Campaigns tabs
  • #7 Not-configured state shows setup instructions
  • #8 Vite build entry produces folk-newsletter-manager.js bundle
  • #9 Iframe route replaced with native component route

Final Summary

Changes\n\n### Modified files\n- shared/module.ts — Added 'password' to ModuleSettingType union\n- shared/components/rstack-space-switcher.ts — Added password input branch in settings renderer\n- modules/rsocials/mod.ts — Added Listmonk settings schema, auth helper, 6 newsletter API proxy routes, replaced iframe route with component\n- vite.config.ts — Added build entry for folk-newsletter-manager.js + CSS copy\n\n### New files\n- modules/rsocials/lib/listmonk-proxy.ts — getListmonkConfig() + listmonkFetch() helpers\n- modules/rsocials/components/folk-newsletter-manager.ts — Web component with 3 tabs, auth-gated UI\n- modules/rsocials/components/newsletter.css — Component styles\n\nCommit: c92ca0f