Skip to content

Vijayaa21/dost.ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

37 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌱 Dost AI - Mental Health Companion Chatbot

Your supportive AI friend for emotional wellness, mood tracking, journaling, and coping strategies.

Dost AI Python React TypeScript

πŸ“Έ Screenshots

Home Dashboard

Home Dashboard

Beautiful watercolor-inspired home page with daily mood check-in, affirmations, and quick access to coping tools.

Quick Tools

Quick Tools

Easy access to breathing exercises and zen sounds for instant calm.

✨ Features

πŸ—£οΈ AI Conversational Support

  • Natural, empathetic conversations powered by OpenAI/Gemini
  • Emotion-aware responses
  • Contextual memory per user
  • Crisis detection & safe escalation

πŸ“Š Mood Tracking & Analytics

  • Daily mood check-ins with emojis
  • Weekly & monthly emotional insights
  • Mood trends visualization
  • Emotion pattern detection

πŸ“” Journaling with AI Reflection

  • Free-text journaling
  • AI-powered summaries and reflections
  • Emotion tagging
  • Writing prompts

🧘 Coping Tools & Wellness Exercises

  • Breathing exercises (4-7-8, Box Breathing)
  • Grounding techniques (5-4-3-2-1)
  • Mindfulness exercises
  • Daily affirmations

πŸ” Privacy & Safety

  • Secure authentication (JWT)
  • Delete data anytime
  • Crisis resources (India helplines)
  • No diagnosis or medical advice

πŸ› οΈ Tech Stack

Backend

  • Framework: Django 4.2 + Django Rest Framework
  • Authentication: JWT (SimpleJWT)
  • Database: SQLite (dev) / PostgreSQL (prod)
  • AI: OpenAI API / Google Gemini API
  • Real-time: Django Channels

Frontend

  • Framework: React 18 + TypeScript
  • Build Tool: Vite
  • Styling: Tailwind CSS
  • Animations: Framer Motion
  • Charts: Recharts
  • State: Zustand
  • Routing: React Router v6

πŸ“ Project Structure

dost.ai/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ dost/           # Django project settings
β”‚   β”œβ”€β”€ users/          # User authentication & profiles
β”‚   β”œβ”€β”€ chat/           # AI chat functionality
β”‚   β”œβ”€β”€ mood/           # Mood tracking
β”‚   β”œβ”€β”€ journal/        # Journaling feature
β”‚   β”œβ”€β”€ coping/         # Coping tools & exercises
β”‚   β”œβ”€β”€ manage.py
β”‚   β”œβ”€β”€ requirements.txt
β”‚   └── seed_data.py    # Initial data for coping tools
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/ # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ pages/      # Page components
β”‚   β”‚   β”œβ”€β”€ services/   # API service functions
β”‚   β”‚   β”œβ”€β”€ store/      # Zustand state management
β”‚   β”‚   β”œβ”€β”€ types/      # TypeScript types
β”‚   β”‚   β”œβ”€β”€ App.tsx
β”‚   β”‚   └── main.tsx
β”‚   β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ package.json
β”‚   └── vite.config.ts
└── README.md

πŸš€ Getting Started

Prerequisites

  • Python 3.10+
  • Node.js 18+
  • npm or yarn

Backend Setup

# Navigate to backend
cd backend

# Create virtual environment
python -m venv venv

# Activate virtual environment
# Windows:
venv\Scripts\activate
# macOS/Linux:
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Create environment file
copy .env.example .env  # Windows
# cp .env.example .env  # macOS/Linux

# Edit .env and add your API keys
# GEMINI_API_KEY=your-gemini-api-key
# or
# OPENAI_API_KEY=your-openai-api-key

# Run migrations
python manage.py migrate

# Create superuser (optional)
python manage.py createsuperuser

# Seed coping tools data
python manage.py shell < seed_data.py

# Run server
python manage.py runserver

Frontend Setup

# Navigate to frontend
cd frontend

# Install dependencies
npm install

# Run development server
npm run dev

Access the App

πŸ”‘ Environment Variables

Backend (.env)

SECRET_KEY=your-secret-key
DEBUG=True
ALLOWED_HOSTS=localhost,127.0.0.1

# AI Provider (openai or gemini)
AI_PROVIDER=gemini
OPENAI_API_KEY=your-openai-key
GEMINI_API_KEY=your-gemini-key

# CORS
CORS_ALLOWED_ORIGINS=http://localhost:5173

πŸ“± API Endpoints

Authentication

  • POST /api/auth/register/ - Register new user
  • POST /api/auth/login/ - Login (returns JWT)
  • POST /api/auth/refresh/ - Refresh token
  • GET /api/auth/profile/ - Get user profile
  • POST /api/auth/onboarding/ - Complete onboarding

Chat

  • GET /api/chat/conversations/ - List conversations
  • POST /api/chat/send/ - Send message & get AI response
  • DELETE /api/chat/conversations/{id}/ - Delete conversation

Mood

  • GET /api/mood/entries/ - List mood entries
  • POST /api/mood/entries/ - Create mood entry
  • GET /api/mood/stats/ - Get mood statistics
  • GET /api/mood/today/ - Get today's mood

Journal

  • GET /api/journal/entries/ - List journal entries
  • POST /api/journal/entries/ - Create entry
  • GET /api/journal/prompt/ - Get writing prompt

Coping Tools

  • GET /api/coping/tools/ - List coping tools
  • GET /api/coping/affirmation/ - Get daily affirmation
  • GET /api/coping/recommend/ - Get recommended tool

🎨 Design System

Colors

  • Primary: Indigo (#6366f1)
  • Lavender: Purple (#a855f7)
  • Calm Blue: #89CFF0
  • Calm Green: #98D8C8
  • Cream: #FFF8E7

Typography

  • Font: Inter (Google Fonts)
  • Rounded, friendly UI elements

🚨 Crisis Resources (India)

If someone expresses crisis thoughts, the app provides:

  • iCall: 9152987821
  • Vandrevala Foundation: 1860-2662-345
  • NIMHANS: 080-46110007
  • AASRA: 9820466726

⚠️ Disclaimer

Dost AI is not a replacement for professional mental health care. It is designed to be a supportive companion, not a therapist. If you're experiencing a mental health emergency, please contact a professional or call emergency services.

πŸ“ License

MIT License - See LICENSE file for details.

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Made with πŸ’™ for mental wellness.

About

Dost AI - Mental Health Companion Chatbot

Topics

Resources

Stars

Watchers

Forks