Behind the Scenes: Building an AI Chatbot SaaS from Scratch
When I set out to build ScanChat — an AI chatbot widget builder for websites — I already knew how to build web apps. What I didn't fully appreciate until I was in it was how different building an AI-powered SaaS product is from a standard CRUD app. Here's what that process actually looked like.
Start with the boring infrastructure, not the AI
It's tempting to jump straight into prompt engineering and LLM behavior. I didn't. The first weeks went into the unglamorous stuff: user auth, widget embedding, usage tracking, and the MERN backend that everything else would sit on. AI features are only as good as the product wrapped around them — a brilliant chatbot in a broken dashboard doesn't get used.
Separate the LLM logic from the core app
ScanChat runs on a MERN stack for the core product, with a dedicated Python backend handling the LLM logic. This split matters: Python has far better tooling for AI work, but Node/Express is a better fit for the rest of the app. Trying to force everything into one language would have meant fighting the ecosystem instead of using it.
Design for more than one way to configure the bot
Early on, it was clear that one-size-fits-all chatbot behavior wasn't going to work for different business types. That's why ScanChat ended up supporting four distinct instruction modes — different businesses need their chatbot to behave differently, whether that's strict FAQ-answering or more open conversational support.
Pricing has to account for real usage costs
This is the part most first-time SaaS builders underestimate: every AI response costs money upstream. Flat pricing without usage awareness is a fast way to lose money at scale. That's part of why ScanChat offers a Bring Your Own LLM tier — for users who want more control over their own API costs, rather than forcing everyone through the same metered pricing.
Ship before it's "finished"
The version of ScanChat that launched wasn't the version I originally scoped. Instruction modes, pricing tiers, and even parts of the onboarding flow changed after real users started using it. Building in MERN, with MongoDB's flexible schema, made it possible to keep adjusting the product without a rebuild every time something needed to change.
The real lesson
Building an AI SaaS product isn't really about the AI — it's about building a normal, reliable product and then giving it an AI-powered feature that earns its place. The infrastructure, the pricing model, and the onboarding matter just as much as the LLM behind the chat window.
Thinking about building an AI-powered product of your own? I've built and shipped AI SaaS tools end-to-end, from the core app to the LLM integration. Book a call and let's talk through your idea.
Follow me to keep in touch
Where I share my creative journey, design experiments, and industry thoughts.




