Skip to content

eason-dev/product-hunt-today

Repository files navigation

Product Hunt Today

Product Hunt Today Twitter account

A Twitter bot @ProductHunToday that tweets trending Product Hunt products every day, in short video!

Features

  • 🎬 Daily video summaries of top 5 Product Hunt products
  • 🕐 Twice daily posts: End-of-day summary (00:05 PST) and mid-day trending (12:00 PST)
  • 📱 Square video format (720x720) optimized for Twitter
  • 🤖 Fully automated via GitHub Actions

Tech stack

Sample tweet

https://twitter.com/ProductHunToday/status/1506186218714849287

Twitter post from Product Hunt Today

Get started

Install dependencies

First, ensure you have Node.js v22 LTS installed (or use nvm with the .nvmrc file):

nvm use  # If using nvm
pnpm install

Setup environment variables

Create .env file, with your Product Hunt & Twitter API key

REACT_APP_PRODUCT_HUNT_API_KEY="<your-key>"
TWITTER_CONSUMER_KEY="<your-key>"
TWITTER_CONSUMER_SECRET="<your-key>"
TWITTER_ACCESS_TOKEN_KEY="<your-key>"
TWITTER_ACCESS_TOKEN_SECRET="<your-key>"

Fetch products

This will call Product Hunt API, and store result in data files

pnpm fetch          # Stores in data/today.json

# For mid-day post (shows "Trending Now" instead of "Yesterday's Top 5")
pnpm fetch:midday    # Stores in data/midday.json

Start preview

This will open browser to preview video

pnpm start

Render video

This will store generated videos in the out directory

pnpm build          # Outputs to out/video.mp4

# For mid-day post
pnpm build:midday    # Outputs to out/midday-video.mp4

Post to Twitter

pnpm post-tweet

# For mid-day post
pnpm post-tweet:midday

Run tests

pnpm test      # Run linting and type checking
pnpm lint      # Run ESLint only
pnpm lint:fix  # Fix ESLint issues

# Run complete mid-day workflow (fetch + build + post)
pnpm midday

Contribute

PRs are welcome!

Feel free to DM me on Twitter @EasonChang_me if any suggestions

Support

Support me in creating more awesome projects!

"Buy Me A Coffee"

About

A Twitter bot @ProductHunToday that tweet trending Product Hunt products every day, in short video!

Topics

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •