RSS Publisher Flow
Publishers can add an RSS feed URL. The backend polls all approved feeds every hour and saves new articles automatically.
-
Admin creates a publisher account — via
POST /api/v1/publisherwith the publisher’s name, email, and password. -
Publisher logs in and sets up their feed — They open
/publisher/feed, paste their RSS URL, pick default tags, and save. This callsPUT /api/v1/publisher/me/feed. -
Publisher tests the feed — They can click Test Feed before saving. This calls
POST /api/v1/publisher/me/test-feedand shows a preview of what would be imported. -
Admin approves the publisher — Via
PUT /api/v1/publisher/:id/approve. Only approved publishers have their feeds polled. -
Cron job runs every hour — The scheduler (
0 * * * *) callsfetchAllFeeds(), which loops through all approved publishers and fetches their RSS URLs usingrss-parser. -
New articles are saved — Each feed item is saved as an Article with:
isAggregated: truesourceset to the publisher’s display namesourceUrlpointing to the original articlerssFeedGuidset to the feed item’s unique ID
-
Duplicate items are skipped — If an article with the same
rssFeedGuidalready exists, the insert is skipped. The field has a sparse unique index in MongoDB for this.
Source Attribution
Section titled “Source Attribution”Aggregated articles show up on child sites with a “Source: PublisherName” label so readers can see where the content came from.