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.
- 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
- Golang
- Postgres
- Redis
- Docker
- CobraCLI
- Golang 1.24+
- Docker - For containerized services (PostgreSQL & Redis)
- Git
- Golang-Migrate
- Swag Cli - For API testing
- kind
- kubectl
- terraform
- Clone the repository and navigate into the project directory
git clone https://github.com/tonievictor/ogugu && cd ogugu- Install dependencies
go get ./..- Copy the
.env.examplefile to.envand provide the necessary values for your local setup:
cp .env.example cmd/server/.env- 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- Run Database Migrations
export PGURL=<databaseurl>
migrate -database ${PGURL} -path migrations up- 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- Provision infrastructure with Terraform
cd infra/monitoring
terraform init
terraform plan
terraform apply- Verify Deployment
kubectl get pods -n monitoring- 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 monitoringAfter completing the setup and deployment, follow these steps to run the application and interact with its API:
- Generate Swagger Docs
swag init -g cmd/server/main.go- Run the application
cd cmd/server && go run main.go- Access the Swagger UI to test the API at
http://localhost:<port>/v1/swagger/index.html
- Navigate to: http://localhost:3000
- Login credentials can be found in terraform/values/grafana.yaml
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.
- Build the CLI binary
go build -o cli cmd/cli/main.go- Run the CLI
./cli cron --database "<database connection string>"
## replace <database connection string> with your actual PostgreSQL connection string.