Serenova — AI Mental Health Companion
About the Project
Serenova is a voice-first AI mental health companion powered by Amazon Nova models on AWS Bedrock. It provides empathetic, real-time support through natural voice conversation, text chat, emotion detection, and crisis safety features.
Inspiration
Mental health support is hard to access. Long wait times, high costs, and stigma keep millions from getting help. We wanted to build something that's always available — a warm, non-judgmental companion you can talk to anytime.
Amazon Nova Sonic's speech-to-speech capability inspired us to go voice-first. Voice is the most natural way humans express emotion. A text chatbot can miss the trembling in someone's voice or the long pauses between words. Nova Sonic processes audio directly, preserving those emotional signals that matter most in mental health conversations.
The name Serenova combines "Serene" (calmness, peace of mind) and "Nova" (new beginning) — representing a new path to inner peace through AI-guided support.
What It Does
Serenova offers four support modes tailored to different needs:
- Companion — warm, empathetic conversation for everyday support
- Crisis Support — calm, safety-focused responses with automatic crisis resource display (988 Lifeline, Crisis Text Line)
- CBT Therapy — cognitive behavioral techniques to identify and reframe thought patterns
- Emotion Regulation — guided breathing exercises (4-4-6 pattern) and grounding techniques
Key features:
- Voice orb interface with real-time mic level visualization
- Browser-native speech recognition for voice-to-text
- AI responses powered by Amazon Nova Pro via Bedrock Converse API
- Three-tier graceful degradation (Voice → Text → Demo mode)
- Crisis keyword detection with automatic resource modal
- Premium dark theme UI with glassmorphism and ambient animations
- Four voice profiles: Empathetic, Calm, Professional, Warm
How We Built It
Frontend
React app with a custom voice orb UI. The orb uses CSS animations to reflect its state — idle, listening, thinking, responding. We used the Web Audio API's AnalyserNode for real-time mic level monitoring and the browser's SpeechRecognition API for speech-to-text transcription.
Backend
FastAPI (Python 3.11) with two versions:
- Local dev (
src/api/main.py) — full backend with Nova Sonic voice streaming, WebSocket support, MCP tools, emotion detection, and crisis detection - Production (
backend/main.py) — standalone, minimal backend for App Runner deployment using Nova Pro text chat via the Bedrock Converse API
AI Models
- Amazon Nova Sonic (
amazon.nova-sonic-v1:0) — speech-to-speech voice conversation - Amazon Nova Pro (
amazon.nova-pro-v1:0) — text chat, reasoning, response generation - Amazon Nova Lite (
amazon.nova-lite-v1:0) — fast lightweight text responses
Deployment
- Backend: Docker image → Amazon ECR → AWS App Runner
- Frontend: AWS Amplify (auto-deploy from GitHub)
- Infrastructure: AWS CDK for DynamoDB, S3, EventBridge, SNS, CloudWatch
Key Technical Decisions
- Voice-first with text fallback — Nova Sonic for the full experience, Nova Pro as a reliable fallback when voice isn't available
- Docker for App Runner — source-based Python deployments had PATH issues with uvicorn; Docker solved it completely
- Browser SpeechRecognition — instead of building a custom STT pipeline, we leveraged the browser's built-in speech recognition for the text fallback mode
- Standalone backend for production — separated
backend/main.pyfrom the fullsrc/api/main.pyto avoid complex import chains and Nova Sonic SDK dependencies on App Runner - In-memory session history — kept it simple with a 20-message sliding window per session, no database needed for the MVP
- Glassmorphism dark theme — mental health apps need to feel calm and safe; the dark theme with soft glows and ambient animations creates that atmosphere
Challenges We Ran Into
App Runner Deployment (The Big One)
App Runner's source-based Python runtime installs packages during build but runs in a separate environment where pip-installed binaries like uvicorn aren't in PATH. We tried:
uvicorn main:app— "executable not found"
The fix: switched to Docker image deployment via ECR. Building our own Docker image meant uvicorn was properly installed and in PATH. Problem solved.
Nova Sonic SDK Dependencies
The Nova Sonic SDK has heavy dependencies that aren't needed for text-only deployment. We solved this with lazy imports (try/except ImportError) and a separate standalone backend/main.py that only uses boto3 for the Bedrock Converse API.
Frontend Build on Amplify
npm ci failed because package-lock.json had a TypeScript version mismatch. Fixed by regenerating the lock file with npm install.
CORS and API Integration
Getting the React frontend to talk to the FastAPI backend across different origins required careful CORS configuration. We used allow_origins=["*"] for development simplicity.
Accomplishments That We're Proud Of
- Working live deployment — backend on App Runner, frontend on Amplify, both running in production
- Three-tier degradation — the app never crashes; it gracefully falls back from voice to text to demo mode
- Voice orb UI — the animated orb with real-time mic levels feels premium and calming
- Crisis detection — automatic keyword detection with immediate display of 988 Lifeline and other resources
- Breathing exercise — the 4-4-6 guided breathing with animated circle actually helps calm you down
- Four support modes — each mode has a distinct AI personality tuned for its purpose
- Full documentation — architecture diagrams, deployment guide, user guide, and this writeup
What We Learned
- App Runner source-based Python deployments are unreliable — Docker/ECR is the way to go
- Nova Sonic is powerful but requires careful integration — the streaming API needs proper session management and error handling
- Browser APIs are underrated — SpeechRecognition and Web Audio API gave us voice features without any backend dependencies
- Graceful degradation is essential — users should never see a broken app, just a reduced-feature version
- Mental health AI needs careful prompt engineering — the system prompts for each mode required iteration to feel warm without being patronizing
- Keep production deployments simple — the standalone
backend/main.pywith minimal dependencies was the key to a successful deployment
What's Next for Serenova
- Full Nova Sonic voice streaming in production — deploy the complete voice pipeline on App Runner or ECS
- Persistent conversation history — DynamoDB storage for cross-session memory
- Emotion detection from audio — use Nova Sonic's audio features (pitch, volume, pace) for real-time emotion analysis
- Mobile app — React Native version for iOS and Android
- Multi-language support — Nova Sonic supports multiple languages
- Therapist dashboard — optional professional oversight with user consent
- Journal feature — AI-guided journaling with mood tracking over time
- Group support sessions — moderated AI-assisted group conversations
Built With
| Category | Technologies |
|---|---|
| AI Models | Amazon Nova Sonic, Amazon Nova Pro, Amazon Nova Lite (AWS Bedrock) |
| Backend | Python 3.11, FastAPI, Uvicorn, boto3 |
| Frontend | React 18, JavaScript, CSS3, Web Audio API, SpeechRecognition API |
| Deployment | AWS App Runner, AWS Amplify, Amazon ECR, Docker |
| Infrastructure | AWS CDK, DynamoDB, S3, EventBridge, SNS, CloudWatch, IAM |
| Design | Glassmorphism, CSS animations, dark theme |
| Tools | Git, GitHub, AWS CLI, Docker Desktop |
Serenova is an AI companion and is not a replacement for professional mental health care. If you or someone you know is in crisis, call 988 or text HOME to 741741.
Built With
- amazon-apprunner
- amazon-bedrock
- amazon-cloudwatch
- amazon-dynamodb
- amazon-eventbridge
- amazon-nova-lite
- amazon-nova-pro
- amazon-nova-sonic
- amazon-sns
- amazon-web-services
- aws-amplify
- aws-cdk
- aws-kms
- boto3
- css
- fastapi
- html
- javascript
- mcp
- node.js
- python
- react
- web-audio-api
- websocket


Log in or sign up for Devpost to join the conversation.