A standalone example implementation of a custom Bluesky feed generator that surfaces posts about Generation X era music - grunge, alternative rock, shoegaze, britpop, and 90s music culture.
This project was originally forked from MarshalX/bluesky-feed-generator and has been modified to serve as a working example of a topic-based feed with custom filtering logic.
Live Feed: Generation X Music on Bluesky
Feed URL: https://bsky-feeds.9600baud.net
This feed uses simple regular expressions and and filtering logic to build a feed. This still leads to a lot of false positives and would need work for a more accurate content feed.
- Clear matches: Nirvana, Pearl Jam, Soundgarden, Radiohead, Smashing Pumpkins, Pixies, Sonic Youth, and 60+ other bands
- Ambiguous matches: Bands with common English names (Blur, Hole, Garbage, Ride, No Doubt) only match when paired with music context words
- Genres: Grunge, shoegaze, britpop, trip-hop, post-punk, college rock, lo-fi
- Era terms: "90s music", "90s rock", "generation x music", "nineties alternative"
Acronym Expansion - Automatically expands common band acronyms:
- NIN β Nine Inch Nails
- STP β Stone Temple Pilots
- RHCP β Red Hot Chili Peppers
- RATM β Rage Against the Machine
- AIC β Alice in Chains
Context-Aware Filtering - Generic words like "alternative", "punk", "blur", or "no doubt" only match when music context is present (words like "music", "band", "album", "song", "concert", etc.)
Word Boundary Matching - Prevents false matches (e.g., "blur" won't match "blurry photo")
Content Exclusions - Filters out political content and off-topic posts
The filtering algorithm works in stages:
- Synonym expansion - Expands acronyms to full band names
- Political filter - Excludes posts containing political keywords
- Music detection - Checks for:
- Clear band/genre matches (high confidence)
- Ambiguous matches + music context (validated matches)
- Era-specific terms (90s music, etc.)
Posts must match at least one criterion to be included in the feed.
Built with:
- AT Protocol SDK for Python
- Python 3.11+
- SQLite database
- Docker for deployment
- Waitress WSGI server
Want to create your own topic-based feed? This codebase is a great starting point.
-
Clone and setup
git clone https://github.com/YOUR_USERNAME/YOUR_REPO.git cd YOUR_REPO python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt
-
Configure your feed
cp .env.example .env # Edit .env with your credentials and feed details -
Customize the filter
Edit
server/data_filter.pyto implement your filtering logic. The current implementation provides:has_word_match()- Word boundary matching helper- Synonym/acronym expansion
- Context-aware filtering
- Content exclusions
-
Test locally
flask --debug run # Server runs on http://localhost:5000 -
Publish your feed
python publish_feed.py # Copy the FEED_URI to your .env file
- Clear vs Ambiguous: Separate unique terms from common English words
- Context validation: Require topic-specific context for ambiguous terms
- Synonym maps: Expand abbreviations and acronyms before matching
- Exclusion lists: Filter out off-topic content early
- Word boundaries: Use regex
\bpatterns to prevent substring matches
See server/data_filter.py for the complete implementation example.
For production deployment with Docker, Nginx, SSL, and CI/CD:
See INSTALL.md for comprehensive installation documentation including:
- Docker containerization
- GitHub Actions CI/CD
- Server setup and security
- Monitoring and troubleshooting
- Database management
Bluesky Firehose β Filter Logic β SQLite DB β Feed API β Bluesky App
β
- Synonym expansion
- Content exclusions
- Context validation
- Word boundary matching
βββ server/
β βββ data_filter.py # Feed filtering logic
β βββ algos/ # Feed generation algorithms
β βββ database.py # Database models
β βββ app.py # Flask application
βββ publish_feed.py # Feed publishing script
βββ .env # Configuration (not in git)
βββ INSTALL.md # Installation guide
βββ CLAUDE.md # Deployment documentation
βββ README.md # This file
# Run development server with debugging
flask --debug run
# Monitor logs
docker-compose logs -f
# Test endpoints
curl http://localhost:5000/.well-known/did.json# Backup database
cp feed_database.db feed_database.db.backup-$(date +%Y%m%d)
# Reset database (clears all posts)
rm feed_database.db
touch feed_database.db
chmod 666 feed_database.dbSee INSTALL.md for detailed issue tracking and solutions.
This is a personal feed generator project, but feel free to:
- Fork it for your own topic-based feed
- Report issues or bugs
- Submit pull requests with improvements
MIT
- Originally forked from MarshalX/bluesky-feed-generator by MarshalX
- Built with AT Protocol SDK for Python
- Deployed at bsky-feeds.9600baud.net
For technical questions about:
- Installation: See INSTALL.md
- Deployment: See CLAUDE.md
- AT Protocol: See AT Protocol Documentation
- Feed Generators: See Bluesky Feed Generator Docs