Open
Conversation
This commit introduces feedfetcher, a Go program that replicates the feed fetching logic from the Node.js API server. This is the first step in moving feed refresh from client-side JavaScript to a background service. Key features: - Fetches RSS/Atom feeds via HTTP with conditional GET - Hashes articles using MD5 of GUID (identical to Node.js) - Scores articles using Unix timestamp (identical to Node.js) - Stores articles in Redis sorted sets - Stores article JSON in S3 - Includes comprehensive unit tests and CI pipeline Reference: https://github.com/feedreaderco/api/blob/master/src/feeds.js 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add root .gitignore to exclude PR_DESCRIPTION.md - Fix binary naming: use 'feedfetcher' consistently (not 'feed-fetcher') - Add go.sum with all dependencies - Fix lint issue: check error return from resp.Body.Close() - Fix lint issue: use switch instead of if/else chain in tests - Fix test expectations: correct MD5 hash values - Add 'make lint' target for local linting All tests and linting now pass locally. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📋 Description
This PR introduces feedfetcher, a Go program that replicates the feed fetching logic from the Node.js API server (
api/src/feeds.js). This is the first step in moving feed refresh from client-side JavaScript to a background service.What it does:
If-Modified-SinceandIf-None-Matchheaders)gofeed🎯 Motivation
Current Problem (Documented in PERFORMANCE_IMPROVEMENTS_PLAN.md):
Page load performance is suffering due to client-side feed refresh:
Impact on metrics:
Solution: Background Feed Refresh
Move feed refresh to a Go-based background service that:
Expected improvement: Time to Interactive: 8.2s → ~3s (61% faster!)
📦 Changes
New Files
Code Structure
Every function includes GitHub comments linking to the original Node.js code:
This makes it easy to verify correctness by comparing with the original implementation.
Dependencies
github.com/mmcdole/gofeed- RSS/Atom parser (equivalent to `feedparser`)github.com/go-redis/redis/v8- Redis clientgithub.com/aws/aws-sdk-go- S3 client🧪 Test Plan
Automated Tests
Test coverage:
📊 Performance Impact
Expected Benefits (After Background Service Implementation):
Immediate Benefits (This PR):
🔄 Backward Compatibility
✅ Fully backward compatible - No changes to existing API or frontend
This PR only adds new code. The Node.js API continues to work exactly as before.
Migration plan:
🔍 Review Checklist
For Reviewers:
🚀 Next Steps (Future PRs)
After this PR is merged:
🤖 Generated with Claude Code