Skip to content
Contact uscontact@scalemorph.com

Case Study / Eviction Support Group

Legal Tech AI — RAG & Document Automation

Built for Eviction Support Group with Patrick B.: guarded chat on web and Twilio SMS, LangChain LLM modules, document automation, and structured human escalation.

← All case studies
Client
Patrick B. · Eviction Support Group
Industry
Legal Tech
Project Type
Chatbot + Workflow Automation
Timeline
12 weeks
Technology
SvelteKit, NestJS, LangChain, Twilio SMS, Supabase Postgres, Monday.com
Infrastructure
AWS

The challenge

Find the real problem.

Eviction Support Group wanted to automate onboarding without losing control.

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.

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.

No consistent escalation logic

When a conversation needed a human, there was no reliable path from chat to legal team review.

Risk of chatbot drift

In a legal environment, off-tone responses or accidental advice create trust and compliance problems quickly.

Document workflows created friction

Client onboarding, information capture, and document generation were slowing the team down at exactly the wrong point.

What we built

Connect the pieces.

A full-stack conversational system designed for control, continuity, and action.

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.

Client-facing chat on web and Twilio SMS

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 API orchestration

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.

LLM chatbot through LangChain modules

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.

Tone, sentiment, and direction analysis

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.

Guardrails and human escalation

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 on an AWS-driven stack

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.

Document intake and generation

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.

One pipe for web and SMS

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

Better with every build.

Good chat systems manage momentum, not just messages.

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 is useful early, but fragile at scale

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.

Keyword logic does not scale

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.

Conversation state matters more than single-message prompts

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.

Chat is strong for onboarding and pre-qualification

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.

Human escalation is part of the product, not a backup plan

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.

Tone and sentiment affect outcomes

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.

Workflow integration matters more than chatbot novelty

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.

SMS works when the API owns the conversation

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

A stronger foundation.

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.

SvelteKitNestJSLangChainTwilioSupabaseAWS

Discuss a similar build

Want this kind of
delivery for your team?

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.