Business Automation AI
Back to Feed
Build vs Buy9 min read

How We Built a $30k Personalization Tool for $4,800 in 4 Days (Open Source + AI)

Business Automation AI
Open-source stack diagram replacing a $2,400/month SaaS personalization vendor for a small B2B distributor

How We Built a $30k Personalization Tool for $4,800 in 4 Days (Open Source + AI)

A 32-person HVAC parts distributor got quoted $2,400 a month plus a $12,000 setup fee for an AI personalization tool — $40,800 in year-one cost, twelve-month minimum, six-month cancellation notice. We built the same system in four working days for $4,800 in fees and ~$80 a month in hosting and AI API charges. Revenue lifted 18% in the first 60 days. The vendor markup on most "AI personalization" tools is the product.

This post walks through the exact stack, the licenses you need to understand before you copy it, and the three situations where you should still pay the SaaS vendor.

The Project: What Replaced a $40,800 SaaS Quote

Our client is a 32-person specialty distributor selling HVAC and refrigeration parts to contractors and facilities teams. Their customers reorder constantly, but the legacy ordering portal was a search box. Contractors knew what they needed; new technicians did not. The owner wanted a portal that showed each customer the parts most relevant to their equipment history, with intelligent substitutes when something was backordered.

Here is the system we delivered.

LayerWhat it doesOpen-source toolCost
Customer database & APIStores equipment history, order patterns, real-time inventorySupabase$0 (self-hosted)
Workflow automationTriggers recommendations on login, sends substitution alerts on stockoutsn8n (self-hosted)$0
Recommendation logicRanks parts by equipment match + reorder frequency + margin60 lines of Python + OpenAI API for substitution descriptions~$40/month in API calls
Email digestsSends weekly "parts you may need" to dormant accountsListmonk$0 (runs on a $24/month server)

The full bill: $4,800 in our consulting fees plus roughly $80 a month in hosting and AI API charges. The vendor's first-year cost would have been $40,800.

The 18% revenue lift translated to approximately $11,000 a month in additional gross profit. The build paid for itself in 13 days.

Why the Math Works Now (and Didn't 3 Years Ago)

Two things changed.

Open source caught up. In 2022, building this would have required real software engineering: a database engineer, a backend engineer, someone for email infrastructure. In 2026, projects like Supabase and n8n hand you 80% of that work as a pre-built, self-hostable system. You configure rather than code.

AI filled the last 20%. The recommendation logic that would have required a data science contractor in 2022 is now a 60-line script using a hosted language model. Substitution descriptions ("This compressor has the same BTU rating and bolt pattern as the one you usually order") used to require a copywriter. Now they cost $0.001 per API call.

That combination — pre-built infrastructure plus on-demand intelligence — collapses the build timeline from months to days. The labor cost collapses with it.

10 Open-Source Building Blocks for SMB Automation

Below are the ten projects we keep in our active rotation. Each replaces a category of SaaS tool. Some are safe to deploy in any scenario; some carry licensing restrictions you need to understand before you commit. Where the viral version of this list got the funding numbers or licensing claims wrong, we've corrected them.

ProjectReplacesLicenseSafe to resell or white-label?
Cal.comCalendlyAGPLv3 (core) + paid commercial license for white-labelConditional — paid Platform License required
Plausible AnalyticsGoogle AnalyticsAGPLv3Self-host for own use: yes. Resell as hosted service: requires source disclosure or commercial license
GhostSubstack, paid newslettersMITYes, fully permissive
n8nZapier, MakeSustainable Use License (not OSI-approved)Internal use: yes. Hosting as a managed service for other businesses: prohibited
SupabaseFirebaseApache 2.0Yes, fully permissive
MedusaShopifyMIT — zero platform feesYes, fully permissive
AppFlowyNotionAGPLv3Conditional — copyleft restrictions on hosted services
CoolifyVercel, HerokuApache 2.0Yes, fully permissive
ListmonkMailchimpAGPLv3Self-host for own sending: yes. Hosting for clients: AGPL applies
PenpotFigmaMPL-2.0Yes, with file-level copyleft on modifications

A few deserve a closer look before you commit, because the marketing copy floating around them isn't always accurate.

n8n is the workhorse of our automation practice. It is also not, strictly, open source — its Sustainable Use License explicitly forbids running it as a managed service for third parties. For an SMB self-hosting n8n to automate its own operations, this is fine. For an agency that wants to run a shared n8n server and resell access, it is not. n8n has raised $254M and is now valued at $2.5B; the earlier "$14M" figure circulating online is four years out of date.

Supabase is genuinely permissive — Apache 2.0 — and has raised $544M to date at a $5B valuation. If you've seen "$116M raised" cited, that number is stale by two funding rounds.

Medusa is MIT-licensed and takes zero percent of your revenue. Claims that it charges 5% of sales are simply false; the project has no revenue share mechanism. They make money from a hosted cloud offering for customers who don't want to self-host.

AppFlowy has raised $6.4M, not $30M. Treat funding claims in social posts as marketing copy, not financial reporting.

Cal.com, Plausible, Listmonk use AGPLv3, which is fine for self-hosting your own operations but legally complicated when you're hosting the software as a service for paying customers. Either run them inside your own business, get a commercial license, or pick a permissive alternative.

The four projects safe for any deployment scenario, including reselling as a managed service: Ghost, Supabase, Medusa, Coolify.

What Does an Open-Source Stack Replace in a Typical SMB?

If you're running a 10-to-50-person business, here is the substitution we typically see when a client moves from SaaS sprawl to a self-hosted stack:

Vendor (typical SMB cost)Open-source replacementRealistic annual savings
Mailchimp / Klaviyo ($300–800/month)Listmonk$3,600–9,000
Calendly Teams ($120–400/month)Cal.com (self-hosted)$1,400–4,800
Google Analytics 360 or paid analytics ($200–500/month)Plausible$2,400–6,000
Zapier business plans ($500–2,000/month)n8n self-hosted$6,000–24,000
Hosted personalization ($800–3,000/month)Supabase + custom logic + AI API$7,000–30,000

A modest SMB consolidating four of these line items typically saves $20,000 to $40,000 annually. The infrastructure cost to replace them is usually under $200 a month.

When This Approach Doesn't Work

Open source is not free. It costs configuration time, security maintenance, and the willingness to own the system. Skip this approach when any of these are true.

You have no in-house technical owner and no automation partner. Self-hosted infrastructure needs a person who patches it when CVEs ship. Without one, you trade a vendor's $400/month for a $40,000 ransomware incident. If nobody on your team and nobody on retainer can take that responsibility, pay the SaaS vendor.

Your compliance regime requires vendor certifications you cannot replicate. HIPAA, SOC 2 Type II, ISO 27001 — the certifications themselves cost more than the SaaS tools you're trying to replace. If your customers contractually require a certified vendor, the open-source build is the wrong path.

The need is short-term. Building takes four days. Vendor signup takes four minutes. If you need personalization running by next Tuesday and you're not sure you'll keep it past Q3, just buy the SaaS.

You're already locked in deep. If your CRM, billing, fulfillment, and analytics are all wired through one ecosystem and you're three years into customizations, the migration cost will eclipse three years of savings. Migrate at a natural break point — a platform change, a CRM swap — not in isolation.

Where to Start

You do not need to build all of this yourself. You need to know it exists, and you need an automation partner who treats your business as the system to optimize, not as a list of products to upsell.

Three practical next steps for an SMB owner.

  1. Pull your last twelve months of SaaS invoices. List every recurring tool that costs more than $100 a month. For each one, look up whether an open-source equivalent exists. You'll typically find that 4 to 7 of your line items have credible alternatives.

  2. Pick the largest two line items. Not all of them — the largest two. Run the substitution exercise on those first. The math is more likely to work at the top of the spend list, where vendor margins are highest.

  3. Get a build estimate before signing your next annual renewal. When a SaaS renewal lands on your desk, ask one question: "What would it cost to replace this with an open-source equivalent and pay someone to maintain it?" If the build estimate is less than 18 months of subscription cost, the math favors building.

The trap is not open source versus SaaS. The trap is renewing a $30,000 contract without knowing the $4,800 alternative exists.

The Bottom Line

  • A SaaS personalization quote of $40,800/year was replaced with a $4,800 one-time build plus ~$80/month in hosting and AI API costs. Revenue lifted 18% in 60 days; the build paid back in 13 days.
  • The stack is unglamorous and well-documented. Supabase for the database, n8n for workflows, a 60-line Python script using a hosted language model for recommendations, Listmonk for email. None of it is custom AI research.
  • Licenses matter more than features. Ghost, Supabase, Medusa, and Coolify are permissively licensed (MIT or Apache 2.0). Cal.com, Plausible, Listmonk, and AppFlowy are AGPLv3 — fine for self-hosting, restricted for resale. n8n's Sustainable Use License forbids running it as a managed service for other companies.
  • Build when you have a technical owner, a 12+ month horizon, and no vendor-certification requirement. Buy SaaS when you don't.

Want to know which of your SaaS line items has a working open-source replacement? Our free 30-minute process audit reviews your last 12 months of subscriptions, identifies the top 3 build-versus-buy opportunities, and gives you a realistic estimate for each. No pitch, no pressure — book your audit here.