- 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
yarn install
Create .env
file, with your Twitter Hunter & 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>"
This will call Product Hunt API, and store result in <ProjectRoot>/data/today.json
yarn fetch
This will open browser to preview video
yarn start
This will store generated video in <ProjectRoot>/out/video.mp4
yarn build
yarn post-tweet