An intelligent desktop news aggregation application that uses local AI to filter, categorize, and analyze news content with political bias detection.
🤖 AI-Powered Content Analysis
- Automatic article categorization (technology, politics, business, science, health, sports, entertainment, world)
- Sentiment analysis (positive, negative, neutral)
- Importance scoring (high, medium, low)
- Topic extraction and tagging
🎯 Political Bias Detection
- Bias scoring on a -1.0 to 1.0 scale (left to right)
- Confidence levels for bias assessments
- Detailed reasoning explaining AI's bias determination
- Visual bias indicators with color-coded scales
📊 Smart Content Discovery
- RSS feed parsing and management
- Relevance scoring based on user preferences
- AI-generated summaries on demand
- User interaction tracking for personalization
🔒 Privacy-Focused
- Local AI processing with LM Studio
- No external API calls for content analysis
- Local SQLite database storage
- Frontend: HTML/CSS/JavaScript with responsive design
- Backend: Python FastAPI server
- Database: SQLite with embedding storage
- AI: LM Studio (local LLM) for content analysis
- Future: Tauri desktop app framework
- Python 3.8+
- LM Studio running locally
- WSL2 (if on Windows)
- Clone the repository:
git clone <repository-url>
cd news_feed- Install Python dependencies:
pip install --user fastapi uvicorn feedparser requests openai==0.28.1 numpy-
Set up LM Studio:
- Install and run LM Studio
- Load a model (e.g., Mistral 7B Instruct)
- Enable "Network Access" and "Enable CORS" in settings
- Ensure it's running on port 1234
-
Initialize the database:
python3 backend/main.py- Start the backend server:
export PATH="/home/jon/.local/bin:$PATH"
python3 backend/main.py- Open the frontend:
# Open src/index.html in your browser
# Or serve it locally:
cd src
python3 -m http.server 3000- Access the application at
http://localhost:3000
- Refresh Feeds: Click "🔄 Refresh Feeds" to fetch new articles
- Filter by Category: Use the dropdown to filter articles by category
- AI Summary: Click "🤖 AI Summary" on any article for an AI-generated summary
- Bias Analysis: Click "🎯 Bias Analysis" on political articles to see detailed bias assessment
- Read Full Article: Click "Read Full" to open the original article
- Rate Articles: Use 👍/👎 buttons to help train the relevance algorithm
Default feeds are automatically added on first run. To add custom feeds:
curl -X POST "http://localhost:8000/feeds" \
-H "Content-Type: application/json" \
-d '{"feed_url": "https://example.com/rss"}'For WSL users, the application automatically detects the Windows host IP. If you're running everything locally, it will use localhost:1234.
Manual configuration in backend/ai/lm_studio_client.py:
self.base_url = "http://your-lm-studio-host:1234"GET /- API information and health statusGET /articles- Get filtered articles with paginationGET /feeds- Get all active RSS feedsPOST /feeds- Add a new RSS feedPOST /refresh- Refresh all feeds and process with AIPOST /articles/{id}/summary- Generate AI summary for articleGET /articles/{id}/bias-analysis- Get detailed bias analysisPOST /articles/{id}/interact- Record user interactionGET /health- Health check and LM Studio status
- Basic metadata (title, URL, content, author, published date)
- AI analysis results (category, sentiment, importance, topics)
- Political bias data (bias score, confidence, reasoning)
- User interaction data (relevance score)
- Vector embeddings for similarity matching
- RSS feed metadata and management
- Active/inactive status and last fetch times
- Tracks user behavior (views, likes, dislikes, read time)
- Used for personalization and relevance scoring
news_feed/
├── backend/
│ ├── ai/
│ │ └── lm_studio_client.py # LM Studio integration
│ ├── content/
│ │ └── feed_parser.py # RSS parsing
│ ├── database/
│ │ └── models.py # Database operations
│ └── main.py # FastAPI application
├── src/
│ └── index.html # Frontend application
├── CLAUDE.md # Project documentation
└── README.md # This file
Currently no automated tests. Manual testing via the web interface.
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
"Backend Offline" status:
- Check if the Python server is running on port 8000
- Verify no port conflicts:
lsof -i:8000
"AI Offline" status:
- Ensure LM Studio is running and has a model loaded
- Check LM Studio settings: Enable "Network Access" and "Enable CORS"
- For WSL: Verify Windows firewall allows port 1234
Database errors:
- Run the migration script:
python3 add_bias_reasoning_column.py - Delete
news_feed.dbto reset (will lose data)
"Loading articles..." stuck:
- Restart the backend server
- Check browser console for JavaScript errors
- Verify API endpoints are responding:
curl http://localhost:8000/health
Bias analysis not working:
- Ensure articles have been processed with AI (refresh feeds)
- Check that LM Studio is available and responding
MIT License - see LICENSE file for details.
- LM Studio for local AI processing
- FastAPI for the backend framework
- RSS feed providers for content sources