In today’s world, mental health care is often reactive rather than proactive. Recognizing the urgent need for more personalized, accessible, and immediate mental health support, I developed My Nakama — an AI-driven mental health wellness application.
This application leverages cutting-edge AI technologies to offer tailored support, dynamic content, and immediate intervention when needed, all in one user-friendly platform.
🌟 Key Features & In-Depth Concepts:
1. Conversational RAG Agent: At the heart of My Nakama is a conversational Retrieval-Augmented Generation (RAG) agent, powered by LangchainJS. Unlike traditional AI models that generate responses purely based on training data, a RAG agent retrieves relevant information from a database or API in real-time, combining this with generative capabilities. This allows the agent to provide responses that are not only contextually accurate but also up-to-date and deeply personalized.
For example, if a user mentions feeling overwhelmed at work, the RAG agent can retrieve the latest coping strategies and combine them with empathetic responses tailored to the user’s unique situation.
2. AI Therapist Chat: The AI therapist feature allows users to engage in real-time, natural conversations with an AI designed to provide emotional support. This isn’t just a basic chatbot; the AI is trained to recognize subtle cues in language that indicate emotional distress, using Natural Language Processing (NLP) techniques to offer responses that are both empathetic and insightful.
The therapist is built using a combination of the Google Gemini API and LangchainJS, ensuring that conversations are both meaningful and therapeutic. The AI’s ability to adapt its responses based on the user’s ongoing inputs ensures that the support provided is personalized to each individual’s needs.
3. Journal Feature: Journaling has long been recognized as a powerful tool for self-reflection and mental health management. In My Nakama, users can securely record their thoughts and feelings, and the AI will analyze these entries to generate keywords that reflect the user’s mental state.
This keyword extraction is done using advanced NLP algorithms. For instance, if a user writes about feeling isolated, the AI might extract keywords like “loneliness” or “disconnection,” which then trigger tailored content in the blog section, such as articles on overcoming loneliness or videos on building social connections.
4. Dynamic Blog Section: One of the standout features of My Nakama is its dynamic blog section. Unlike static blogs that offer generic content, My Nakama updates its blog section based on the user’s journal entries.
Using the keywords extracted from the journal, the app makes API calls to content providers, such as YouTube for videos and various article databases. For example, if a user writes about summer holidays, the app might update the blog with travel tips, holiday recipes, and videos on planning the perfect vacation. If the journal entry is about stress or anxiety, the blog will feature articles on stress management, relaxation techniques, and mindfulness practices.
5. Emergency Support: Mental health issues can sometimes escalate to critical levels. My Nakama is equipped to recognize when a user is experiencing severe distress, such as suicidal thoughts or intense anxiety. The AI uses sentiment analysis to detect these red flags. When such serious issues are identified, the AI generates a customized message and immediately alerts the user’s designated emergency contact.
This feature ensures that help is on the way when it’s needed most, potentially saving lives by bridging the gap between the onset of severe mental health issues and the intervention of a trusted friend or family member.
🔧 Deep Dive into the Tech Stack:
React: The application’s user interface is built with React, allowing for a responsive, dynamic, and user-friendly experience. React’s component-based architecture made it easier to develop complex features like the AI chat and dynamic blog section.
TailwindCSS, DaisyUI: These CSS frameworks and component libraries were used to ensure that the app is not only functional but also visually appealing. TailwindCSS provides utility-first styling, DaisyUI adds pre-designed components. Backend:
Node.js: The backend is powered by Node.js, which handles API requests, database interactions, and real-time updates efficiently. Node.js’s non-blocking architecture was particularly beneficial in managing multiple tasks simultaneously, such as processing journal entries while maintaining the chat session.
LangchainJS: This library was crucial in developing the RAG agent, allowing the seamless integration of retrieval and generation models. LangchainJS facilitates complex AI workflows, enabling the app to combine information retrieval with real-time response generation. Database:
Supabase: All user data, including journal entries and chat logs, is securely stored in Supabase. This PostgreSQL-based backend was chosen for its real-time capabilities, making it easier to implement features like live updates in the dynamic blog section.
The Impact of My Nakama
My Nakama is more than just an application; it’s a step toward making mental health care more accessible, personalized, and proactive. By leveraging the latest AI technologies, this app has the potential to provide meaningful support to those who might otherwise struggle in silence. I’m incredibly proud of this project and believe it has the power to make a real difference.
I invite you to explore My Nakama and see how it can support you or someone you care about. Your feedback and thoughts would be greatly appreciated as we continue to refine and expand the capabilities of this unique mental health tool.
Built With
- express.js
- langchainjs
- react
- supabase

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