Mirror — Project Story
Inspiration
Mental health struggles are incredibly common, yet access to support is still limited. Millions of people experience stress, anxiety, and self-doubt, but therapy is expensive, difficult to access, or unavailable in the moment it’s needed most.
We realized that one of the hardest parts of mental health isn’t a lack of advice — it’s being stuck in your own thoughts. When you’re overwhelmed, your thinking becomes distorted, and it’s difficult to step outside of that mental loop.
Research shows that people give better advice to others than to themselves. That insight inspired us to ask:
What if you could talk to a version of yourself that thinks clearly?
What it does
Mirror helps users escape negative thought loops by talking to an AI version of themselves.
It builds a personalized AI persona using the user’s own writing, reflection responses, and optional voice input. This allows Mirror to respond using the user’s tone, reasoning style, and values — not generic advice.
Mirror supports three modes:
- Vent: provides emotional validation without giving advice
- Reframe: helps challenge negative thinking patterns
- Boost: delivers short, confidence-driven responses
By externalizing internal thoughts, Mirror allows users to step outside their mindset and interact with a clearer version of themselves.
How we built it
We built Mirror as a full-stack, identity-driven AI system:
- Frontend: React + Vite + Tailwind for a responsive, real-time interface
- Backend: FastAPI for handling API requests and orchestrating AI pipelines
- AI Layer:
- Claude for persona generation and conversational reasoning
- Whisper for speech-to-text
- ElevenLabs for voice synthesis
- Claude for persona generation and conversational reasoning
- Vector Database: ChromaDB to store and retrieve user-specific embeddings
We implemented a Retrieval-Augmented Generation (RAG) pipeline, where user data is chunked, embedded, and retrieved at runtime to personalize responses.
Responses are streamed using Server-Sent Events (SSE), and audio is generated in real-time to create a conversational experience.
Challenges we ran into
One of our biggest challenges was maintaining personalization without losing response quality. Simply feeding user data into a model wasn’t enough — we had to carefully design how context was retrieved and injected into prompts.
Another challenge was latency. Combining retrieval, generation, and voice synthesis can introduce delays, so we implemented streaming and chunked audio playback to keep interactions responsive.
We also had to think carefully about safety, adding a crisis detection layer to prevent harmful or inappropriate responses in sensitive situations.
Accomplishments that we're proud of
We’re most proud of building a system that feels genuinely personal, not generic.
- Mirror can respond in a way that reflects the user’s own thinking style
- We successfully integrated real-time voice interaction, making conversations feel natural
- We created a system that doesn’t just respond — it helps users shift their mental state
Most importantly, we built something that has the potential to make a real impact on people’s daily lives.
What we learned
We learned that building impactful AI is not just about models — it’s about how you structure the system around the user.
We also learned how powerful personalization can be when combined with the right architecture, especially using retrieval-based systems.
Finally, we realized that even small design decisions — like response tone or latency — can significantly affect how users experience emotional support.
What's next for Mirror
We want to expand Mirror into a more complete mental wellness platform by:
- Improving persona accuracy with better data modeling
- Enhancing voice realism and emotional tone
- Adding long-term insights and behavioral tracking
- Exploring integration with therapists or support systems
Our long-term goal is to make personalized, real-time mental support accessible to anyone, anywhere.
Built With
- built-with-frontend:-react
- chromadb-(vector-database)-architecture:-retrieval-augmented-generation-(rag)
- elevenlabs-database:-supabase-(postgresql)
- mediarecorder
- openai-whisper
- railway-(backend)-other-tools:-axios
- recharts
- server-sent-events-(sse)-cloud-/-deployment:-vercel-(frontend)
- tailwind-css-backend:-fastapi-(python)
- uvicorn-ai-models-&-apis:-claude-(anthropic)
- vite
- web-audio-api
Log in or sign up for Devpost to join the conversation.