Skip to content

0xrubusdata/rubus-cron

Repository files navigation

Rubus-Cron

🌿 Welcome to Rubus-Cron

Rubus-Cron is a Node.js microservice built with NestJS that periodically fetches economic and IT-related data from multiple sources (EU Parliament, Eurostat, Federal Reserve, US-BEA) and stores them in a PostgreSQL database.

The project is designed to:

  • πŸ”„ Collect data from APIs and RSS feeds.
  • πŸ— Normalize and transform the data into a unified format.
  • 🧠 Provide AI agents with structured historical data for context-based analysis.
  • πŸ•° Run on a cron job, ensuring the database is always up-to-date.

πŸš€ Features

  • Automated Data Collection πŸ“‘ (via API & RSS fetchers)
  • Scheduled Execution ⏳ (via cron jobs)
  • Data Normalization & Storage πŸ—ƒοΈ (via PostgreSQL)
  • Modular & Scalable Architecture πŸ—οΈ (NestJS & Docker)

πŸ“¦ Tech Stack


βš™οΈ Installation & Setup

1️⃣ Clone the repository

git clone https://github.com/YOUR_GITHUB_USERNAME/rubus-cron.git
cd rubus-cron

2️⃣ Install dependencies

npm install

3️⃣ Configure environment variables

Create a .env file at the project root:

POSTGRES_HOST=db
POSTGRES_PORT=5432
POSTGRES_USER=postgres
POSTGRES_PASSWORD=password
POSTGRES_DB=rubus

4️⃣ Run with Docker

docker-compose up --build

5️⃣ Access the application

πŸ“‘ Data Fetchers

Rubus-Cron integrates multiple data sources:

European Union:
    EU Parliament RSS Feeds
    Eurostat API
United States:
    Federal Reserve RSS Feeds
    US Bureau of Economic Analysis (BEA) API

Each data fetcher is modular and located in src/data-fetchers/.

πŸ›  Project Structure

rubus-cron/
 β”œβ”€β”€ src/
 β”‚   β”œβ”€β”€ app.module.ts          # Main NestJS module
 β”‚   β”œβ”€β”€ main.ts                # App entry point
 β”‚   β”œβ”€β”€ config/                # Environment configuration
 β”‚   β”œβ”€β”€ cron/                  # Scheduled jobs (cron)
 β”‚   β”œβ”€β”€ database/              # PostgreSQL integration
 β”‚   β”œβ”€β”€ data-fetchers/         # API & RSS fetchers
 β”œβ”€β”€ .env                       # Environment variables (not committed)
 β”œβ”€β”€ .gitignore                 # Ignore unnecessary files
 β”œβ”€β”€ Dockerfile                 # Docker container setup
 β”œβ”€β”€ docker-compose.yml         # Multi-container setup (app + PostgreSQL)
 β”œβ”€β”€ package.json               # Project dependencies
 β”œβ”€β”€ README.md                  # You are here

πŸš€ Running Tests

πŸ”Ή Run unit tests (fetchers & transformers)

npm run test:unit

πŸ”Ή Run functional tests (full ingestion flow)

npm npm run test:functional

πŸ”Ή Run integration tests (database persistence)

npm run test:integration

πŸ”Ή Run all tests

npm run test:all

πŸ›  Contributing

  • Fork the repo
  • Clone your fork
  • Create a new feature branch
  • Commit & push your changes
  • Create a Pull Request

πŸ“ License

This project is licensed under the MIT License.

✨ Future Enhancements

  • 🧠 AI Integration: Feed the collected data into LLMs (ChatGPT, LLaMA).
  • πŸ” Memory Vectorization: Store key insights for long-term AI context.
  • πŸ“Š Visualization: Create dashboards for economic & IT trends.

πŸ“ Author

🌐 Connect with Us

🎯 Happy Coding! πŸš€

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published