Skip to content

Case study · Digital Health · SaaS

Multi-Channel AI Support SaaS Platform

The backend for a 24/7 AI sponsor that supports people in 12-step recovery over chat and WhatsApp voice. It combines Claude-powered conversations, Stripe subscription billing and a prompt-caching architecture that cut LLM input costs by about 90%.

Client
Recovery-support SaaS startup
Project
AI Sponsor
Status
Delivered
LLM input-cost reduction
~90%
Chat and voice availability
24/7
Automated test categories
12

The challenge

The founders needed an always-available, emotionally careful AI companion that users could reach by text or by WhatsApp voice note, monetized through subscriptions and cheap enough to run around the clock.

A long, safety-critical system prompt made every message expensive, and the voice channel added latency at every hop.

whatsapp · ai-sponsor
24/7
0:14

whisper → “Tonight is hard. Can we talk for a minute?”

0:19

I’m here. Let’s take it one step at a time. What’s on your mind?

prompt cache · input tokens≈90% saved

Illustrative interface · client data never shown

Architecture · 5 stages

  1. 01

    Channels

    Web chat and WhatsApp via Twilio

  2. 02

    Transcribe

    Whisper speech-to-text

  3. 03

    Converse

    Claude with prompt caching and guardrails

  4. 04

    Respond

    Text or synthesized voice reply

  5. 05

    Bill

    Stripe subscriptions and webhooks

The solution

I built the Node.js/Express backend around Claude with a cache-first prompt structure: stable instructions first, conversation history next, the new turn last. That brought input-token costs down by about 90%, and I logged cache-hit rate as a first-class metric so savings could not silently disappear.

Stripe handles subscriptions, trials and webhook-driven lifecycle events. A WhatsApp voice pipeline receives voice notes through Twilio, transcribes them with Whisper, generates a reply with Claude and returns synthesized speech.

A 12-category automated test suite covers chat logic, sessions, webhooks and security boundaries separately from the audio hops, so a regression in conversation quality cannot hide behind a working audio path.

Engineering highlights

  • Prompt caching cut LLM input costs by about 90%
  • WhatsApp voice notes in, synthesized voice replies out
  • Stripe subscriptions with trials and webhooks
  • Safety guardrails in a 24/7 conversational product
  • 12-category automated test suite, including security

Technology

  • Node.js
  • Express
  • Claude API
  • Stripe
  • Twilio
  • WhatsApp Business API
  • OpenAI Whisper

Building something similar?

Get a candid view of the architecture, risks and timeline on a free 30-minute call, or ask the AI assistant how this approach would map to your project.

Book a discovery call
Available for new engagements

Have an AI initiative in mind? Let’s scope it in 30 minutes.

Free discovery call. You'll leave with a clear view of the architecture, risks and next steps, whether or not we work together. I reply within 24 hours.

Not ready to talk yet? Get an instant project plan.