alex shapalov Profile picture
Building https://t.co/SQ0ihOycsi πŸ‡ in public to $10k MRR (open-source SaaS rails) β€’ @Remotely_jobs 100k+ users β€’ Coding with vibes β€’ πŸ‡ΊπŸ‡¦β†’πŸ‡ΊπŸ‡Έ
Dec 3, 2025 β€’ 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