Note
This project was built as part of the Boot.dev curriculum. All credit for the project design, requirements, and learning objectives goes to Boot.dev. This is a guided project from their Go course focusing on building real-world applications with Go and PostgreSQL.
A powerful CLI tool for aggregating and managing RSS feeds. Gator allows you to collect RSS feeds from across the internet, store posts in a PostgreSQL database, and browse aggregated content directly from your terminal.
- Feed Management: Add and manage RSS feeds from any website
- User System: Register users and manage authentication
- Follow System: Follow and unfollow feeds added by other users
- Post Aggregation: Automatically fetch and store new posts from followed feeds
- Browse Posts: View summaries of aggregated posts with links to full articles
- PostgreSQL Storage: Persistent storage of feeds, users, and posts
Before installing Gator, make sure you have the following installed:
- Go 1.23+: Download Go
- PostgreSQL: Download PostgreSQL
Install the Gator CLI using Go's built-in package manager:
go install github.com/L-chaCon/gator@latestAfter installation, the gator binary will be available in your $GOPATH/bin directory (make sure this is in your PATH).
First, create a PostgreSQL database for Gator:
CREATE DATABASE gator;Create a configuration file at ~/.gatorconfig.json (or in your preferred config location):
{
"db_url": "postgres://username:password@localhost/gator?sslmode=disable",
"current_user_name": ""
}Replace username and password with your PostgreSQL credentials.
Run any necessary database migrations to set up the required tables (this step may vary depending on your migration setup).
Register a new user:
gator register <username>Login as an existing user:
gator login <username>View all registered users:
gator usersReset the database:
gator resetAdd a new RSS feed:
gator addfeed <feed_name> <feed_url>View all available feeds:
gator feedsFollow a feed:
gator follow <feed_url>View feeds you're following:
gator followingUnfollow a feed:
gator unfollow <feed_url>Browse aggregated posts:
gator browse [limit]View summaries of posts from feeds you follow, with optional limit on number of posts displayed.
Start feed aggregation service:
gator agg <time_between_requests>Starts a background service that periodically fetches new posts from all feeds.
-
Register and login:
gator register john_doe gator login john_doe
-
Add some feeds:
gator addfeed "Go Blog" https://blog.golang.org/feed.atom gator addfeed "Hacker News" https://hnrss.org/frontpage
-
Follow the feeds:
gator follow https://blog.golang.org/feed.atom gator follow https://hnrss.org/frontpage
-
Start aggregation:
gator agg 60s
-
Browse posts:
gator browse 10
For development, you can run the application directly:
git clone https://github.com/L-chaCon/gator.git
cd gator
go run . <command> [args...]To build a production binary:
go build -o gator .The resulting binary can be run without the Go toolchain installed.
Gator is built with:
- Go: Core application logic and CLI interface
- PostgreSQL: Data persistence for users, feeds, and posts
- SQLC: Type-safe SQL query generation
- Goose: Database migrations
- RSS Parsing: Automatic fetching and parsing of RSS/Atom feeds
If you encounter any issues or have questions, please open an issue on the GitHub repository.