Skip to content

Article Lifecycle

Articles go through several stages before they appear on a child site. The backend owns all state transitions.

  1. CreatePOST /api/v1/article Article is saved in MongoDB as a draft. Slug is auto-generated from the title using the slugify package.

  2. EditPUT /api/v1/article/:id Update title, body, tags, category, section, thumbnail, or any other metadata.

  3. Assign host sitesPOST /api/v1/article/host-site/:id Connect the article to one or more child sites. This controls where it will appear when published.

  4. PublishPUT /api/v1/article/publish/:id Article status is updated to published. It now appears in /api/v1/client/posts responses.

  5. Available on child sitesGET /api/v1/client/posts and GET /api/v1/client/article/:slug Child-site frontends fetch the article and display it to readers.

RSS-imported articles follow a shorter path:

  1. Cron job fetches the publisher’s feed and finds new items.
  2. Each new item is saved with isAggregated: true, source, sourceUrl, and rssFeedGuid.
  3. If autoApprove is enabled for the publisher, the article is published immediately.
  4. If not, it lands in a pending queue for admin review: GET /api/v1/article/pending.
  5. Admin approves via PUT /api/v1/article/approve/:id or rejects via PUT /api/v1/article/reject/:id.