Skip to content

v0.4.0

Latest

Choose a tag to compare

@rameerez rameerez released this 10 Feb 00:06

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_mrr was counting incomplete, incomplete_expired, and unpaid subscriptions β€” now only counts active
  • new_subscribers wasn't filtering out trialing/paused subscriptions
  • Status constants moved to module level so MrrCalculator can 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_period delegation
  • subscriptions_with_processor helper 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