Feed sources
Monfil uses a SourceAdapter for each source type. The source adapters cover RSS, Atom, RDF, JSON Feed, and YouTube.
Follow an item
Section titled “Follow an item”User link -> resolveSource -> adapter.fetch -> parsed source -> Add Feed -> databaseStored feed -> sourceFor -> adapter.fetch -> refresh -> items -> river \-> later image enrichmentReader item -> content request -> article extraction -> stored bodyAn adapter’s fetch method returns a parsed source or a tagged error. Its parse method handles content without a network request. fetchesFullArticle tells the enrichment path whether an item link needs article extraction. The registry picks an adapter for a stored feed or a link entered in Add Feed.
Add a source type
Section titled “Add a source type”- Extend
SourceTypein the shared contracts. - Add an adapter and register it. Teach
resolveSourceto recognize its links. - Give each item a stable GUID so a later refresh can find it again.
- Test parsing with fixtures and test fetch behavior at the adapter boundary.
Keep fields that only this source uses in feedItem.extra. When every source needs a field, add a shared column and migration.