Skip to content

tonievictor/ogugu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ogugu

Ogugu is a backend application for an RSS feed aggregator and reader. It allows users to add RSS feed URLs to a centralized database, subscribe to multiple feeds, and regularly fetch and aggregate new posts from these feeds for seamless consumption.

Features

  • Adding and managing RSS feed links in a shared database
  • Subscribing to various RSS feeds to personalize content
  • Periodic fetching and aggregation of RSS feed posts to keep user content up-to-date

Built with

  • Golang
  • Postgres
  • Redis
  • Docker
  • CobraCLI

Prerequisites

  1. Golang 1.24+
  2. Docker - For containerized services (PostgreSQL & Redis)
  3. Git
  4. Golang-Migrate
  5. Swag Cli - For API testing

Infrastructure (Optional)

  • kind
  • kubectl
  • terraform

Setup

  1. Clone the repository and navigate into the project directory
git clone https://github.com/tonievictor/ogugu && cd ogugu
  1. Install dependencies
go get ./..
  1. Copy the .env.example file to .env and provide the necessary values for your local setup:
cp .env.example cmd/server/.env
  1. Set up the database and cache (optional):

Note

If you don't already have a PostgreSQL and Redis instance, you can set them up by running the following command. This will spin up PostgreSQL and Redis containers and expose them on your machine

docker compose up -d
  1. Run Database Migrations
export PGURL=<databaseurl>
migrate -database ${PGURL} -path migrations up

Kubernetes and Monitoring Setup (optional)

  1. Setup a kubernetes cluster

Tip

For local development and testing, kind (Kubernetes IN Docker) is recommended. It provides a lightweight Kubernetes cluster running inside Docker containers on your machine.

kind create cluster
  1. Provision infrastructure with Terraform
cd infra/monitoring
terraform init
terraform plan   
terraform apply
  1. Verify Deployment
kubectl get pods -n monitoring
  1. Expose monitoring dashboards to localhost
# forward grafana port
kubectl port-forward svc/grafana 3000:80 -n monitoring
# forward tempo port
kubectl port-forward svc/tempo 4318 -n monitoring

Usage

After completing the setup and deployment, follow these steps to run the application and interact with its API:

  1. Generate Swagger Docs
swag init -g cmd/server/main.go
  1. Run the application
cd cmd/server && go run main.go
  1. Access the Swagger UI to test the API at http://localhost:<port>/v1/swagger/index.html

View monitoring dashboard (if set up):

CLI

Ogugu comes with a CLI tool that allows you to fetch RSS posts from all subscribed feeds. This is useful for running periodic updates via a cron job or other task scheduler.

  1. Build the CLI binary
go build -o cli cmd/cli/main.go
  1. Run the CLI
./cli cron --database "<database connection string>"

## replace <database connection string> with your actual PostgreSQL connection string.

About

Backend application for an rss file reader

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors