alex shapalov Profile picture
Building ActiveRabbit πŸ‡ open-source to $10k MRR β€” $529/mo πŸš€ @Remotely_jobs 100k+ users β€’ Daily vibe-coded builds & revenue β€’ πŸ‡ΊπŸ‡¦β†’πŸ‡ΊπŸ‡Έ
Dec 3 β€’ 9 tweets β€’ 4 min read
37signals open-sourced Fizzy, their Kanban tracker for issues & ideas. @dhh

I went through the code and stole 10 patterns you can reuse in your own Rails / SaaS app πŸ‘‡

github.com/basecamp/fizzy 1️⃣ Account slug multi-tenancy (no namespaced controllers)

Fizzy uses a rack middleware (AccountSlug::Extractor) that:

Pulls the numeric account id from the URL
Rewrites SCRIPT_NAME / PATH_INFO
Wraps the request in Current.with_account

Result: the whole app is effectively mounted at /{account_id} and controllers stay clean & non-multi-tenant-aware.Image