Architecture
The platform uses a hub-and-spoke model. news-server is the central hub — everything talks to it. news-client sends editorial actions, child-site frontends read published content, and MongoDB stores all persistent data.
Components
Section titled “Components”| Component | Role |
|---|---|
news-server | Central API — handles auth, storage, publishing, RSS ingestion, S3 uploads |
news-client | Admin dashboard — editors and publishers interact with the backend via this UI |
MongoDB | Database — stores articles, users, publishers, sites, tags, categories |
AWS S3 | Media storage — images uploaded via pre-signed URLs |
child-sites/* | Reader frontends — fetch and display published content |
Request Flow
Section titled “Request Flow”Top-Level Request Flow
- Editor or publisher opens news-client in their browser.
- Dashboard sends authenticated requests (JWT Bearer token) to news-server.
- news-server reads/writes MongoDB and optionally generates S3 signed URLs for image uploads.
- When an article is published, it becomes available on the /api/v1/client endpoints.
- Child-site frontends send requests with an API key to fetch articles for their readers.
RSS Aggregation
Section titled “RSS Aggregation”Publisher RSS feeds add a second ingest path alongside manual editing:
RSS Ingest Path
- A publisher saves their RSS feed URL via the self-service feed page.
- Admin approves the publisher.
- A cron job runs every hour and calls fetchAllFeeds().
- New feed items are saved as articles with isAggregated: true.
- Duplicate items are skipped using a unique rssFeedGuid index.
- Ingested articles flow through the same tag-based routing as manual articles.