Unofficial 37signals Coding Style Guide
Transferable Rails patterns and development philosophy extracted from analyzing 265 pull requests in 37signals’ Fizzy codebase.
What This Is
Fizzy is a kanban-style project management app built by 37signals. We analyzed both the final source code AND the process that led to it—pull requests, git commits, code review discussions, and iterations. This dual approach captures not just what 37signals builds, but how they build it: their decision-making, trade-offs, and evolution of ideas.
What This Is Not
These are not Fizzy-specific implementation details. We deliberately skipped business logic unique to Fizzy and focused only on patterns you can apply to your own projects.
Important Caveats
LLM-Generated Content: This gu…
Unofficial 37signals Coding Style Guide
Transferable Rails patterns and development philosophy extracted from analyzing 265 pull requests in 37signals’ Fizzy codebase.
What This Is
Fizzy is a kanban-style project management app built by 37signals. We analyzed both the final source code AND the process that led to it—pull requests, git commits, code review discussions, and iterations. This dual approach captures not just what 37signals builds, but how they build it: their decision-making, trade-offs, and evolution of ideas.
What This Is Not
These are not Fizzy-specific implementation details. We deliberately skipped business logic unique to Fizzy and focused only on patterns you can apply to your own projects.
Important Caveats
LLM-Generated Content: This guide was largely produced by an LLM (Claude) analyzing PR descriptions and code snippets. Given the volume of text and code involved, there may be hallucinations or inaccuracies. Take everything with a grain of salt and verify against actual implementations. That said, I’ve found it useful as a reference in my own projects.
Code License: The code examples extracted from Fizzy are licensed under the O’Saasy License. Please review that license before using code snippets in your projects.
Table of Contents
Core Rails
- Routing - Everything is CRUD, resource-based patterns, resolve helpers
- Controllers - Thin controllers, rich models, composable concerns catalog
- Models - Concerns, state as records, Current context, PORO patterns
- Views - Turbo Streams, partials, fragment caching, view helpers
Frontend
- Stimulus - Reusable controller catalog with copy-paste code
- CSS - Native CSS, cascade layers, OKLCH colors, modern features
- Hotwire - Turbo Frames/Streams, morphing, drag & drop
- Accessibility - ARIA patterns, keyboard navigation, screen readers
- Mobile - Responsive CSS, safe area insets, touch optimization
Backend
- Authentication - Passwordless magic links without Devise
- Multi-Tenancy - Path-based tenancy, middleware, ActiveJob extensions
- Database - UUIDs, state as records, database-backed everything
- Background Jobs - Solid Queue patterns, tenant preservation, continuable jobs
- Caching - HTTP caching, fragment caching, invalidation
- Performance - Preloading, N+1 prevention, memoization
Real-time & Communication
- ActionCable - Multi-tenant WebSockets, broadcast scoping, Solid Cable
- Notifications - Time window bundling, user preferences, real-time
- Email - Multi-tenant mailers, timezone handling
Features
- Webhooks - SSRF protection, delinquency tracking, state machines
- Workflows - Event-driven state, undoable commands
- Watching - Subscription patterns, toggle UI
- Filtering - Filter objects, URL-based state
- AI/LLM Integration - Command pattern, cost tracking, tool patterns
Rails Components
- Active Storage - Attachment patterns, variants
- Action Text - Sanitizer config, remote images
Infrastructure & Testing
- Security Checklist - XSS, CSRF, SSRF, rate limiting, authorization
- Testing - Minitest, fixtures over factories, integration tests
- Configuration - Environment config, Kamal deployment
- Observability - Structured logging, Yabeda metrics
Philosophy
- Development Philosophy - Ship/Validate/Refine, vanilla Rails, DHH’s review patterns
- What They Avoid - Gems and patterns 37signals deliberately doesn’t use
Contributors
- Jason Fried - Product-oriented development, perceived performance
- Jorge Manrubia - Code review style, architecture decisions
Quick Start: The 37signals Way
- Rich domain models over service objects
- CRUD controllers over custom actions
- Concerns for horizontal code sharing
- Records as state over boolean columns
- Database-backed everything (no Redis)
- Build it yourself before reaching for gems
- Ship to learn - prototype quality is valid
- Vanilla Rails is plenty - maximize what Rails gives you
Acknowledgements
- 37signals for open-sourcing their codebase and giving the community a window into how they build software
- Mateusz Zolkos for his work identifying and cataloging the most educational PRs
- Claude Code for creating this guide through iterative deep-dive research sessions
Further Reading
- Fizzy Source Code - The official Fizzy repository with full git history
- Campfire Source Code - 37signals’ open-source chat application, another reference implementation
- Fizzy’s Pull Requests: Who Built What and How - Curated PR sequences organized by topic
- Fizzy JS Patterns - Drifting Ruby episode analyzing JavaScript patterns in Fizzy
- Read The Friendly Source Code - Beautiful Ruby code review covering architecture and security observations
- Writebook by ONCE - Code walkthrough of another 37signals open-source project
- On Writing Software Well - DHH’s screencast series on software development practices
Disclaimer
This is an unofficial guide created by analyzing publicly discussed code patterns. It is not affiliated with or endorsed by 37signals.
License
Code examples extracted from Fizzy are licensed under the O’Saasy License. All analysis, commentary, and original content in this guide is licensed under MIT.