What was wrong with the AI-generated demo
The first version was generated with AI tools by the founder and another developer. It was good enough to pitch the idea, but it was buggy, unfinished, and couldn't scale to serve real businesses: a chatbot that answers from each customer's own website, matches their brand, and installs anywhere.
The problem: AI chatbots that don't know your business
A generic AI chatbot answers from what it learned on the internet, not from your pricing, your services, or your policies. Building one that answers from your own content usually means hiring AI engineers and running servers, which small and mid-sized businesses won't do.
The Chat Company needed to make that a quick self-serve setup: point it at a website, and get a chatbot that knows the business, looks like the brand, and installs anywhere.
Fix or rebuild? Keeping 20% and rewriting 80%
I reviewed all of the code before changing anything. About 20% was general backend code that worked, so I kept it. The other 80% I rewrote, then built the rest of the product on that foundation.
Making customer data safe in a multi-tenant AI app
The production rule that matters most in a SaaS like this is that one customer's data never reaches another customer. Every search is filtered by business, so one customer's website content can never show up in another customer's chatbot.
Each page is split into chunks of about 500 characters that overlap slightly, and for every question the five most relevant chunks are given to the model as context. If the lookup is slow or fails, the chat still answers instead of breaking.
A visitor asks a question
The five most relevant chunks of that business's content are found
They're added to the prompt as context
The model streams an answer grounded in the website
Onboarding that survives slow crawls and closed tabs
Onboarding runs as a step-by-step flow that remembers where each business left off. Crawling and indexing take time and can fail, so a slow crawl or a closed tab never means starting again.
Enter the website URL
The crawler maps every page on the domain.
Pick the pages
The business chooses what the bot should learn.
The bot learns them
Pages are scraped, split into chunks, and indexed for search.
Style the chat window
Pick one of 56 templates and adjust it live.
Paste one script tag
Works on WordPress, Shopify, or plain HTML.
One script tag that works on any website
The chat widget is a single JavaScript file with its styles built in. It loads the business's settings, streams answers, and tracks sessions, without touching the rest of the site. That's why it installs the same way on WordPress, Shopify, or a hand-coded HTML page.
Businesses style it in a live customizer: 56 templates, plus controls for colours, fonts, message bubbles, the launcher button, position, and pop-up behaviour. Every change shows instantly in a preview next to the controls.
Chatbot analytics: seeing what visitors actually ask
The dashboard shows sessions, messages, unique users, token usage, and a replay of every conversation. For a business, that's a list of the questions its website doesn't answer well. For the product, token tracking and capped conversation length keep AI costs predictable.
The knowledge base view shows exactly which pages and chunks the bot has learned. The screenshot below is from Authentic Urban, the D2C store I also built.
Keeping AI costs predictable in production
Long conversations send more text to the model on every turn. I capped conversation history and answer length, and the dashboard tracks tokens per business, so each customer's AI bill stays predictable.
Inside The Chat Company
Results
Key decisions
Keep the 20% that worked, rewrite the rest
The general backend code from the demo worked, so rewriting it would have cost time for nothing. Everything else was rewritten so the product could serve real customers.
Filter every search by customer
One business's content must never appear in another's chatbot. Filtering at the search layer makes that a hard guarantee, not a hope.
Cap conversation history and answer length
Long conversations send more text to the model every turn. Capping them keeps each customer's AI bill predictable.
Onboarding as a resumable step-by-step flow
Crawling and indexing take time and can fail. Saving each step means a business always picks up where it left off.
Related reading