VitaPsyche is a comprehensive mental health platform designed to help users assess and manage their psychological well-being. The platform uses AI and machine learning models to analyze psychological disorders, offers personalized doctor recommendations, and facilitates communication between patients and doctors. It also includes an intelligent chatbot powered by Rasa Framework, which provides psychological assessments and general mental health advice. Additionally, the platform enables direct communication between patients and doctors for consultations and continuous support.

Ensure you have the following installed on your machine:
git clone https://github.com/your-username/mind-med.git
cd mind-med
Environment Variables You need to set environment variables for both the front-end and back-end. Create .env files in the respective directories (client and server).
For Next.js (client):
NEXT_PUBLIC_API_URL=<your_backend_api_url>
NEXT_PUBLIC_RASA_URL=<your_rasa_chatbot_url>
For Django (or Flask) (server):
DATABASE_URL=<your_mongo_db_url>
SECRET_KEY=<your_django_secret_key>
DEBUG=True
Installing Dependencies and run To run all project in your device follow that steps: 1-Next.js front-end:
cd client
#install node_modules
npm install
npm run dev
Responsive UI: Ensures the app works seamlessly on different devices with various screen sizes.
State Management: Implemented using Provider or BLoC for clean and efficient code architecture.
Offline Mode: Certain features are accessible even without an internet connection, ensuring usability in all situations.
Secure Storage: Sensitive user data is securely stored using flutter_secure_storage or similar libraries.
Chat Integration: The chatbot is embedded into the app for seamless user interaction without leaving the platform.
Interactive Charts: Visual representations of user assessments and progress over time for better engagement.
git clone https://github.com/a7medk7aledak/VitaPsyche-Graduation-Project.git
cd mobile
flutter pub get
flutter run
flutter clean
flutter pub get
flutter run
lib/
├── core/ # Core layer for shared and general utilities
│ ├── errors/ # Custom exceptions and error handling
│ ├── utils/ # General helper classes and utility functions
│ ├── themes/ # App themes and design system
│ ├── constants/ # Application-wide constants (e.g., API URLs, colors, etc.)
│ └── widgets/ # Reusable widgets used across the app
│
├── features/ # Feature modules for different parts of the app
│ ├── auth/ # Authentication feature
│ │ ├── data/ # Data layer
│ │ │ ├── models/ # Data models
│ │ │ ├── datasources/ # Local/Remote data sources
│ │ │ └── repositories/ # Repository implementations
│ │ ├── domain/ # Domain layer
│ │ │ ├── entities/ # Core entities for the feature
│ │ │ └── usecases/ # Business logic use cases
│ │ ├── presentation/ # Presentation layer
│ │ ├── screens/ # Screens for UI
│ │ ├── widgets/ # Widgets for the feature
│ │ └── providers/ # State management
│ │
│ ├── chat/ # Chat feature (similar structure as auth)
│ ├── profile/ # Profile feature
│ └── home/ # Home feature
│
└── main.dart # Entry point of the application
The Core Layer contains code that is shared across multiple features:
errors/: Custom exception classes for error handling.utils/: Helper classes for common operations.themes/: Centralized app theme definitions.constants/: Application-wide constants like API URLs, colors, etc.widgets/: Reusable UI components not tied to a specific feature.The Features Layer is where each app feature/module is defined, and each feature follows the Clean Architecture layers:
This project utilizes the following libraries to enhance functionality and streamline development:
.glb/.gltf) in Flutter.3.5-Django back-end all project:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process
py -3.9 -m venv .venv
.\.venv\Scripts\activate
cd server
cd Project
pip install django
py -m pip install --upgrade pip
pip install requests
pip install django-cors-headers
pip install drf-yasg
pip install djangorestframework-simplejwt
pip install -r requirements.txt
py -m pip install --upgrade pip
pip install djangorestframework
pip install django-cors-headers
pip install drf-yasg
pip install coverage
#don't run that if you want run chatbot
python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver
#to run the server chatbot
python manage.py runserver
to make backend tastes:
cd Back-End/Project
python manage.py test
coverage run --source='.' manage.py test
coverage report -m
4-rasa chatbot:
#note Python versions: 3.7, 3.8, 3.9, and 3.10. Note that Python 3.10 is only supported for versions 3.4.x and upwards
#to make a new Environment => that step make it once
cd chatbot
pip install rasa
pip install --upgrade cryptography
pip install rasa-sdk openai python-dotenv websockets
or
pip install cryptography==3.4.8
rasa train
rasa run -m models --enable-api --cors "*"
deployment rasa train --fixed-model-name model
to Run action and api
cd chatbot
rasa run actions
5-rasa lina:
cd lina model
pip install rasa
pip install cryptography==38.0.4
rasa train
rasa run --port 5006
note: To test the Rasa Chatbot and Lina by terminal:
rasa train
rasa data validate #track files in rasa
rasa shell
API Testing Use Postman or Insomnia to test the APIs for the back-end and to ensure the chatbot is responding as expected.
Deployment To deploy the application, you can use the following services:
Vercel for deploying the Next.js front-end:
Ensure environment variables are set in the Vercel dashboard. Push your changes to GitHub, and Vercel will automatically deploy the site. Heroku for deploying the Django back-end:
Use the Heroku CLI to deploy. Set environment variables in Heroku. Docker for deploying the Rasa Chatbot:
Consider using Docker containers to deploy the chatbot in a cloud environment for scalability. Communication Features The Mind Med platform includes secure channels for communication between patients and doctors. Patients can request consultations, and doctors can provide feedback and treatment plans based on the AI analysis of the patient’s psychological state.
The chatbot serves as the initial point of contact for psychological assessments, offering users basic insights and advice before they interact with a doctor for a more detailed consultation.
Contributions Feel free to fork this repository, submit pull requests, or open issues for feature requests or bug fixes. We welcome community contributions!
VitaPsyche is a comprehensive mental health platform designed to help users assess and manage their psychological well-being. The platform uses AI and machine learning models to analyze psychological disorders, offers personalized doctor recommendations, and facilitates communication between patients and doctors. It also includes an intelligent chatbot powered by Rasa Framework, which provides psychological assessments and general mental health advice. Additionally, the platform enables direct communication between patients and doctors for consultations and continuous support.

Ensure you have the following installed on your machine:
git clone https://github.com/your-username/mind-med.git
cd mind-med
Environment Variables You need to set environment variables for both the front-end and back-end. Create .env files in the respective directories (client and server).
For Next.js (client):
NEXT_PUBLIC_API_URL=<your_backend_api_url>
NEXT_PUBLIC_RASA_URL=<your_rasa_chatbot_url>
For Django (or Flask) (server):
DATABASE_URL=<your_mongo_db_url>
SECRET_KEY=<your_django_secret_key>
DEBUG=True
Installing Dependencies and run To run all project in your device follow that steps: 1-Next.js front-end:
cd client
#install node_modules
npm install
npm run dev
Responsive UI: Ensures the app works seamlessly on different devices with various screen sizes.
State Management: Implemented using Provider or BLoC for clean and efficient code architecture.
Offline Mode: Certain features are accessible even without an internet connection, ensuring usability in all situations.
Secure Storage: Sensitive user data is securely stored using flutter_secure_storage or similar libraries.
Chat Integration: The chatbot is embedded into the app for seamless user interaction without leaving the platform.
Interactive Charts: Visual representations of user assessments and progress over time for better engagement.
git clone https://github.com/a7medk7aledak/VitaPsyche-Graduation-Project.git
cd mobile
flutter pub get
flutter run
flutter clean
flutter pub get
flutter run
lib/
├── core/ # Core layer for shared and general utilities
│ ├── errors/ # Custom exceptions and error handling
│ ├── utils/ # General helper classes and utility functions
│ ├── themes/ # App themes and design system
│ ├── constants/ # Application-wide constants (e.g., API URLs, colors, etc.)
│ └── widgets/ # Reusable widgets used across the app
│
├── features/ # Feature modules for different parts of the app
│ ├── auth/ # Authentication feature
│ │ ├── data/ # Data layer
│ │ │ ├── models/ # Data models
│ │ │ ├── datasources/ # Local/Remote data sources
│ │ │ └── repositories/ # Repository implementations
│ │ ├── domain/ # Domain layer
│ │ │ ├── entities/ # Core entities for the feature
│ │ │ └── usecases/ # Business logic use cases
│ │ ├── presentation/ # Presentation layer
│ │ ├── screens/ # Screens for UI
│ │ ├── widgets/ # Widgets for the feature
│ │ └── providers/ # State management
│ │
│ ├── chat/ # Chat feature (similar structure as auth)
│ ├── profile/ # Profile feature
│ └── home/ # Home feature
│
└── main.dart # Entry point of the application
The Core Layer contains code that is shared across multiple features:
errors/: Custom exception classes for error handling.utils/: Helper classes for common operations.themes/: Centralized app theme definitions.constants/: Application-wide constants like API URLs, colors, etc.widgets/: Reusable UI components not tied to a specific feature.The Features Layer is where each app feature/module is defined, and each feature follows the Clean Architecture layers:
This project utilizes the following libraries to enhance functionality and streamline development:
.glb/.gltf) in Flutter.3.5-Django back-end all project:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process
py -3.9 -m venv .venv
.\.venv\Scripts\activate
cd server
cd Project
pip install django
py -m pip install --upgrade pip
pip install requests
pip install django-cors-headers
pip install drf-yasg
pip install djangorestframework-simplejwt
pip install -r requirements.txt
py -m pip install --upgrade pip
pip install djangorestframework
pip install django-cors-headers
pip install drf-yasg
pip install coverage
#don't run that if you want run chatbot
python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver
#to run the server chatbot
python manage.py runserver
to make backend tastes:
cd Back-End/Project
python manage.py test
coverage run --source='.' manage.py test
coverage report -m
4-rasa chatbot:
#note Python versions: 3.7, 3.8, 3.9, and 3.10. Note that Python 3.10 is only supported for versions 3.4.x and upwards
#to make a new Environment => that step make it once
cd chatbot
pip install rasa
pip install --upgrade cryptography
pip install rasa-sdk openai python-dotenv websockets
or
pip install cryptography==3.4.8
rasa train
rasa run -m models --enable-api --cors "*"
deployment rasa train --fixed-model-name model
to Run action and api
cd chatbot
rasa run actions
5-rasa lina:
cd lina model
pip install rasa
pip install cryptography==38.0.4
rasa train
rasa run --port 5006
note: To test the Rasa Chatbot and Lina by terminal:
rasa train
rasa data validate #track files in rasa
rasa shell
API Testing Use Postman or Insomnia to test the APIs for the back-end and to ensure the chatbot is responding as expected.
Deployment To deploy the application, you can use the following services:
Vercel for deploying the Next.js front-end:
Ensure environment variables are set in the Vercel dashboard. Push your changes to GitHub, and Vercel will automatically deploy the site. Heroku for deploying the Django back-end:
Use the Heroku CLI to deploy. Set environment variables in Heroku. Docker for deploying the Rasa Chatbot:
Consider using Docker containers to deploy the chatbot in a cloud environment for scalability. Communication Features The Mind Med platform includes secure channels for communication between patients and doctors. Patients can request consultations, and doctors can provide feedback and treatment plans based on the AI analysis of the patient’s psychological state.
The chatbot serves as the initial point of contact for psychological assessments, offering users basic insights and advice before they interact with a doctor for a more detailed consultation.
Contributions Feel free to fork this repository, submit pull requests, or open issues for feature requests or bug fixes. We welcome community contributions!