Article Lifecycle
Articles go through several stages before they appear on a child site. The backend owns all state transitions.
Manual Article Path
Section titled “Manual Article Path”-
Create —
POST /api/v1/articleArticle is saved in MongoDB as a draft. Slug is auto-generated from the title using theslugifypackage. -
Edit —
PUT /api/v1/article/:idUpdate title, body, tags, category, section, thumbnail, or any other metadata. -
Assign host sites —
POST /api/v1/article/host-site/:idConnect the article to one or more child sites. This controls where it will appear when published. -
Publish —
PUT /api/v1/article/publish/:idArticle status is updated to published. It now appears in/api/v1/client/postsresponses. -
Available on child sites —
GET /api/v1/client/postsandGET /api/v1/client/article/:slugChild-site frontends fetch the article and display it to readers.
RSS Aggregated Article Path
Section titled “RSS Aggregated Article Path”RSS-imported articles follow a shorter path:
- Cron job fetches the publisher’s feed and finds new items.
- Each new item is saved with
isAggregated: true,source,sourceUrl, andrssFeedGuid. - If
autoApproveis enabled for the publisher, the article is published immediately. - If not, it lands in a pending queue for admin review:
GET /api/v1/article/pending. - Admin approves via
PUT /api/v1/article/approve/:idor rejects viaPUT /api/v1/article/reject/:id.