Owly News Summariser
Owly News Summariser is a web application that fetches news articles from various RSS feeds, uses an LLM (Large Language Model) to summarize them, and presents them in a clean, user-friendly interface.
Features
- Fetches news from configurable RSS feeds
- Automatically summarizes articles using Ollama LLM
- Filters news by country
- Progressive Web App (PWA) support for offline access
- Scheduled background updates
Project Structure
The project consists of two main components:
- Backend: A FastAPI application that fetches and processes news feeds, summarizes articles, and provides API endpoints
- Frontend: A Vue.js application that displays the news and provides a user interface for managing feeds
Prerequisites
- Python 3.8+ for the backend
- Node.js 16+ and Yarn for the frontend
- Ollama for article summarization
Installing Yarn
Yarn is a package manager for JavaScript that's required for the frontend. Here's how to install it:
Using npm (recommended)
If you already have Node.js installed, the easiest way to install Yarn is via npm:
npm install -g yarn
Platform-specific installations
Windows
- Using Chocolatey:
choco install yarn - Using Scoop:
scoop install yarn - Manual installation: Download and run the installer
macOS
- Using Homebrew:
brew install yarn - Using MacPorts:
sudo port install yarn
Linux
-
Debian/Ubuntu:
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list sudo apt update && sudo apt install yarn -
CentOS/Fedora/RHEL:
curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo sudo yum install yarn -
Arch Linux:
pacman -S yarn
After installation, verify Yarn is installed correctly:
yarn --version
Setup
Backend Setup
-
Navigate to the backend directory:
cd backend -
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate -
Install dependencies:
pip install -r requirements.txt -
Create a
.envfile based on the example:cp example.env .env -
Customize the
.envfile as needed:OLLAMA_HOST: URL for the Ollama service (default: http://localhost:11434)CRON_HOURS: Interval for scheduled news fetching (default: 1)DATABASE_URL: SQLite database connection string
Frontend Setup
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
yarn
Running the Application
Running the Backend
-
Navigate to the backend directory:
cd backend -
Activate the virtual environment:
source venv/bin/activate # On Windows: venv\Scripts\activate -
Start the backend server:
uvicorn app.main:app --reloadThe backend will be available at http://localhost:8000
Running the Frontend
-
Navigate to the frontend directory:
cd frontend -
Start the development server:
yarn dev:watchThe frontend will be available at http://localhost:5173
Building for Production
Building the Backend
The backend can be deployed as a standard FastAPI application. You can use tools like Gunicorn with Uvicorn workers:
pip install gunicorn
gunicorn app.main:app -w 4 -k uvicorn.workers.UvicornWorker
Building the Frontend
-
Navigate to the frontend directory:
cd frontend -
Build the frontend:
yarn buildThe built files will be in the
distdirectory and can be served by any static file server.
API Endpoints
The backend provides the following API endpoints:
GET /news: Get news articles with optional filteringGET /meta/last_sync: Get the timestamp of the last feed synchronizationPOST /meta/cron: Set the schedule for automatic feed synchronizationGET /meta/feeds: List all configured feedsPOST /meta/feeds: Add a new feedDELETE /meta/feeds: Delete a feedGET /meta/model: Check the status of the LLM modelPOST /meta/sync: Manually trigger a feed synchronization
Environment Variables
Backend
OLLAMA_HOST: URL for the Ollama serviceCRON_HOURS: Interval for scheduled news fetching in hoursDATABASE_URL: SQLite database connection string
License
Code ist unter der PolyForm Noncommercial 1.0.0 lizenziert. Für jegliche kommerzielle Nutzung bitte Kontakt aufnehmen.