Legacy automation had become a mess
The client had been relying on an n8n setup that was hard to control, hard to extend, and increasingly fragile.
Case Study / Eviction Support Group
Built for Eviction Support Group with Patrick B.: guarded chat on web and Twilio SMS, LangChain LLM modules, document automation, and structured human escalation.
The challenge
They needed to automate client conversations, capture the information required to assess cases, and move people into their system faster — all without letting a chatbot drift into unsafe or unsolicited legal advice.
They had been using n8n, but it had become difficult to manage, difficult to scale, and difficult to control. The next version needed a custom NestJS API on AWS, SvelteKit on the front end, Twilio SMS, LangChain for the LLM chatbot, Supabase Postgres for data, and proper integration with their Monday.com-based process management.
The client had been relying on an n8n setup that was hard to control, hard to extend, and increasingly fragile.
When a conversation needed a human, there was no reliable path from chat to legal team review.
In a legal environment, off-tone responses or accidental advice create trust and compliance problems quickly.
Client onboarding, information capture, and document generation were slowing the team down at exactly the wrong point.
What we built
This was not a simple chatbot layer dropped on top of a prompt. We built a structured system on AWS: a SvelteKit frontend, a NestJS API for orchestration, LangChain modules for the LLM chatbot, Twilio for SMS, Supabase Postgres for data, and Monday.com for internal workflow handoff.
The goal was not just to answer messages. It was to guide users through onboarding, assess where the conversation was heading, support document workflows, and create a clean path to human escalation when needed.
Users could talk to the product over an embedded web experience and SMS. Twilio carried the SMS channel; SvelteKit powered the web UI. NestJS sat in the middle so both channels shared the same conversation and workflow logic.
NestJS powered the backend API and orchestration layer. It managed conversation routing, LangChain calls, Twilio webhooks, document handling, integrations, and broader application behaviour — far more maintainable than the previous no-code setup.
Rather than treating each message as an isolated prompt, LangChain modules evaluated messages within ongoing conversation state. That supported structured decision-making around prior context, user intent, tone, and where the interaction was heading before the model replied.
We built custom scoring around how the conversation was progressing — including sentiment, direction, and overall quality of the exchange. That allowed the system to better match user tone, identify when a conversation was becoming uncertain or sensitive, and decide whether to continue assisting or hand off to a staff member.
In a legal setting, the system needed boundaries. We implemented guardrails to keep the conversation focused, reduce drift, and support escalation into internal staff workflows when the conversation required judgment, review, or direct legal involvement. Monday.com was integrated as part of that internal operational path.
Supabase Postgres held persistent conversation, intake, and workflow data. The application and delivery path ran on AWS so the NestJS API, integrations, and chatbot services stayed production-owned rather than locked in a no-code host.
A major part of the build was automating onboarding and paperwork preparation. The system captured structured intake from users, mapped that information into the client's internal process, and generated PDFs and DOCX files to support legal document workflows behind the scenes.
Twilio SMS and the SvelteKit web chat both hit the same NestJS + LangChain path. That kept state, guardrails, and escalation consistent no matter which channel the user opened first.
What we learned
Through extensive research and iterative design, we discovered that the most effective conversational interfaces do not simply facilitate information exchange — they orchestrate rhythm, anticipation, and cognitive flow. This case study explores the principles that emerged from building a chat system that respects human attention.
n8n can be effective for smaller automations and early experimentation. But once a workflow becomes central to onboarding, client handling, internal operations, and document generation, no-code orchestration starts to show its limits.
Complexity grows quickly, debugging becomes painful, and incremental improvement gets harder. A coded system gives you far more control over structure, reliability, and long-term iteration.
A lot of chatbot systems still rely too heavily on brittle filtering, keyword triggers, and rigid branching logic. That approach breaks down quickly in real conversations.
Users change tone, provide incomplete information, go off track, or reveal intent gradually. If you want a chatbot to behave intelligently, it needs a deeper analysis layer that considers the conversation as a whole rather than matching fragments of text.
The difference between a weak chatbot and a useful one often comes down to whether it understands context over time. A legal onboarding conversation is rarely one clean exchange.
It unfolds across multiple steps, changing levels of confidence, and different emotional states. Systems need to evaluate where the user is in the journey — not just reply to the most recent message.
When implemented properly, chat can be extremely effective for early-stage conversion, intake, validation, and reducing friction in the first part of the customer journey.
Many users are perfectly happy to interact with a chatbot if it helps them move quickly, get answers, and complete the next step without delay.
There is no one-size-fits-all model where a chatbot fully replaces people in a trust-sensitive process. Some users want speed and self-service. Others want reassurance, nuance, or direct human support.
The strongest systems are hybrid: automation handles intake, categorisation, and repetitive guidance, while humans step in at the right moments for judgment, trust, and high-value conversations.
A conversation is not just a sequence of inputs. It has direction. It can build trust, lose trust, become confused, or become more urgent.
Scoring tone, sentiment, and conversational direction helped us design a more adaptive system — one that could better match the user's state, recognise when things were drifting, and trigger escalation sooner when needed.
The real value in this project did not come from making the chatbot feel clever. It came from connecting conversation to operational outcomes: structured intake, internal review, case progression, and document generation.
In practice, chatbot quality matters far less than whether the system actually moves work forward.
Twilio SMS is a strong channel for responsiveness, but only if the NestJS + LangChain layer owns state, guardrails, and escalation — not if SMS logic lives in a fragile no-code graph.
Pairing Twilio with a coded orchestration layer and a SvelteKit web surface kept both channels under the same rules.
Outcomes
The project replaced a fragile n8n workflow with a custom AWS-driven system — NestJS + LangChain, SvelteKit, Twilio SMS, Supabase Postgres, proper conversation state, tone analysis, document automation, and a clean escalation path into the client's internal team.
If you're building something similar, let's talk.
Discuss a similar build
Tell us the workflow that is stalling. We’ll map a first build, the stack, and how we’d hand it over — on a short call or in a written brief.
A conversation. No commitment.