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

## Description

<!-- SECTION:DESCRIPTION:BEGIN -->
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).
<!-- SECTION:DESCRIPTION:END -->

## Acceptance Criteria
<!-- AC:BEGIN -->
- [ ] #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
<!-- AC:END -->

## Final Summary

<!-- SECTION:FINAL_SUMMARY:BEGIN -->
## 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
<!-- SECTION:FINAL_SUMMARY:END -->
