Skip to content

RSS News API is a project that fetches RSS feeds from various sources, stores them in a Supabase database, and sends notifications to a Telegram channel. This project is designed to keep you updated with the latest news by automatically checking RSS feeds and notifying you via Telegram. Join our Telegram channel for updates:

License

Notifications You must be signed in to change notification settings

goktugcy/rss-telegram-notifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RSS News API Telegram

This project is an RSS News API that fetches RSS feeds from various sources, stores them in a Supabase database, and sends notifications to a Telegram channel.

RSS News API

Getting Started

Prerequisites

  • Hono
  • npm
  • Cloudflare Workers
  • Supabase account
  • Telegram Bot

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/rss-news-api.git
    cd rss-news-api
  2. Install the dependencies:

    npm install

Configuration

  1. Configure the wrangler.toml file for Cloudflare Workers:
    name = "rss-news-api"
    type = "javascript"
    
    [env]
    SUPABASE_URL = "https://your-supabase-url.supabase.co"
    SUPABASE_KEY = "your-supabase-key"
    TELEGRAM_BOT_URL = "https://api.telegram.org/bot<your-bot-token>/sendMessage"
    CHAT_ID = "-100232xxxxxx"
    
    [[triggers.crons]]
    schedule = "*/1 * * * *" # Runs every minute

Running the Project

  1. Start the development server:

    wrangler dev
  2. Deploy to Cloudflare Workers:

    wrangler publish

Usage

The API provides the following endpoints:

  • GET /: Returns a welcome message.
  • GET /news: Fetches news from the database.
  • GET /health: Checks the health of the Supabase connection.
  • GET /check-feeds: Manually triggers the RSS feed check and notification process.

Project Structure

  • src/index.ts: Main entry point for the Cloudflare Worker.
  • src/services/rssService.ts: Contains the logic for fetching RSS feeds and sending notifications.
  • src/db/supabase.ts: Contains the logic for interacting with the Supabase database.
  • wrangler.toml: Configuration file for Cloudflare Workers.

Contributing

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Make your changes.
  4. Commit your changes (git commit -m 'Add some feature').
  5. Push to the branch (git push origin feature-branch).
  6. Open a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

  • Hono - A small, simple, and fast web framework for Cloudflare Workers.
  • Supabase - An open-source Firebase alternative.
  • Telegram Bot API - The Bot API is an HTTP-based interface created for developers keen on building bots for Telegram.

About

RSS News API is a project that fetches RSS feeds from various sources, stores them in a Supabase database, and sends notifications to a Telegram channel. This project is designed to keep you updated with the latest news by automatically checking RSS feeds and notifying you via Telegram. Join our Telegram channel for updates:

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published