Backend Integration and Content Consumption
Child sites only read from the backend. They never write to it. All reads go through the /api/v1/client route group, which requires an API key for access.
Authentication
Section titled “Authentication”Every request must include the API key:
GET /api/v1/client/posts?page=1x-api-key: your-api-key-hereOr as a query param:
GET /api/v1/client/posts?page=1&api_key=your-api-key-hereThe API key is set in news-server/.env as API_KEY. Child sites read it from their own .env (e.g. VITE_API_KEY).
Available Endpoints
Section titled “Available Endpoints”| Endpoint | Purpose |
|---|---|
GET /api/v1/client/posts?page=1 | Paginated list of published articles |
GET /api/v1/client/article/:slug | Single article by slug |
GET /api/v1/client/all | All published articles (no pagination) |
GET /api/v1/client/partner-articles | Articles from RSS-aggregated publishers |
Aggregated Article Attribution
Section titled “Aggregated Article Attribution”Articles imported from publisher RSS feeds include source metadata. Child sites should display this to readers:
{ "isAggregated": true, "source": "CryptoNews Weekly", "sourceUrl": "https://cryptonewsweekly.com/article/bitcoin-rally"}