MindMate AI

AWS Bedrock Lambda Next.js 14 Claude 3 Haiku

Overview

MindMate AI is a secure, serverless therapeutic AI companion powered by Claude 3 Haiku via AWS Bedrock, designed to provide empathetic mental health support with enterprise-grade security. The system features multi-layered safety guardrails including crisis detection, jailbreak prevention, and harmful content filtering.

Key Features

  • AWS Bedrock-powered conversational AI with Claude 3 Haiku
  • Real-time crisis detection with KIRAN helpline routing (1800-599-0019)
  • Advanced jailbreak prevention (13 attack pattern detectors)
  • Harmful content filtering (explicit/violent content blocking)
  • Identity protection (rigid MindMate persona enforcement)
  • Streaming message responses with optimistic UI
  • Mood tracking with emoji-based selector
  • Modern Next.js 14 frontend with Framer Motion animations
  • Serverless architecture (zero infrastructure management)

Technical Implementation

Leveraging AWS Bedrock's Claude 3 Haiku model, the serverless Lambda backend analyzes conversation patterns through regex-based detection systems. The crisis detection module uses keyword matching to identify self-harm/suicide indicators, immediately providing KIRAN Mental Health Helpline information. Jailbreak prevention blocks prompt injection attacks, while content filters ensure therapeutic safety. The Next.js 14 frontend delivers a responsive, accessible interface with real-time streaming and mood tracking.

Stack: Python + TypeScript | AWS Lambda + Next.js 14 | Claude 3 Haiku (AWS Bedrock)

Impact

This AI companion provides accessible, cost-effective mental health support while prioritizing user safety through intelligent multi-layered security. The serverless architecture ensures scalability and compliance, potentially saving lives by connecting individuals in distress with appropriate crisis resources while maintaining strict therapeutic boundaries.