This project is a fully functional RSS aggregator built using Go and Chi Router.
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.
- 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.
- Go (version 1.16 or higher)
- PostgreSQL
- Clone the repository:
git clone <your-repo-url>
cd rss-aggregator
- Install dependencies:
go mod tidy
- 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.
- Run database migrations:
goose up
- Build and run the application:
go build
./rss-aggregator
To start the application, use the following command:
./rss-aggregator
- 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 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.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for details.