Skip to content

kaayce/rss-aggregator

Repository files navigation

RSS Aggregator API

This project is a fully functional RSS aggregator built using Go and Chi Router.

Table of Contents

Introduction

The RSS Aggregator is designed to collect and organize posts from multiple RSS feeds. It periodically fetches new posts and provides a simple API to interact with the aggregated data.

Features

  • Fetch and store RSS feeds: Automatically fetches RSS feeds and stores them in a database.
  • User management: Users can follow different feeds and see posts from those feeds.
  • API: A simple and intuitive API to interact with the aggregated posts and feeds.
  • Concurrency: Efficiently handles multiple feeds concurrently using goroutines.

Installation

Prerequisites

Steps

  1. Clone the repository:
git clone <your-repo-url>
cd rss-aggregator
  1. Install dependencies:
go mod tidy
  1. Set up the database:

Ensure PostgreSQL is running and create a database for the project. Update the database configuration in the config file or environment variables.

  1. Run database migrations:
goose up
  1. Build and run the application:
go build
./rss-aggregator

Usage

Running the Application

To start the application, use the following command:

./rss-aggregator

API Endpoints

  • GET /feeds: Get a list of all available feeds.
  • POST /feeds: Create a new feed.
  • GET /feeds/:id: Get details of a specific feed.
  • POST /feed-follows: Follow a feed.
  • GET /feed-follows: Get a list of feeds followed by the user.
  • GET /posts: Get a list of posts from followed feeds.

Configuration

Configuration options can be set through environment variables or a configuration file. The following are key configuration options:

  • DATABASE_URL: URL for the PostgreSQL database.
  • PORT: Port on which the server will run.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

License

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

About

Go RSS Aggregator API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published