Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open startup #270

Merged
merged 15 commits into from Feb 2, 2022
Merged

Open startup #270

merged 15 commits into from Feb 2, 2022

Conversation

joemasilotti
Copy link
Owner

@joemasilotti joemasilotti commented Feb 2, 2022

This PR adds /open to publicly display metrics. It also adds /admin/transactions to manually add expenses and contributions.

Data is pulled from Stripe and Fathom via rake open_startup:refresh_metrics which will run once per day via bundle exec open_startup:refresh_metrics.

  • Revenue is calculated from Stripe charges by summing amount.
  • Expenses are calculated by adding Stripe fees (from charges) to additional fees from balance transactions. These are grouped by month and manual expenses are added in.
  • Contributions are pulled from Stripe (2% of revenue to CO₂ removal) and manual entries (% of profits to women-focused communities).
  • MRR is calculated by multiplying the active subscription count by $99. (This does not account for annual plans or coupons, if railsdevs ever adds either.)
  • Visitors are pulled via the Fathom API thanks to @afomera's gem, fathom_api.

Pull request checklist

  • Your code contains tests relevant for code you modified
  • You have linted and tested the project with bin/check

@joemasilotti joemasilotti marked this pull request as ready for review February 2, 2022 19:58
@joemasilotti joemasilotti merged commit fb9a38d into main Feb 2, 2022
5 checks passed
@joemasilotti joemasilotti deleted the open-startup branch February 2, 2022 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant