Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/Aquaticat/Monochromatic. TypeScript and Rust monorepo: Claude Code and Pi coding-agent plugins, a m
Something went wrong. Try again.
README.md
RSS Reader #
An RSS/Atom feed reader that converts feeds to an HTML interface with memoized updates.
Features #
- Multi-format support: reads both RSS and Atom feeds
- OPML integration: configure feeds using OPML files
- Memoized pipeline: time-bucketed and content-derived cache invalidation avoids redundant fetches
- Embedded content: safe rendering of feed descriptions in sandboxed iframes
- Auto-dismiss: items scrolled past are automatically marked as ignored
Architecture #
Pull-based memoized pipeline triggered on each page request:
OPML URLs -> Fetch OPML texts -> Parse outlines -> Fetch feeds -> Sort items -> Filter ignored -> Render HTML
Two memoize layers with distinct salt strategies:
- Fetch layer:
time-bucketed salt (
date % interval), so feeds are re-fetched only when the interval window advances - Render layer: salt combines fetch time bucket + ignore file content, so rendering updates when either feeds or ignore list change
Core modules #
opmls.ts: reads and validates OPML source URLs from environmentoutline.ts: fetches OPML files and extracts feed outlinesfeed.ts: fetches and parses RSS/Atom feedsitem.ts: extracts, normalizes, and sorts feed itemshtml.ts: renders items to HTML, filtering out ignored entriesinterval.ts: configurable time-bucket for fetch cache invalidationindex.ts: memoized pipeline orchestration and HTTP server
Configuration #
Environment variables #
Create a .env file in the project root:
# Comma-separated list of OPML file URLs
OPMLS=file://package/webapp-productivity/rss/src/monitor.opml
RSS_PORT=4112
# Fetch cache interval in milliseconds (default: 300000 = 5 minutes)
RSS_FETCH_INTERVAL_MS=300000
OPML format #
<?xml version="1.0" encoding="UTF-8"?>
<opml version="2.0">
<head>
<title>Feed Collection</title>
</head>
<body>
<outline text="Category Name">
<outline text="Feed Name" type="rss" xmlUrl="https://example.com/feed.xml" htmlUrl="https://example.com/"/>
</outline>
</body>
</opml>
API endpoints #
GET /: serve the RSS reader interfacePOST /api/ignore/new: mark a feed item as ignored
Usage #
- Configure your OPML file with desired RSS/Atom feeds
- Set the
OPMLSenvironment variable to point to your OPML file(s) - Start the server:
mise run //package/webapp-productivity/rss:dev - Visit
http://localhost:4112to view your feeds
Technical details #
- Built with h3's
H3router andserve()helper for the HTTP server - Uses h-html for string-based HTML generation
- Supports both HTTP and file-based OPML sources
- Salted memoize caching with automatic invalidation