The Modh Playbook
How we build production software. Every pattern, convention, and decision — from database queries to component architecture — distilled from real projects.
Data Layer
Database standards, repository patterns, server actions, and data fetching strategies.
Architecture
Route colocation, caching, multi-tenant isolation, and webhook design.
Route Colocation
04Files live next to the route that uses them
Webhook Architecture
05Building webhooks that never lose events
Multi-Tenant Security
07RLS: the database does the auth checking
Caching Strategy
08How we think about cache invalidation
Quality
Testing strategy, TypeScript strict mode, CI pipelines, and incident response.
CI Pipeline
065-second CI that catches everything
Testing Philosophy
07What we test and why — confidence over coverage
TypeScript Strict
07Zero any, generated types, strict mode always on
Testing Patterns
08Factories, mocking, and integration tests that prove it works
Incident Response
09When things break: our runbook
Security
Row-level security, input validation, security headers, and data lifecycle.
Input Validation
10Zod schemas at every boundary
Security Architecture
10Defense in depth for multi-tenant SaaS
Row Level Security Deep Dive
11Row Level Security as your authorization layer
Data Lifecycle
12Retention, rotation, and responsible deletion
Security Headers
12CSP, CORS, and webhook signature verification
Observability
Structured logging, error tracking, performance monitoring, and webhook observability.
Process
Agentic development, decision velocity, documentation, and project scoping.
Feature Design
17Think before you code — 2-3 approaches, then decide
Linear Tickets
18User stories, architecture context, sub-task breakdown
Pull Requests
19CI passes first, then a rich description with test plan
Project Scoping
20How we estimate and ship on time
Decision Velocity
21One-way doors vs two-way doors
Documentation as Code
22Three-layer docs for humans + AI
Agentic Development
23Building with AI agents, not against them
Progressive Loading
24The user should never wait
Frontend Craft
Component architecture, design standards, performance patterns, and internal tools.
Component Architecture
00Composition over configuration
Frontend Performance
00Suspense, streaming, and instant UI
Design Standards
22shadcn/ui, semantic tokens, premium by default
Internal Tools
24Data density over visual impact, scannability first