product-hunt-today
product-hunt-today copied to clipboard
A Twitter bot @ProductHunToday that tweet trending Product Hunt products every day, in short video!
Product Hunt Today

A Twitter bot @ProductHunToday that tweets trending Product Hunt products every day, in short video!
Tech stack
- Remotion: Generate short video in React!
- Product Hunt API 2.0 (GraphQL): Fetch trending products
- Twitter API: Tweet post thread with video
- Tailwind CSS: UI of video content
- Github Actions: Run scheduled job everyday (fetch data from Product Hunt -> generate video -> post Twitter)
- google/zx: Write modern shell script in JavaScript
- Node.js: v16.14.0
Sample tweet
https://twitter.com/ProductHunToday/status/1506186218714849287

Get started
Install dependencies
yarn 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 <ProjectRoot>/data/today.json
yarn fetch
Start preview
This will open browser to preview video
yarn start
Render video
This will store generated video in <ProjectRoot>/out/video.mp4
yarn build
Post to Twitter
yarn post-tweet
Contribute
PRs are welcome!
Feel free to DM me on Twitter @EasonChang_me if any suggestions
Support
Support me in creating more awesome projects!