mirror of
https://github.com/juherr/kill-the-news.git
synced 2026-06-20 22:03:48 +00:00
Set up initial project and files
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
---
|
||||
description: Project Implementation Plan
|
||||
globs: *
|
||||
alwaysApply: false
|
||||
---
|
||||
# Detailed Project Implementation Plan
|
||||
|
||||
This section is a top-level "blueprint" describing the solution architecture and how each component fits together.
|
||||
|
||||
## Overview
|
||||
|
||||
**Goal:** Build a service that turns email newsletters into RSS feeds, so you can subscribe in an RSS reader like Reeder. The service should provide unique email addresses per feed, a front-end admin panel, indefinite (or long-term) storage of newsletters, and minimal cost—preferably using Cloudflare services plus ForwardEmail.net.
|
||||
|
||||
## Key Components
|
||||
|
||||
1. **ForwardEmail.net**
|
||||
- Accept incoming newsletters on your custom domain’s email addresses.
|
||||
- Forward them (via webhook) to your API endpoint for processing.
|
||||
- Free inbound plan includes JSON + raw MIME data.
|
||||
2. **Cloudflare Workers**
|
||||
- **Inbound Worker:** Receives the webhook from ForwardEmail.net, parses/stores newsletter data in KV (or R2).
|
||||
- **RSS Worker:** Serves RSS feeds by reading from KV and outputting XML.
|
||||
- **Admin Worker (potential):** Could serve a small UI or JSON API for feed management.
|
||||
3. **Cloudflare KV**
|
||||
- Key-value store for storing newsletter items (subject, date, HTML, etc.).
|
||||
- Minimal cost for text data.
|
||||
- Indefinite retention if you keep usage under limits.
|
||||
4. **Cloudflare Pages (Optional)**
|
||||
- Could host a separate front-end for admin tasks.
|
||||
- Alternatively, build a simple admin UI directly within the Worker.
|
||||
5. **Admin Dashboard**
|
||||
- Basic login and feed creation (generate random email addresses).
|
||||
- List newsletters and optionally delete them or rename feed titles.
|
||||
- For a simple approach, implement a minimal password-protected area or JSON endpoints.
|
||||
6. **Domain / DNS Setup**
|
||||
- Use your custom domain (e.g. `mynewsletters.dev`).
|
||||
- Add DNS records so ForwardEmail.net is the MX handler.
|
||||
- Configure Cloudflare for general DNS (with “Orange Cloud” or not, depending on your proxying preferences).
|
||||
- Verify your domain following ForwardEmail.net’s instructions.
|
||||
|
||||
## Data Flow
|
||||
|
||||
1. A newsletter arrives at `newsletterXYZ@mynewsletters.dev`.
|
||||
2. ForwardEmail.net triggers a webhook to `https://your-worker.example.com/api/inbound?feed=XYZ` with JSON + raw MIME.
|
||||
3. The Worker parses the email, extracts relevant information (date, subject, HTML body), and stores it in KV under a key like `feed:XYZ:timestamp`.
|
||||
4. When your RSS reader (e.g. Reeder) requests `GET https://your-worker.example.com/rss/XYZ`, the Worker fetches all items from KV for that feed, builds an RSS XML response, and returns it.
|
||||
5. *(Optional)* The Admin Dashboard (via a password-protected route or a separate Cloudflare Pages front-end) can create new feed IDs, display items, etc.
|
||||
|
||||
## Summary of Implementation Steps
|
||||
|
||||
1. Set up the Domain and ForwardEmail.net for inbound mail.
|
||||
2. Create a Cloudflare Worker to handle the inbound webhook.
|
||||
3. Parse the email (using ForwardEmail.net’s parsed data or parsing the raw MIME if necessary).
|
||||
4. Store the data in KV.
|
||||
5. Create an RSS Worker endpoint to retrieve the data and output XML.
|
||||
6. *(Optional)* Develop an Admin UI to create new feeds, list items, and manage them.
|
||||
7. Deploy and test the solution. Subscribe to the feed with Reeder.
|
||||
Reference in New Issue
Block a user