Skip to content

RSS Publisher Flow

Publishers can add an RSS feed URL. The backend polls all approved feeds every hour and saves new articles automatically.

  1. Admin creates a publisher account — via POST /api/v1/publisher with the publisher’s name, email, and password.

  2. Publisher logs in and sets up their feed — They open /publisher/feed, paste their RSS URL, pick default tags, and save. This calls PUT /api/v1/publisher/me/feed.

  3. Publisher tests the feed — They can click Test Feed before saving. This calls POST /api/v1/publisher/me/test-feed and shows a preview of what would be imported.

  4. Admin approves the publisher — Via PUT /api/v1/publisher/:id/approve. Only approved publishers have their feeds polled.

  5. Cron job runs every hour — The scheduler (0 * * * *) calls fetchAllFeeds(), which loops through all approved publishers and fetches their RSS URLs using rss-parser.

  6. New articles are saved — Each feed item is saved as an Article with:

    • isAggregated: true
    • source set to the publisher’s display name
    • sourceUrl pointing to the original article
    • rssFeedGuid set to the feed item’s unique ID
  7. Duplicate items are skipped — If an article with the same rssFeedGuid already exists, the insert is skipped. The field has a sparse unique index in MongoDB for this.

Aggregated articles show up on child sites with a “Source: PublisherName” label so readers can see where the content came from.