citycontacts: The AI-Optimized SaaS Monolith

How a Rails 8 boilerplate uses embedded rules and a custom CLI to turn Claude and Cursor into your founding engineering team.

6 min read • View on GitHub • More from coreyhaines31

A close-up, top-down view of a classic wooden drafting table. Two hands are working collaboratively on a single architectural blueprint. One hand is human, holding a drafting pencil. The other hand is mechanical, holding a metal compass. They are drawing perfectly aligned, interconnected geometric shapes. The image illustrates the concept of a codebase explicitly designed as a collaborative workspace for humans and AI agents.
The modern boilerplate is a shared workspace.

a Rails 8 template by @ryanckulp, created to ship SaaS apps quickly.

Key Takeaways

The AI Co-Founder's Onboarding Doc

For decades, software boilerplates have targeted a single audience: human developers. They exist to save keystrokes, providing a pre-configured starting line. citycontacts, a Rails 8 template built on the Speedrail architecture, fundamentally shifts this paradigm. It is written to onboard an artificial intelligence.

The repository includes specific files like .cursor/rules/ruby.mdc and CLAUDE.md. These aren't standard READMEs; they are behavioral guidelines for autonomous agents. By encoding architectural decisions—such as keeping controllers thin and delegating logic to service objects—the boilerplate ensures that when an LLM generates new features, it mimics the original author's exact style and intent.

Hedcut portrait of Ryan Kulp

The DNA Rewrite

A recurring problem with cloned templates is the lingering residue of the original project's namespace. Manually hunting down and replacing generic names in configuration files is tedious and error-prone. citycontacts solves this with a custom CLI tool: bin/speedrail.

This binary acts as a meta-generator. Running a single command surgically rewrites the application's DNA, instantly renaming namespaces, directories, and configuration files to transform the generic template into a unique product.

The Speedrail CLI safely renames the entire application namespace without breaking dependencies.

The Majestic, Pragmatic Monolith

Beneath the AI optimizations lies a fiercely pragmatic Rails 8 monolith. It actively rejects the complexity of microservices, opting instead to bundle everything a solopreneur needs into a single repository. This includes Stripe Embedded Checkout, which keeps users on-site for better conversion, and a robust Active Admin back-office.

The application also features an integrated data-mining engine. The ApifyScraperService and ScrapeCreatorsService interface with third-party APIs to extract location data from social media profiles. Rather than relying on heavy NLP models, the system uses simple Regex pattern matching to parse bios—a "good enough for MVP" philosophy that prioritizes speed.

A chaotic, scattered pile of dozens of disconnected, tiny pocket watches with tangled chains on the left. On the right, a single, massive, beautifully intricate clockwork tower standing tall and solid, with visible interlocking gears. The image contrasts the complexity of microservices with the power of a unified monolith.
The Majestic Monolith vs. Microservices.

The Velocity Trade-Off

Speedrail is highly opinionated. It dictates the use of Tailwind CSS, Devise for authentication, and Pretender for user impersonation. This lack of flexibility is a deliberate trade-off. By removing micro-decisions, it allows the developer—and their AI agents—to focus entirely on business logic.

Featurecitycontacts (Speedrail)Traditional Rails Starters
Target AudienceAI Agents & SolopreneursHuman Development Teams
Setup Process1-Click CLI RenameManual Find & Replace
AI ReadinessEmbedded .cursor/rulesNone
ArchitectureHighly Opinionated MonolithFlexible / Modular