OSS Stats

Automatically sync GitHub stars, forks, and npm download stats for your open source projects into your Convex database with scheduled updates.

Installation

npm install @erquhart/convex-oss-stats

About OSS Stats

A Convex Component for syncing and rendering open source project data.

Benefits

Use cases

how to track GitHub stars and npm downloads in Convex database

OSS Stats automatically fetches GitHub repository data (stars, forks, issues) and npm package statistics, then stores them in your Convex database with scheduled updates. You can query this data to build dashboards, track growth metrics, or trigger notifications when milestones are reached.

sync open source project metrics to database automatically

This component runs scheduled Convex functions that poll GitHub and npm APIs for your specified repositories and packages. It handles rate limiting, stores historical data, and keeps your project statistics current without manual intervention.

build open source project dashboard with Convex

OSS Stats provides the data layer for project dashboards by maintaining up-to-date statistics in your Convex database. You can query stars, downloads, contributor counts, and other metrics to create real-time visualizations and growth tracking interfaces.

Frequently asked questions

How often does OSS Stats update GitHub and npm data?

OSS Stats runs on Convex scheduled functions that you can configure based on your needs. The component includes sensible defaults for update frequency while respecting GitHub and npm API rate limits to ensure reliable data syncing.

What GitHub and npm metrics does this component track?

OSS Stats collects GitHub repository data including stars, forks, watchers, open issues, and basic repository information. For npm packages, it tracks download counts, version information, and package metadata, storing all data in structured Convex tables.

Does OSS Stats handle API rate limiting for GitHub and npm?

Yes, OSS Stats includes built-in rate limiting logic and error handling for both GitHub and npm APIs. It implements exponential backoff, respects API limits, and gracefully handles temporary failures to ensure consistent data collection.

Can I customize which repositories and packages OSS Stats monitors?

OSS Stats allows you to configure which GitHub repositories and npm packages to track through Convex environment variables or configuration. You can add or remove projects without code changes and the component will automatically adjust its monitoring.

Links