How marshalx/bluesky-feed-generator works
Main Components
a) External Systems:
• Firehose Data Stream as a separate component
• Client applications that will consume the feed
b) Core Service Components:
• HTTP Server Layer (Flask)
• Feed Generator Service
• Data Stream Processor
• Authentication Handler
• Feed Algorithm Engine
• Data Filter
• Database (SQLite)
Component Organization
[External Clients/Bluesky] (Top Layer)
• ↕
[XRPC Endpoints] (API Layer)
• ↕
[Feed Generator Core] (Service Layer)
• ↕
[Database] (Data Layer)
Specific Implementation Details
a) API Endpoints (show as interface points):
• /.well-known/did.json
• /xrpc/app.bsky.feed.describeFeedGenerator
• /xrpc/app.bsky.feed.getFeedSkeleton
b) Core Components (show as interconnected modules):
• server/app.py (Main Application)
• server/data_stream.py (Firehose Consumer)
• server/algos/feed.py (Feed Algorithm)
• server/data_filter.py (Data Filtering)
• server/database.py (Data Storage)
• Bidirectional communication between the service and Bluesky
• One-way data flow from the Firehose to the Data Stream Processor
• Data flow between the database and service components
• Request/response cycle for feed generation
Additional Elements
• A configuration section showing .env and config.py
• A publishing flow for feed registration (publish_feed.py)
• Logging component (logger.py)