Categorygithub.com/kevinz7/go-RssAggregator
repositorypackage
0.0.0-20240220084717-df740c51b9c9
Repository: https://github.com/kevinz7/go-rssaggregator.git
Documentation: pkg.go.dev

# README

RSS Feed Aggregator and Scraper ðŸ“Ą

📖 Description

The RSS Feed Aggregator and Scraper is a blog aggregator service built in Go. This project showcases the construction of a RESTful API using Go, integrated with production-ready database tools such as PostgreSQL, SQLc, Goose, and pgAdmin. Unlike standard CRUD applications, this service features a long-running service worker that fetches data from remote locations over the internet, making it a robust solution for aggregating and scraping blog content.

🌟 Features

  • Sleek RESTful API built with the magic of Go.
  • Swift routing with chi router ðŸšĶ.
  • Rock-solid database management using PostgreSQL.
  • Smooth database migrations with the help of Goose ðŸĶĒ.
  • SQL wizardry courtesy of SQLc.
  • Keep tabs on your database kingdom with pgAdmin 🏰.
  • A diligent service worker that fetches data without breaking a sweat.

🔧 Technologies Used

  • Go
  • Chi router
  • SQLc
  • Goose
  • pgAdmin
  • PostgreSQL

🛠 Installation and Setup

Follow these steps to get your aggregator up and running:

  1. Clone the project
git clone <repository-url>
  1. Run database migrations
cd sql/schema
goose postgres 'postgres://postgres:root@localhost:5432/rssagg' up

make sure you have PostgresQL database installed, I recommend creating a new database named "rssagg" using pgadmin

  1. Run the application
go build && ./go-RssAggregator.exe

📚 API Documentation

Our service contains a set of API calls. You can use the Thunder Client to try them out:

  1. Health Check

  1. Simulate Error

  1. Create User

{
  "name": "User Name"
}
  1. Get User

  • Endpoint: GET http://localhost:8080/v1/user
  • Description: Retrieves user information. API_KEY can be retrieved from database
  • Headers:
    • Authorization: ApiKey YOUR_API_KEY
  • Body: None
  1. Create Feed

{
  "name": "Lanes Blog",
  "url": "https://www.wagslane.dev/index.xml"
}
  1. Create Feed

  1. Create Feed Follow

{
   "feed_id": "529c8b81-3259-4699-994e-112fbbe93600"
}
  1. Get Feed Follows

  1. Delete Feed Follows

  1. Get User Posts

Authentication

For endpoints requiring authentication, include an Authorization header with your API key:

Authorization: ApiKey YOUR_API_KEY

Your API key can be obtained from a user in the database.

ðŸĪ Special Thanks!

thanks you Lane Wagner and boot.dev for inspirations for this project.