Build vs Buy: The Engineering Value Equation
The "I can build this in a weekend" fallacy kills startups. A strategic framework for CTOs to decide between SaaS commodities and proprietary IP.
“I can build a search engine in a weekend. It’s just an inverted index.” “I can build an Auth system in a day. It’s just a JWT.” “I can build a CMS in a week. It’s just CRUD.”
This is the Siren Song of the Engineer. It is technically true. You can build the prototype in a weekend. But you cannot build the Product in a weekend. Because a Product includes:
- 99.99% Uptime SLA.
- Security Audits (SOC2).
- Edge Caching.
- Backward Compatibility.
- Documentation.
The decision to Build vs Buy is the single most important lever a CTO pulls. Pull it wrong, and your team spends 2026 patching a buggy home-grown CMS instead of shipping features that make money.
At Maison Code, we use a rigorous financial and strategic framework to make this call.
Why Maison Code Discusses This
We are often hired to clean up “Home Grown” messes. A client built their own E-commerce platform in 2018 using PHP. Now the lead dev has left. The platform is unsecurable. It is slow. The cost to migrate to Shopify is $100k. The cost to stay is $500k/year in maintenance. We help leaders avoid these traps. We are not afraid to say “Do Not Hire Us. Buy SaaS instead.”
1. The Core vs Context Framework (Geoffrey Moore)
Geoffrey Moore (Crossing the Chasm) defined this perfectly. Every activity in your company falls into one quadrant:
| Mission Critical | Not Mission Critical | |
|---|---|---|
| Differentiator | CORE (Build) | Innovation (Experiment) |
| Parity | CONTEXT (Buy) | Waste (Stop) |
The “Context” Trap
Most “Build” decisions are actually Mission Critical Context.
- Payments: Essential? Yes. Differentiator? No. (Nobody buys from you because your payment form is unique).
- Search: Essential? Yes. Differentiator? No. (Unless you represent Google).
- Email: Essential? Yes. Differentiator? No.
Rule: If it is “Context”, you MUST BUY. Use Stripe. Use Algolia. Use Klaviyo. Building “Context” is value destruction. You are spending scarce engineering hours recreating a commodity that your competitor buys for $500/month.
The “Core” Mandate
If it is Core, you MUST BUILD.
- Uber: The dispatch algorithm is Core. They cannot use “Dispatch-as-a-Service”.
- Amazon: The warehouse logistics software is Core.
- Netflix: The recommendation engine is Core.
If you Buy your Core, you have no moat. You are a reseller of someone else’s IP.
2. The Total Cost of Ownership (TCO) Calculator
Engineers underestimate the cost of building by factor of 10x. They calculate “Dev Time”. They ignore “Life Cycle Cost”.
Let’s say you want to build a “Store Locator”. Build Estimation: “It’s just the Google Maps API. 3 days dev.” Cost: $2,000.
The Reality (3 Year TCO):
- V1 Build: 5 Days (Reality check). $4,000.
- Hosting: Serverless functions + DB. $50/mo -> $1,800.
- Maintenance (Year 1): Google updates API. Breaking change. 2 days fix. $1,600.
- Feature Request (Year 1): Marketing wants “Filter by openness”. 3 days. $2,400.
- Security Patch (Year 2): Dependency vulnerability. 1 day. $800.
- Onboarding: New devs need to learn your custom spaghetti code. $2,000.
Total “Build” Cost: $12,600. Buy Cost (e.g., Stockist.co): $20/month -> $720.
Verdict: You burned $11,880 of shareholder value to build a Store Locator that is actively worse than the SaaS version.
3. The “Hybrid” Approach (Composable)
It is rarely a binary choice. The modern “Composable Architecture” allows you to Buy the Engine and Build the Car.
Example: CMS (Content Management)
- Buy (Headless CMS): Sanity/Contentful. They handle the Database, the APIs, the Image CDN, the Rich Text Editor, the Collaborative Editing, the Revisions.
- Build (Frontend): Next.js / Hydrogen. You build the presentation layer.
You buy the “Hard Engineering” (Infrastructure) and build the “User Experience” (differentiation).
Example: Search
- Buy (Algolia): They handle the indexing, the typo-tolerance, the synonyms, the sharding.
- Build (UI): You build the search bar, the instant preview, the result cards.
4. Vendor Lock-In: The Boogeyman
“If I use Auth0, I am locked in! What if they raise prices?” This is a valid fear. But compare it to Technical Debt Lock-In. If you build your own Auth, you are locked into your own code. And unlike Auth0, your code doesn’t have a team of 500 security engineers patching zero-day exploits.
Mitigation Strategy: The Adapter Pattern.
Don’t call auth0.login() all over your app.
Wrap it in lib/auth.ts.
If Auth0 raises prices 10x, you rewrite lib/auth.ts to point to Clerk or Firebase.
The switch cost is 1 week. The value of using Auth0 for 3 years is immense.
5. Maintenance: The Silent Killer
Code is a liability. Every line of code you write is a line you must debug, test, upgrade, and secure forever. Zero-Code is the ideal state. The best engineers are the ones who write the least code to solve the problem.
“Civilization advances by extending the number of important operations which we can perform without thinking about them.” — Alfred North Whitehead
SaaS allows you to “not think” about email delivery. Or payments. Or backups. This frees your brain to think about Customer Value.
6. The Migration Cost Fallacy
“If we buy Algolia, it will take weeks to integrate!” “If we build it ourselves, we can start coding today!” This is the Migration Cost Fallacy. Integration is a one-time cost. Build is a lifetime cost. Integration: 2 Weeks. Build: 3 Months (MVP) + Infinite Maintenance. Also, when you buy SaaS, you get “Best Practices” out of the box. You don’t just get a Search Engine. You get “Synonym Management”, “Analytics”, “A/B Testing”. If you build it, you have to invent those features yourself (which you won’t, so your product sucks).
7. Case Study: The $1M Search Engine
We audited a client who built their own ElasticSearch cluster. Team: 3 Senior Engineers ($600k/year). Infrastructure: AWS Large Instances ($50k/year). Management: 20% of CTO time. Result: The search was… okay. It didn’t handle typos well. It didn’t rank by popularity. Competitor: Used Algolia ($30k/year). Comparison:
- Client Cost: $1M+ over 3 years.
- SaaS Cost: $90k over 3 years.
- Quality: SaaS was 10x better. This is how companies die. They bleed capital on non-differentiating engineering.
8. The Exit Strategy (Data Portability)
When Buying SaaS, always ask: “How do I leave?” If you use Contentful, can you export your content as JSON? (Yes). If you use Shopify, can you export your customers? (Yes). If the answer is “No”, you are not Buying; you are Hostage Taking. We mandate a Data Portability Audit for every vendor. We simulate an “Exit” before we sign the contract. “Download all data. Restore it in a neutral DB.” If this takes > 1 week, we don’t sign.
9. Conclusion: The Decision Matrix
Before writing a single line of code, run this check:
- Is this feature unique to our business model?
- No -> Buy.
- Does a SaaS solution exist that covers 80% of requirements?
- Yes -> Buy.
- Is the cost of the SaaS > cost of 1 engineer/year?
- No -> Buy.
- Only if the answer is “Yes, No, Yes” -> Build.
Your job as a CTO is not to write code. It is to allocate capital efficiently to generate ROI. Buying SaaS is usually the highest-ROI activity you can do.
Need an honest audit?
Are your engineers reinventing wheels?