All projects
PROJECT / Recovery support SaaS backend

AI Sponsor

Backend for a 24/7 AI sponsor chatbot for 12 step recovery programs: Claude based chat with prompt caching, Stripe subscription billing with webhooks, and a WhatsApp voice pipeline combining Whisper transcription with synthesized voice replies.

Node.jsExpressClaude APIStripeTwilioWhisper
Illustrative architecture
RECORDED PROJECT NOTES
Token cost
90% reduction
Billing
Stripe
Tests
12 suites

Selected engineering work by Muhammad Mubashir, showcased by Retrieva Labs. Figures and scope reflect the existing project notes. The evidence section explains what is available to review.

THE PROBLEM

A useful outcome starts here.

A recovery support SaaS needed a voice conversation channel over WhatsApp, alongside subscription billing and a chatbot backend.

THE SYSTEM

From input to useful output.

  1. 01Receive a voice note
  2. 02Transcribe with Whisper
  3. 03Generate a contextual reply
  4. 04Synthesize speech
  5. 05Return the voice reply
ENGINEERING DECISIONS

The choices behind the system.

A stable prompt prefix

Static system instructions precede conversation history so prompt caching can reuse the stable part of the request.

Separate the boundaries

Session logic, webhook handling, security boundaries and audio hops need distinct tests to isolate regressions.

Observe the cost

The published note describes monitoring cache hit behavior alongside latency and token use.

AVAILABLE EVIDENCE

Project notes, with context.

The voice pipeline article records the implementation approach and a reported input token cost reduction. Client audio, private conversations and production logs are not published here.

Read the engineering note