Skip to content

Latest commit

 

History

History
406 lines (361 loc) · 12 KB

File metadata and controls

406 lines (361 loc) · 12 KB

🧠 MindMate — Modern Mental Health Companion

MindMate Logo
A comprehensive mental health platform for mood tracking, community support, and AI-powered wellness recommendations.

Next.js FastAPI TypeScript Supabase PostgreSQL Hugging Face


🚀 Live Demo


📸 Features & Screenshots


Landing Page

Dashboard
Recommendations, heatmap, mood tracking graph

Mood Tracking
Log daily moods, view trends, heatmaps, and stats

AI Chatbot
Context-aware, text & voice, Markdown rendering

Self-Help Toolkit
Breathing, meditation, journaling

Community Posts
Share, comment, react - all content safety-checked

Comments & Moderation
Safety checks before posting, error feedback

User Profile
Manage profile, sign out securely

✨ Key Features

🎯 Core Functionality

  • Smart Mood Tracking — Visual analytics with weekly/monthly trends and interactive heatmaps
  • AI-Powered Chatbot — Context-aware conversations with text & voice support
  • Safe Community Hub — Moderated posts, comments, and reactions with real-time safety checks
  • Wellness Toolkit — Guided breathing exercises, meditation sessions, and journaling prompts

🔒 Security & Safety

  • Content Moderation — AI-powered toxicity detection before posting
  • Secure Authentication — Supabase-powered user management
  • Privacy First — Anonymous posting options and data protection

💡 Smart Features

  • Personalized Dashboard — AI recommendations based on mood patterns
  • Voice Integration — Speech-to-text messaging with audio playback
  • Real-time Analytics — Interactive charts and mood visualization
  • Mobile-Optimized — Responsive design for all devices

🧱 Technology Stack

🎨 Frontend ⚙️ Backend 🗄️ Database 🤖 AI/ML
Next.js 15
React 18
TypeScript
Tailwind CSS
Recharts
FastAPI
Python 3.11+
SQLModel
Alembic
Uvicorn
PostgreSQL 15
Supabase
Redis Cache
Real-time sync
Google Gemini
Hugging Face
OpenAI Whisper
Content Moderation

⚡ Getting Started

Prerequisites

  • Python 3.11+
  • Node.js 18+
  • PostgreSQL 15+
  • Git

Setup

git clone https://github.com/yourusername/MindMate.git
cd MindMate

Backend (.env)

SUPABASE_URL="https://<your-supabase-project>.supabase.co"
SUPABASE_KEY="<your-supabase-key>"
HF_API_KEY=<your-huggingface-key>
GEMINI_API_KEY=<your-gemini-key>

Frontend (.env)

NEXT_PUBLIC_SUPABASE_URL=https://<your-supabase-project>.supabase.co
NEXT_PUBLIC_SUPABASE_KEY=<your-supabase-key>
NEXT_PUBLIC_BACKEND_URL=http://localhost:8000

Backend Setup

cd backend
python -m venv env
env\Scripts\activate  # Windows
pip install -r requirements.txt
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000

Frontend Setup

cd frontend
npm install
npm run dev

📁 Project Structure

MindMate/
├── frontend/         # Next.js Frontend
│   ├── app/          # App Router Pages
│   ├── components/   # Reusable Components
│   ├── lib/          # API Service Layer
│   └── public/       # Static Assets
├── backend/          # FastAPI Backend
│   ├── app/          # Source Code
│   │   ├── api/      # API Endpoints
│   │   ├── models/   # Database Models
│   │   ├── services/ # Business Logic
│   │   └── core/     # Config & Utilities
│   ├── alembic/      # DB Migrations
│   └── requirements.txt
├── ScreenShot/       # Screenshots
└── README.md

🔗 API Endpoints

🌐 Endpoint 📝 Method 📋 Description 🔒 Features
/peer POST Submit anonymous community post AI moderation, toxicity detection
/mood POST Log daily mood entry Emoji, text, slider input methods
/mood/history GET Retrieve mood analytics Weekly/monthly trends, heatmaps
/comment POST Add moderated comment Real-time safety checks
/chat POST Send AI chatbot message Context-aware, Gemini-powered
/chat/voice POST Voice message transcription Speech-to-text, AI response

🛡️ Security Features

  • Content Moderation: All posts and comments filtered through AI toxicity detection
  • Rate Limiting: API endpoint protection against abuse
  • Authentication: Secure user sessions via Supabase
  • Data Validation: Input sanitization and validation on all endpoints

🤖 AI Models & APIs

🎯 Category 🤖 Model/API 📝 Purpose 🔗 Link
Primary AI Google Gemini API Main conversational AI for intelligent responses 🔗 Gemini
Content Moderation unitary/toxic-bert Toxicity detection 🔗 HF
Hate-speech-CNERG/bert-base-uncased-hate-speech Hate speech classification 🔗 HF
Hate-speech-CNERG/dehatebert-mono-english Advanced hate speech detection 🔗 HF
cointegrated/rubert-toxic-pikabu Multilingual toxicity detection 🔗 HF
Sentiment Analysis distilroberta-base General sentiment classification 🔗 HF
cardiffnlp/twitter-roberta-base-sentiment Social media sentiment analysis 🔗 HF
finiteautomata/bertweet-base-sentiment-analysis Tweet sentiment classification 🔗 HF
Fallback Chatbots tiiuae/falcon-7b-instruct Instruction-following conversations 🔗 HF
facebook/blenderbot-3B Open-domain conversations 🔗 HF
gpt2 General text generation 🔗 HF
Voice Processing openai/whisper-large-v3-turbo Speech-to-text transcription 🔗 HF

🛡️ AI Safety Pipeline

  • Multi-layer Moderation: Content passes through multiple toxicity detection models
  • Real-time Processing: Instant safety checks before posting
  • Adaptive Learning: Models continuously improve based on community feedback
  • Fallback Systems: Multiple AI models ensure service reliability

👥 Team


H.M. Mehedi Hasan
Backend Developer

Abu Bakar Siddique
Frontend Developer

Shafahid
Database Developer

🌟 Show Your Support

If you find MindMate helpful, please consider:
Star the repository | 🍴 Fork the project | 📢 Share with others | 🤝 Contribute code

Built with ❤️ for mental health and wellbeing
Making mental health support simple, safe, and beautiful