Inspiration
Mental health support is often inaccessible due to high costs, stigma, or long waiting lists. We noticed that while many people have "venting" sessions with friends or AI, they rarely get actionable guidance to change their thinking patterns. We wanted to build Naledi—not just a chatbot, but a proactive companion that uses Cognitive Behavioral Therapy (CBT) principles to help users reframe negative thoughts into positive action.
We were inspired by the concept of "Tirelo" (Service) to create a tool that serves the human mind, making high-quality mental health support available 24/7 in your pocket.
What it does
Naledi AI is a comprehensive mental health ecosystem. Its core feature is an intelligent chat companion that doesn't just listen but actively guides users toward Cognitive Reframing.
Key features include:
- AI Cognitive Reframing: Naledi detects negative self-talk and gently guides the user to view the situation from a more empowered perspective.
- Daily Check-ups: Users track their mood and emotions, creating a data-driven view of their mental well-being over time.
- Wisdom & Lessons: A structured curriculum of mental resilience techniques (like "Positive Anchoring" and "The 1% Rule") that users can learn and practice.
- Affirmations: Personalized positive reinforcements managed daily.
How we built it
We built Naledi as a cross-platform mobile application to ensure it's always accessible.
- Frontend: We used React Native (Expo) to create a smooth, native experience on both iOS and Android.
- AI Engine: We leveraged Google's Gemini 3 API (specifically the experimental reasoning models) via OpenRouter. We chose Gemini for its superior reasoning capabilities and long context window. This allows Naledi to remember past sessions and provide deeply contextual advice rather than generic responses. The system prompt is carefully tuned to ensure Naledi acts as a compassionate, safe, and concise mental health professional.
- Backend: We used Supabase for secure user authentication (critical for health data), PostgreSQL database, and Row Level Security (RLS) to ensure privacy.
- Architecture: The app uses real-time updates for chat and structured JSON data for the "Wisdom" modules.
Challenges we ran into
- Prompt Engineering for Safety: Ensuring the AI remains helpful without crossing the line into medical diagnosis was difficult. We spent a lot of time refining the system prompt to ensure Naledi knows when to comfort and when to suggest professional help.
- Latency: We wanted the chat to feel instant. Optimizing the API calls and handling the UI state for "typing" animations required careful synchronization.
- Model Selection: Finding the right balance between the model's "creativity" and "adherence to CBT principles." Gemini's reasoning capabilities were a game-changer here.
Accomplishments that we're proud of
- The "Human" Feel: The UI, with its pulsing animations and "Naledi" avatar, feels genuinely welcoming.
- Structured Wisdom: We didn't just dump text; we built an interactive lesson system with quizzes and progress tracking.
- Security: Successfully implementing strict Row Level Security in Supabase means users' private thoughts are genuinely private.
What we learned
We learned that context is everything in mental health. Using a model like Gemini that can process a user's history allows for "long-term memory" in conversations, which builds trust. We also learned the importance of "micro-interactions"—like a smooth loading animation—in keeping a user calm during a stressful moment.
What's next for Naledi AI
- Multimodal Integration: Using Gemini's vision capabilities to allow users to upload journal entries or mood boards.
- Voice Mode: Adding live voice conversations for a more therapeutic experience.
- Professional Handoff: Integrating a booking system (already in prototype) to connect users with real local therapists when AI support isn't enough.
Built With
- expo.io
- gemini
- native
- node.js
- postgresql
- react
- supabase
- typescript
Log in or sign up for Devpost to join the conversation.