Skip to content

Hazel-Lin/github-trending-radar

Repository files navigation

GitHub Trending Radar

GitHub Trending Radar is a small TypeScript project that turns the daily GitHub Trending page into a personalized email digest.

It fetches trending repositories, scores them against a practical builder profile, generates recommendation reasons and action ideas in Chinese, and sends the digest through SMTP.

What it does

  • Fetches the daily GitHub Trending list from https://github.com/trending?since=daily
  • Extracts repository metadata such as rank, description, language, stars, and contributors
  • Matches repositories against a profile focused on AI products, automation, content systems, and SaaS tooling
  • Ranks the best-fit repositories for your current work
  • Generates a Chinese digest with recommendation reasons and suggested ways to apply each project
  • Sends the digest by email through QQ Mail, Gmail, or any custom SMTP server
  • Supports both dry run mode and real email delivery

Why this project exists

Most GitHub Trending digests are generic. This project is opinionated: it tries to answer a more useful question.

Which trending repositories are actually worth your time, given the products and workflows you are building right now?

Instead of only showing popularity, it adds a practical relevance layer:

  • keyword matching
  • preferred language matching
  • project-direction hints
  • simple practice suggestions for turning a repo into something usable

Project structure

src/collectors     Fetch and parse GitHub Trending
src/trending       Profile and shared type definitions
src/reports        Ranking and digest generation
src/email          SMTP email rendering and sending
src/tasks          End-to-end task orchestration
scripts/           CLI entry point

Requirements

  • Node.js 18+ recommended
  • pnpm
  • An SMTP account for actual email delivery

Installation

pnpm install
cp .env.example .env.local

Then edit .env.local with your mail settings.

Environment variables

Basic setup

SMTP_USER=your@qq.com
SMTP_PASSWORD=your_smtp_authorization_code
MAIL_FROM=your@qq.com
TRENDING_EMAIL_TO=your@gmail.com

Optional tuning

TRENDING_PROFILE_NOTE=
TRENDING_PROFILE_KEYWORDS=
TRENDING_REPO_LIMIT=10
TRENDING_RECOMMENDATION_LIMIT=5

SMTP behavior

The project resolves SMTP settings in this order:

  1. Explicit SMTP config from environment variables
  2. QQ Mail defaults when the sender ends with @qq.com
  3. Gmail defaults when the sender ends with @gmail.com

Supported variables in code:

SMTP_HOST=
SMTP_PORT=
SMTP_SECURE=
SMTP_USER=
SMTP_PASSWORD=
MAIL_FROM=

GMAIL_USER=
GMAIL_APP_PASSWORD=

TRENDING_EMAIL_TO=

Usage

Run a local dry run:

pnpm digest:dry-run

Send the digest email:

pnpm digest:send

Override the recipient:

pnpm digest:send -- --to=you@example.com

Control how many repos are scanned and recommended:

pnpm digest:dry-run -- --repo-limit=15 --recommendation-limit=5

Output

The digest contains:

  • a short summary for the day
  • your current profile summary
  • focus areas
  • top recommended repositories
  • reasons each repo is relevant
  • practical ideas for how to apply it

The email is generated in both HTML and plain text.

Profile customization

The default profile is designed for a builder working on:

  • AI tools
  • agent workflows
  • automation pipelines
  • content systems
  • growth tooling
  • productized scripts

You can adjust the digest without changing code:

  • TRENDING_PROFILE_NOTE overrides the profile summary shown in the email
  • TRENDING_PROFILE_KEYWORDS appends extra matching keywords as a comma-separated list

Development

Type-check the project:

pnpm typecheck

Recommended local validation:

pnpm typecheck
pnpm digest:dry-run

Automation

Example crontab entry on macOS:

0 9 * * * cd /Users/linhuizi/Desktop/Project/github-trending-radar && /opt/homebrew/bin/pnpm digest:send >> /tmp/github-trending-radar.log 2>&1

Any scheduler is fine as long as it ultimately runs pnpm digest:send.

CI

The repository includes a GitHub Actions workflow that runs:

  • pnpm install --frozen-lockfile
  • pnpm typecheck
  • pnpm digest:dry-run

Suggested next steps

If you want the email to look more like a high-signal personal briefing rather than a ranked list, the next iteration should focus on the report layer, not the collector.

Recommended improvements:

  1. Add a richer profile format with project-level goals, current bets, and excluded topics.
  2. Replace generic recommendation text with a more explicit template: why it fits -> what to build with it -> which current project it supports first.
  3. Add category tags such as Agent Infra, Content Workflow, Growth Research, and Dev Productivity.
  4. Add a second output mode for "top 3 with deeper writeups" instead of "top 5 shorter items".
  5. Persist daily snapshots so you can compare trend changes over time instead of only seeing one day at a time.

For this repo specifically, the highest-leverage direction is:

turn the current scorer into a reusable "trend-to-briefing" engine that can later support GitHub Trending, Reddit, Product Hunt, or niche market signals with the same report format.

Contributing

See CONTRIBUTING.md.

License

MIT

About

Daily GitHub Trending radar with Chinese recommendations and SMTP delivery.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors