An empathetic AI-powered chatbot for supportive conversation, mental wellness guidance, and emotional well-being.
(Coming soon β UI in active development)
| Chat Interface | Wellness Dashboard | Mood Tracker |
|---|---|---|
MindFul is an AI-powered mental health chatbot designed to provide a safe, judgment-free space for users to express their feelings, receive supportive responses, and access wellness resources.
Unlike generic chatbots, MindFul is built with mental health context in mind β detecting emotional intent, responding empathetically, and escalating to professional resources when needed.
β οΈ Disclaimer: This chatbot is not a replacement for professional mental health care. If you are in crisis, please reach out to a licensed mental health professional or a crisis helpline.
| Feature | Status |
|---|---|
| π¬ AI-based empathetic conversation | β Done |
| π― Intent detection & response generation | β Done |
| ποΈ RESTful API backend (Node.js + Express) | β Done |
| π§ Mental wellness support responses | π In Progress |
| π Mood tracking over time | π Planned |
| π User authentication (JWT) | π Planned |
| π€ Voice chatbot integration | π Planned |
| π Wellness insights dashboard | π Planned |
| π€ RAG-based knowledge retrieval | π Planned |
| Technology | Purpose |
|---|---|
| Node.js | Runtime environment |
| Express.js | REST API framework |
| MongoDB | Database (planned) |
| Mongoose | ODM for MongoDB |
| JWT | Authentication (planned) |
| dotenv | Environment config |
| Technology | Purpose |
|---|---|
| RAG Pipeline | Context-aware responses (planned) |
| Intent Detection | Classifying user emotions/needs |
| NLP Model | Natural language understanding |
| Technology | Purpose |
|---|---|
| React.js | UI framework |
| Tailwind CSS | Styling |
| Socket.io | Real-time chat |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CLIENT β
β React Frontend / REST Client β
ββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β HTTP / WebSocket
ββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββ
β API GATEWAY β
β Express.js (Node.js) β
β Auth Middleware β Rate Limiting β
ββββββββ¬ββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β β
ββββββββΌβββββββ ββββββββΌβββββββββββββββββββββββββββββββ
β MongoDB β β AI Service Layer β
β (Users, β β Intent Detection β RAG Pipeline β
β Sessions, β β β Response Generation β
β Moods) β βββββββββββββββββββββββββββββββββββββββ
βββββββββββββββ
mental-health-chatbot/
β
βββ Backend/
β βββ config/
β β βββ db.js # MongoDB connection
β β
β βββ controllers/
β β βββ chatController.js # Chat logic
β β βββ userController.js # User management
β β βββ moodController.js # Mood tracking
β β
β βββ middlewares/
β β βββ authMiddleware.js # JWT verification
β β βββ errorHandler.js # Global error handling
β β
β βββ models/
β β βββ User.js # User schema
β β βββ Session.js # Chat session schema
β β βββ Mood.js # Mood entry schema
β β
β βββ routes/
β β βββ chatRoutes.js # /api/chat
β β βββ userRoutes.js # /api/user
β β βββ moodRoutes.js # /api/mood
β β
β βββ services/
β β βββ aiService.js # AI model integration
β β βββ intentService.js # Intent classification
β β
β βββ .env.example # Environment variable template
β βββ server.js # App entry point
β βββ package.json
β
βββ Frontend/ # (Planned)
β βββ ...
β
βββ .gitignore
βββ CONTRIBUTING.md
βββ LICENSE
βββ README.md
- Node.js
v18+ - npm
v9+ - MongoDB (local or MongoDB Atlas)
git clone https://github.com/your-username/mental-health-chatbot.git
cd mental-health-chatbotcd Backend
npm installcp .env.example .envOpen .env and fill in your values:
# Server
PORT=5000
NODE_ENV=development
# Database
MONGO_URI=mongodb://localhost:27017/mindful
# Authentication
JWT_SECRET=your_super_secret_key_here
JWT_EXPIRES_IN=7d
# AI Service
AI_API_KEY=your_ai_api_key_here
AI_MODEL=your_model_name# Development (with auto-reload)
npm run dev
# Production
npm startServer runs at http://localhost:5000
| Method | Endpoint | Description | Auth |
|---|---|---|---|
POST |
/api/chat/message |
Send a message, get AI response | β |
GET |
/api/chat/history/:sessionId |
Get chat history | β |
DELETE |
/api/chat/session/:sessionId |
Delete a session | β |
| Method | Endpoint | Description | Auth |
|---|---|---|---|
POST |
/api/user/register |
Register a new user | β |
POST |
/api/user/login |
Login and get JWT | β |
GET |
/api/user/profile |
Get user profile | β |
| Method | Endpoint | Description | Auth |
|---|---|---|---|
POST |
/api/mood/log |
Log a mood entry | β |
GET |
/api/mood/history |
Get mood history | β |
Example Request:
POST /api/chat/message
Content-Type: application/json
Authorization: Bearer <your_token>
{
"message": "I've been feeling anxious lately",
"sessionId": "abc123"
}Example Response:
{
"success": true,
"reply": "I'm sorry to hear that. Anxiety can feel overwhelming. Would you like to talk about what's been on your mind?",
"intent": "anxiety_support",
"resources": []
}- v1.0 β Core chat with intent detection + MongoDB integration
- v1.1 β User authentication (register/login with JWT)
- v1.2 β React frontend with real-time chat (Socket.io)
- v1.3 β Mood tracker with daily check-ins
- v2.0 β RAG-based AI for accurate, knowledge-grounded responses
- v2.1 β Voice chatbot integration
- v2.2 β Wellness insights dashboard with charts
- v3.0 β Mobile app (React Native)
Contributions are what make the open-source community great. Any contributions you make are greatly appreciated.
- Fork the project
- Create your feature branch:
git checkout -b feature/AmazingFeature - Commit your changes:
git commit -m 'Add some AmazingFeature' - Push to the branch:
git push origin feature/AmazingFeature - Open a Pull Request
Please read CONTRIBUTING.md for our code of conduct and contribution guidelines.
Distributed under the MIT License. See LICENSE for more information.
Your Name
- GitHub: @your-username
- LinkedIn: your-linkedin
- Email: mahi967232@gmail.com
- Node.js
- Express.js
- MongoDB
- Shields.io β for the badges
- Mental health resources: NIMH, iCall (India)