π https://serenio-eosin.vercel.app
A voice-first mental health companion web app built with React + TypeScript, powered by on-device AI using the @runanywhere/web SDK. All AI inference runs locally in the browser via WebAssembly β no server, no API key, 100% private.
"Would you share your deepest feelings with an app that sends everything to a server? Serenio keeps it all on your device. Always."
| Page | What it does |
|---|---|
| Voice | Speak naturally β Serenio listens, understands, and responds like a caring friend. Full STT β LLM β TTS pipeline runs on-device. |
| Chat | Type your thoughts and get warm, casual responses from Serenio β no cloud, no data leaving your device. |
| Mood | Log your daily mood, get 15 personalized activity suggestions with quotes, and track your 7-day mood history. |
| History | Your private journal β every voice and chat session saved locally on your device only. |
- Zero cloud costs β all inference runs on your device
- True privacy β your voice, thoughts and feelings never leave your browser
- Works offline β airplane mode? No problem
- Instant responses β no network latency, sub-100ms time to first token
- Crisis detection β immediate helpline shown for sensitive situations
Serenio automatically detects crisis situations and immediately shows verified Indian mental health helplines:
| Helpline | Number | Hours |
|---|---|---|
| iCall | 9152987821 | MonβSat, 8amβ10pm |
| Vandrevala Foundation | 1860-2662-345 | 24/7 |
| AASRA | 9820466627 | 24/7 |
| Snehi | 044-24640050 | MonβSat, 8amβ10pm |
npm install
npm run devRun locally, then open:
http://localhost:5173. Models download on first use and are cached in the browser's Origin Private File System (OPFS) β subsequent visits load instantly.
| Model | Purpose | Size |
|---|---|---|
| LFM2 350M (LiquidAI) | LLM β conversation responses | ~250MB |
| Whisper Tiny | STT β speech to text | ~105MB |
| Piper TTS (Lessac) | TTS β text to speech | ~65MB |
| Silero VAD v5 | Voice activity detection | ~5MB |
@runanywhere/web (npm package)
βββ WASM engine (llama.cpp, whisper.cpp, sherpa-onnx)
βββ Model management (download, OPFS cache, load/unload)
βββ TypeScript API (TextGeneration, STT, TTS, VAD, VoicePipeline)
Voice pipeline flow:
User speaks β VAD detects speech β Whisper transcribes β LFM2 responds β Piper speaks back
β
Everything runs locally. Nothing sent to any server.
src/
βββ main.tsx # React root + SDK preload + SOS button
βββ App.tsx # Tab navigation fallback
βββ runanywhere.ts # SDK init + model catalog
βββ pages/
β βββ Landing.tsx # Splash / welcome screen
β βββ Home.tsx # Voice orb β main experience
β βββ Session.tsx # Chat interface
β βββ Mood.tsx # Mood check-in + activity suggestions
β βββ History.tsx # Journal / session history
βββ components/
β βββ Sidebar.tsx # Navigation sidebar
β βββ SOSButton.tsx # Always-visible crisis help button
β βββ VoiceTab.tsx # Voice pipeline (fallback)
β βββ ChatTab.tsx # Chat (fallback)
βββ context/
β βββ ThemeContext.tsx # Light/dark mode
β βββ HistoryContext.tsx # Session + mood persistence (localStorage)
βββ workers/
β βββ vlm-worker.ts # VLM Web Worker
βββ hooks/
β βββ useModelLoader.ts # Model download/load hook
βββ styles/
βββ index.css # Global styles + Tailwind
- Color palette β Warm cream
#FDF6EC, Soft peach#F4A261, Sage green#84A98C - Typography β Nunito (calm, friendly, readable)
- Theme β Light mode default, dark mode supported
- Feel β Like a warm hug in app form. Not clinical, not scary.
npm run build
npx vercel --prodThe included vercel.json sets the required Cross-Origin-Isolation headers.
Add a _headers file:
/*
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: credentialless
Serve the dist/ folder with these HTTP headers:
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: credentialless
- Chrome 96+ or Edge 96+ (recommended: 120+)
- WebAssembly (required)
- SharedArrayBuffer (requires Cross-Origin Isolation headers)
- OPFS (for persistent model cache)
- Microphone access (for voice features)
- Led and developed the complete frontend architecture
- Designed and implemented full UI/UX across all major features
- Built reusable and scalable React components
- Integrated on-device AI pipelines (STT, LLM, TTS) with frontend
- Developed core features like Voice, Chat, Mood tracking, and History
- Improved responsiveness and overall user experience
- Contributed to feature planning and product design
This project was originally developed collaboratively during a hackathon.
This repository is a personal reconstruction created to showcase my contributions and work.
MIT