Skip to content

Repository files navigation

MindSpace - Your Mental Wellness Companion

MindSpace is a full-stack web application designed to be a safe and anonymous space for users to monitor their mental well-being. It features mood tracking, guided self-assessments, an empathetic AI chatbot, and a dashboard to visualize progress over time.

Features

  • User Authentication: Secure registration and login system.
  • Dashboard: A central hub to view mood timelines, recent entries, and assessment score history.
  • Mood Tracking: Daily mood check-ins with optional notes.
  • Self-Assessments:
    • Anxiety Screening (GAD-7)
    • Depression Screening (PHQ-9)
    • Stress Assessment
  • Historical Charts: Visualizes mood and assessment scores over time to track trends.
  • AI Chatbot: An empathetic chatbot powered by OpenAI for supportive conversations, with guardrails to stay on topic.
  • Wellness Activities: Guided activities like breathing exercises to help users relax.
  • Resource Library: Curated links to external mental health resources.

Tech Stack

Prerequisites

Getting Started

Follow these instructions to get a copy of the project up and running on your local machine for development and testing purposes.

1. Clone the Repository

git clone https://github.com/sadhana6299/MindSpace.git
cd MindSpace

2. Backend Setup

The backend server runs on Flask and handles API requests, database interactions, and communication with the OpenAI API.

# Navigate to the backend directory
cd backend

# Create and activate a virtual environment
# On Windows
python -m venv venv
.\venv\Scripts\activate
# On macOS/Linux
python3 -m venv venv
source venv/bin/activate

# Install the required Python packages
pip install -r requirements.txt

# Create a .env file in the project root (the parent directory of 'backend')
# and add your API keys.
# The file should be located at 'MentalHealthAgent/.env'
touch ../.env
cd backend

# Before executing the app.py make sure to run files from data_pipeline folder
# in this order
```bash
cd data_pipeline
python fetch_from_news.py
python fetch_from_ressearch.py
python merge_data.py
python create_vector_db.py

#Now your vector db is set up for RAG 

python app.py

# Start the Flask server (it will run on http://localhost:5000)

3. Frontend Setup

The frontend is a Next.js application. Open a new terminal for these steps.

# Navigate to the project root directory
cd MindSpace

# Install the required npm packages
npm install

# Start the development server (it will run on http://localhost:3000)
npm run dev

Open http://localhost:3000 in your browser to see the application.

Running for Production

To create a production-optimized build of the frontend:

# Create the production build
npm run build

# Start the production server
npm start

About

MindSpace is a full-stack web application designed to be a safe and anonymous space for users to monitor their mental well-being. It features mood tracking, guided self-assessments, an empathetic AI chatbot, and a dashboard to visualize progress over time.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages