Releases: rameerez/profitable
v0.5.0
What's New
- Add
Profitable.ttm_revenuefor trailing twelve-month revenue - Add
Profitable.ttmas a founder-friendly alias forttm_revenue - Add
Profitable.revenue_run_rate,estimated_arr_valuation,estimated_ttm_revenue_valuation, andestimated_revenue_run_rate_valuation - Make revenue metrics net of refunds when
amount_refundedis present - Make subscriber and MRR metrics distinguish between current billable subscriptions and historical period events
- Count
new_customersfrom first monetization date rather than signup date - Count
new_subscribers/new_mrrfrom when a subscription becomes billable, not when a free trial starts - Handle additional Pay status variants like
on_trial,cancelled, anddeleted - Keep grace-period subscriptions billable until
ends_at - Exclude metered Stripe items from fixed run-rate MRR calculations
- Surface TTM revenue in the built-in dashboard
- Extract shared metric logic to
lib/profitable/metrics.rbfor cleaner architecture
Full Changelog: v0.4.0...v0.5.0
What's Changed
Full Changelog: v0.4.0...v0.5.0
v0.4.0
What's New
Monthly & Daily Summary Tables — The dashboard now shows a 12-month summary table (new/churned subscribers, MRR, churn rate per month) and a 30-day daily summary table. Available via Profitable.monthly_summary and Profitable.daily_summary.
period_data method — New Profitable.period_data(in_the_last:) returns all period metrics (new_customers, churned_customers, churn, new_mrr, churned_mrr, mrr_growth, revenue) in a single efficient call.
Bug Fixes
new_mrrwas countingincomplete,incomplete_expired, andunpaidsubscriptions — now only countsactivenew_subscriberswasn't filtering outtrialing/pausedsubscriptions- Status constants moved to module level so
MrrCalculatorcan reference them
Performance
Dashboard optimized from ~176 queries to 38 per page load:
- Monthly summary: 72 → 5 queries (bulk load + Ruby grouping)
- Daily summary: 60 → 2 queries
- Period cards: 27 → 18 queries (via
period_data) - Controller precomputation eliminates redundant calls from the view
Code Quality
- 5 period methods DRY'd via
_in_perioddelegation subscriptions_with_processorhelper eliminates repeated join/select/include chains- Test helper fully synced with production code
- 249 tests, 382 assertions, 94.64% coverage
What's Changed
- Add Claude Code GitHub Workflow by @rameerez in #7
- Fix bugs, DRY up code, add monthly/daily summaries, and optimize dashboard (~176 → 38 queries) by @rameerez in #8
Full Changelog: v0.3.0...v0.4.0
v0.3.0
v0.2.2
Fix bad calculations; add syntactic sugar:
- Improve MRR calculations with prorated churned and new MRR (hopefully fixes bad churned MRR calculations)
- Only consider paid charges for all revenue calculations (hopefully fixes bad ARPC calculations)
- Add
at:parameter as a named parameter option forestimated_valuation, like (estimated_valuation(at: "3x") - Add
multiple:parameter as another option forestimated_valuation(same asat:, just syntactic sugar) - Now
estimated_valuationalso supportsNumeric-only inputs likeestimated_valuation(3)
🎉 Initial release!
Provides essential methods to calculate SaaS metrics like MRR, ARR, LTV, ARPC, estimated valuation, churn, etc. – with a simple dashboard to display them.