It's a web server that allows clients to:
- Add RSS feeds to be collected
- Follow and unfollow RSS feeds that other users have added
- Fetch all of the latest posts from the RSS feeds they follow
- RSS feeds are a way for websites to publish updates to their content.
You can use this project to keep up with your favorite blogs, news sites, podcasts, and more!
1.Set up your PostgreSQL DB locally
brew services start postgresql@15
2.Create a .env
file in the root directory and add the following: PORT
and DATABASE_URL
3.Do migrations using goose
goose postgres postgres:https://user:password@host:port/database?sslmode=disable up
4.Init the project
go build && ./out
I published each step of my design process in Medium, and it'll be helpful to follow along the details of this project with the articles if you want to learn to scrape:
- Build a Content Aggregator in Go(1-Servers)
- Build a Content Aggregator in Go(2-PostgreSQL)
- Build a Content Aggregator in Go(3-Create Users)
- Build a Content Aggregator in Go(4-API Key)
- Build a Content Aggregator in Go(5-Create a Feed)
- Build a Content Aggregator in Go(6-Get all feeds)
- Build a Content Aggregator in Go(7-Feed Follows)
- Build a Content Aggregator in Go(8-Scraper)
- Build a Content Aggregator in Go(9-Database POSTs Table)
The codebase needs refactoring and more optimizations, please feel free to contribute.
Some ideas:
- Support pagination of the endpoints that can return many items
- Support different options for sorting and filtering posts using query parameters
- Classify different types of feeds and posts (e.g. blog, podcast, video, etc.)
- Add a CLI client that uses the API to fetch and display posts, maybe it even allows you to read them in your terminal
- Scrape lists of feeds themselves from a third-party site that aggregates feed URLs
- Add support for other types of feeds (e.g. Atom, JSON, etc.)
- Add integration tests that use the API to create, read, update, and delete feeds and posts
- Add bookmarking or "liking" to posts
- Create a simple web UI that uses the backend API