Twitter Stripe MRR
Twitter Stripe MRR
Node script to calculate your total monthly revenue from Stripe (using payouts) and update your Twitter bio (location) based on your MRR goal
Explore the docs »
View Demo
·
Report Bug
·
Get Help
Twitter Stripe MRR
Node script that calculates your total monthly revenue from Stripe (using payouts) and updates your Twitter bio (location) based on your MRR goal.
Built With
Getting Started
To use this script locally, make sure you have the prerequisites and then follow the installation steps.
Prerequisites
- Node and npm(download here)
- Stripe API key (get from Dashboard here)
- Twitter API keys
- Sign up on Developer Portal
- Either in your project app or Standalone app, click the Key icon
- Get the Consumer Keys (key and secret)
- Get the Access token and secret
Installation
-
Click "Use this template" and then clone locally
-
yarn
-
cp .env.example .env
-
Add your API keys to
.env
-
Run script in dry-run mode (doesn't actually post to Twitter):
yarn dryRun # or run directly node index.js --dry-run
-
Run the script and post to Twitter:
yarn start # or run directly node index.js
Usage
Here are a couple screenshots of people using this in the indie hacker space:
Deployment
This script will run on a regular cadence (once a week on Sunday, see cron syntax in run.yaml) out-of-the-box using GitHub Actions.
Assuming you clicked the "use this template", follow these steps:
- Add your
.env
variables to Settings > Secrets and ensure Actions are enabled. - That's it!
You can verify that everything is working by going to Actions > Health check > Run workflow.
This will perform a dry-run where you can double-check that everything is working correctly.
Contributing
See CONTRIBUTING
License
Distributed under the MIT License. See LICENSE
for more information.
Acknowledgements
- @philipyoungg for the emoji in bio inspiration
- @yongfook for the idea
- Sreeram Venkitesh for the Twitter API refresher
- Jake Feasel for the
kFormatter
function on Stack Overflow - Matthew Mullin for Stripe monthly revenue help on Stack Overflow
- Leo Nagano for writing up a recap on Indie Hackers
Project inspired by this tweet
Image generated thanks to Tweetpik.
Support
Support the project by signing up for the UI.dev newsletter using our link!