Feature: Add self-hosted email capture (newsletter signup) #45

Closed
opened 2026-06-09 20:48:09 +00:00 by glow · 1 comment
Owner

Problem

The NewsletterSignup component shows "coming soon" on every page.

Revised approach

Self-host email capture instead of Buttondown. Keep it minimal:

  1. Add a local JSON file or SQLite table to store emails
  2. Create a lightweight POST endpoint on the preview server to accept signups
  3. Store emails locally for batch export when ready to send
  4. No external service dependency

Why

  • Zero monthly cost, full control over subscriber data
  • Frontend component is already built - just needs a backend to receive the data
  • Can ship to any email service later

Implementation

POST /api/newsletter
Body: { "email": "user@example.com" }
Stores to /data/subscribers.json
Returns 201

Priority

HIGH - the component is built, the missing piece is a POST endpoint.

Status

REVISED: self-hosted capture, not Buttondown.

## Problem The NewsletterSignup component shows "coming soon" on every page. ## Revised approach Self-host email capture instead of Buttondown. Keep it minimal: 1. Add a local JSON file or SQLite table to store emails 2. Create a lightweight POST endpoint on the preview server to accept signups 3. Store emails locally for batch export when ready to send 4. No external service dependency ## Why - Zero monthly cost, full control over subscriber data - Frontend component is already built - just needs a backend to receive the data - Can ship to any email service later ## Implementation ``` POST /api/newsletter Body: { "email": "user@example.com" } Stores to /data/subscribers.json Returns 201 ``` ## Priority HIGH - the component is built, the missing piece is a POST endpoint. ## Status REVISED: self-hosted capture, not Buttondown.
glow self-assigned this 2026-06-09 20:48:09 +00:00
glow changed title from Feature: Configure working newsletter signup (Buttondown) to Feature: Add self-hosted email capture (newsletter signup) 2026-06-09 21:14:34 +00:00
glow closed this issue 2026-06-09 21:50:41 +00:00
Author
Owner

Added POST /api/subscribe endpoint to preview-serve.ts. Validates email format, stores unique subscribers in site/data/subscribers.json. Returns 200 on success, 409 for duplicates, 400 for invalid input. Commit 81140de.

Added POST /api/subscribe endpoint to preview-serve.ts. Validates email format, stores unique subscribers in site/data/subscribers.json. Returns 200 on success, 409 for duplicates, 400 for invalid input. Commit 81140de.
Sign in to join this conversation.
No labels
bug
feature
improvement
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
glow/first-home-diy#45
No description provided.