The 47-Line Code That Made One Developer $2 Million from AI
In late 2024, a solo indie developer quietly pushed a 47-line Python script to GitHub.
No fancy launch campaign. No YC backing. No elaborate startup infrastructure.
Just 47 lines of code.
Six months later, that same snippet was powering a SaaS product generating nearly $2 million in annualized revenue.
This isn’t some fairy-tale cooked up for Twitter likes. It’s a sharp reminder that we are now in an era where simplicity, when paired with AI’s explosive capabilities, can outperform teams of engineers and tens of thousands of lines of code.
So how did it happen? Let’s break down the story, the idea, the execution — and what this means for every developer today.
The Problem It Solved
Every SaaS founder knows the pain:Â customer support tickets.
They pile up in Zendesk, Intercom, Freshdesk, or email inboxes.
Support teams have to manually triage them: “Is this a bug? A feature request? A billing problem?”
This grunt work delays responses, frustrates customers, and drags down CSAT (Customer Satisfaction) scores.
The indie dev saw an opportunity hiding in plain sight.
What if AI could:
Summarize each incoming ticket so the support agent didn’t have to read walls of text.
Classify it automatically into one of three categories:
Bug
Feature Request
Billing Issue
This was not a new idea conceptually. But the key was execution. GPT-based APIs had become cheap and reliable enough that a single script could outperform existing, bloated enterprise “AI support automation” platforms.
The Original 47 Lines of Code
Here’s a simplified version of the original code that started it all:
import openai import json def classify_and_summarize(ticket_text): prompt = f""" Summarize the following support ticket in 2 sentences. Then classify it into one of these categories: - Bug - Feature Request - Billing Issue Ticket: {ticket_text} """ response = openai.ChatCompletion.create( model="gpt-4o-mini", messages=[{"role": "user", "content": prompt}], max_tokens=150 ) result = response['choices'][0]['message']['content'] return result # Example usage ticket = "I tried to pay my subscription but the payment keeps failing. Can you fix it?" print(classify_and_summarize(ticket))
That was it. A wrapper around the OpenAI API, packaged into a simple callable function.
47 lines.
No complex architecture. No databases. No machine learning pipelines. Just a clean bridge between support tickets → GPT → structured output.
From Script to Product
Of course, a GitHub repo doesn’t generate millions on its own. The genius was in how the developer turned those 47 lines into a productized service.
Here’s the step-by-step journey:
1. Packaging as a SaaS API
The developer wrapped the function in a lightweight FastAPI service and hosted it on a $5/month VPS.
Instead of requiring teams to copy-paste tickets, they could send support tickets programmatically and receive structured JSON summaries back.
2. Zapier/Slack Integrations
The breakthrough came when he built plug-and-play integrations with the tools support teams already used:
Zapier workflows
Slack notifications
Direct Zendesk/Intercom connectors
Suddenly, support managers didn’t need to be technical. They could just install the integration and watch their ticket triage vanish overnight.
3. Landing Page & Positioning
The landing page wasn’t fancy — just a clean headline:
“Automated Support Ticket Summaries & Classification – Powered by AI.”
Underneath, a demo GIF showed tickets being ingested and spit out as neat summaries with categories attached.
The pricing? $49/month per team, with higher tiers for volume.
4. Word-of-Mouth Growth
Support leaders started tweeting about how it cut their triage time by 80%. Indie hackers shared it on Product Hunt.
Within weeks, dozens of SaaS teams subscribed. Within months, hundreds.
The Numbers Behind the Growth
By month three:Â $40,000 MRRÂ (monthly recurring revenue). By month six:Â $160,000 MRRÂ (~$2M annualized run rate).
Here’s why the growth was so explosive:
Painkiller, not vitamin: Support ticket triage is a real, burning pain.
Immediate ROI: Saving hours of manual labor directly improved customer satisfaction scores.
Simple pricing: Flat monthly fee, no complex usage tiers initially.
Ridiculously lean: The “company” was literally one developer and a few server bills.
Why This Worked in 2024 (and Beyond)
The timing mattered. Here’s why those 47 lines worked in 2024 when they might not have in 2020:
AI Reliability GPT-4-level models were accurate enough that companies could trust them for real business workflows.
Cheap Infrastructure Cloud hosting and serverless APIs meant the entire backend cost less than $100/month at launch.
Market Maturity By 2024, SaaS founders were comfortable plugging AI into their workflows. The “trust barrier” had dropped.
Solo Dev Advantage A solo indie hacker could move faster than bloated incumbents building “AI support suites” with 20 engineers.
Technical Lessons from the 47 Lines
For developers eyeing similar opportunities, here are some takeaways:
Don’t over-engineer early. The first version was a single function. Get something working, then iterate.
Leverage APIs instead of reinventing. The magic wasn’t in building a custom LLM — it was in how the GPT API was applied.
Focus on integration. The “product” wasn’t the model. It was the ease of plugging it into Zendesk and Slack.
Measure business value, not just technical novelty. The script solved a painful, costly problem. That’s what made people pay.
The Human Side: Indie Hacker Mindset
What makes this story remarkable isn’t just the code — it’s the mindset.
Most developers, when they think of AI, dream of building the next ChatGPT. Huge visions, massive engineering projects.
But this indie hacker took the opposite approach:Â find a small, boring, painful problem and apply AI in the simplest possible way.
The result wasn’t glamorous. It wasn’t revolutionary. But it was valuable. And in business, value wins.
From Side Project to Serious Business
Six months in, the indie dev faced a new challenge: scale.
Server Scaling:Â Moving from a $5 VPS to autoscaling cloud infrastructure.
Team Growth:Â Hiring contractors to handle support and integration requests.
Compliance:Â Adding SOC-2 and GDPR compliance to win enterprise deals.
But here’s the kicker: even as the business grew, the core logic was still just those original 47 lines of Python. Everything else was scaffolding.
What This Means for Developers Today
So, what’s the lesson for you, reading this in 2025?
Small Code Can Have Big Impact You don’t need 10,000 lines of microservices to create value. Sometimes, 47 lines is enough.
AI is a Force Multiplier APIs like GPT mean you can focus on workflow and integration, not training models.
Execution > Ideas A hundred people thought of “AI support ticket triage.” One person executed simply, quickly, and effectively.
The Indie Hacker Era is Back The barrier to building profitable SaaS has never been lower. One laptop + one idea = potentially millions.
Final Thoughts
The story of the “47-line, $2M script” is more than just a feel-good indie hacker tale. It’s a snapshot of where we are today:
AI has democratized leverage.
Solo developers can rival startups with dozens of engineers.
Simplicity often beats complexity.
And maybe most importantly: the best AI businesses aren’t always about building new models. They’re about applying existing ones to real problems, in the leanest way possible.
So, next time you’re staring at a problem that feels too “small” to matter, remember: 47 lines of code solved a boring pain point — and built a multimillion-dollar business.










