A comprehensive web application that provides health information services integrated with multiple AI-powered chatbots to assist users in finding relevant health resources and guidance.
HealthVR is a Laravel-based health information platform that combines reliable health content delivery with multiple AI chatbot integrations. Users can browse health information, get personalized recommendations, and interact with various AI-powered assistants including OpenAI GPT, DeepSeek, and Hugging Face models for health-related queries.
π₯ The main goal is to create a reliable, accessible, and user-friendly healthcare platform in Mongolian. The platform will include
- Public discussion forum
- Chatbot interaction interface
- Personal health record keeping 4 AI-powered health advice
- VR content display
- Event calendar
- Hospital and pharmacy map display
- Health test system
- Multi-AI Chatbot Integration: Support for OpenAI GPT-4, DeepSeek Reasoner, and Hugging Face models
- Comprehensive Health Database: Extensive collection of health information and resources
- User-Friendly Interface: Modern, responsive design built with Tailwind CSS
- Advanced Search Functionality: AI-powered search capabilities for health topics
- User Management: Authentication and user profile management
- Content Management: Admin panel for managing health content
- Email Notifications: Integrated email system for user communications
- Mobile Responsive: Optimized for all device types
- VR Ready: Built with VR compatibility in mind (HealthVR)
- Backend: Laravel (PHP Framework)
- Frontend: Blade Templates with Tailwind CSS
- Database: MySQL/PostgreSQL (configurable)
- Build Tools: Vite for asset compilation
- Package Management: Composer (PHP) & NPM (JavaScript)
- Testing: PHPUnit for backend testing
Before you begin, ensure you have the following installed:
- PHP >= 8.1
- Composer
- Node.js >= 16.x
- NPM or Yarn
- MySQL or PostgreSQL
- Git
git clone <your-repository-url>
cd healthinfo
composer install
npm install
# Copy the example environment file
cp .env.example .env
# Generate application key
php artisan key:generate
Create a MySQL database and edit your .env
file with your database credentials:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=healthinfo
DB_USERNAME=root
DB_PASSWORD=
Configure your AI service API keys in the .env
file:
# OpenAI Configuration
OPENAI_API_KEY=your_openai_api_key_here
OPENAI_MODEL=gpt-4.1-mini
# DeepSeek Configuration
DEEPSEEK_API_KEY=your_deepseek_api_key_here
DEEPSEEK_MODEL=deepseek-reasoner
# Hugging Face Configuration
HUGGINGFACE_API_TOKEN=your_huggingface_token_here
php artisan migrate
php artisan db:seed
npm run build
# or for development
npm run dev
# Start Laravel development server
php artisan serve
# In another terminal, start Vite dev server for hot reloading
npm run dev
The application will be available at http://127.0.0.1:8000
# Build production assets
npm run build
# Optimize Laravel for production
php artisan config:cache
php artisan route:cache
php artisan view:cache
healthinfo/
βββ app/ # Laravel application logic
β βββ Http/Controllers/ # HTTP controllers
β βββ Models/ # Eloquent models
β βββ Services/ # Business logic services
βββ bootstrap/ # Laravel bootstrap files
βββ config/ # Configuration files
βββ database/ # Database migrations and seeders
β βββ migrations/ # Database migrations
β βββ seeders/ # Database seeders
βββ public/ # Public web assets
βββ resources/ # Views, CSS, JS, and language files
β βββ css/ # Stylesheets
β βββ js/ # JavaScript files
β βββ views/ # Blade templates
βββ routes/ # Route definitions
βββ storage/ # Generated files, logs, cache
βββ tests/ # Automated tests
βββ vendor/ # Composer dependencies
The HealthVR system integrates with multiple AI services:
-
OpenAI Integration
- Model: GPT-4.1-mini
- Used for: Complex health consultations and detailed explanations
- Endpoint: OpenAI API
-
DeepSeek Integration
- Model: DeepSeek Reasoner
- Used for: Medical reasoning and diagnostic assistance
- Endpoint: https://api.deepseek.com/v1/chat/completions
-
Hugging Face Integration
- Various models available
- Used for: Specialized health NLP tasks
- Custom model fine-tuning capabilities
The chatbot system is implemented using:
- Multi-AI Service Integration: Seamless switching between different AI providers
- Knowledge Base: Structured health information database
- Response Engine: Laravel-based logic for generating appropriate responses
- Real-time Communication: WebSocket or AJAX-based chat interface
- Health API: Dedicated health information API endpoint
-
AI Chat Controller (
app/Http/Controllers/ChatController.php
)- Handles multiple AI service requests
- Routes queries to appropriate AI provider (OpenAI, DeepSeek, Hugging Face)
- Manages conversation history and context
-
Health Knowledge Service (
app/Services/HealthKnowledgeService.php
)- Processes health-related queries from diseases database
- Retrieves relevant information from topics and categories
- Formats responses for different AI models
-
VR Content Service (
app/Services/VRContentService.php
)- Manages Sketchfab integration for 3D medical content
- Handles VR content suggestions and approvals
- Provides VR-ready health visualizations
-
Device Integration Service (
app/Services/DeviceIntegrationService.php
)- Connects with fitness and health tracking devices
- Processes health data from connected devices
- Generates AI recommendations based on device data
-
Frontend Chat Interface (
resources/js/chat.js
)- Multi-AI provider chat UI
- Real-time message handling and display
- VR content integration in chat responses
Configure chatbot and AI services in your .env
file:
# Application Settings
APP_NAME=HealthVR
APP_URL=http://127.0.0.1:8000
# Database Configuration
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=healthinfo
DB_USERNAME=root
DB_PASSWORD=
# AI Services Configuration
OPENAI_API_KEY=your_openai_api_key
OPENAI_MODEL=gpt-4.1-mini
DEEPSEEK_API_KEY=your_deepseek_api_key
DEEPSEEK_MODEL=deepseek-reasoner
DEEPSEEK_API_ENDPOINT=https://api.deepseek.com/v1/chat/completions
HUGGINGFACE_API_TOKEN=your_huggingface_token
# Health API Endpoint
HEALTH_API_URL=http://127.0.0.1:8000/health
# Email Configuration (for notifications)
MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=your_email@gmail.com
MAIL_FROM_NAME="HealthInfo System"
# Session and Cache
SESSION_DRIVER=database
CACHE_STORE=database
QUEUE_CONNECTION=database
users
- User authentication and basic informationuser_profiles
- Extended user profiles with health data (birth_date, gender, height, weight, medical_history, etc.)connected_devices
- Integration with health devices (Fitbit, Apple Health, Google Fit)
diseases
- Disease information database with symptoms and treatmentscategories
- Content categorization system with iconstopics
- Health discussion topics and articlesreplies
- Comments and responses to topicstags
- Content tagging systemtag_topic
- Many-to-many relationship between tags and topics
vr_contents
- VR content with Sketchfab integrationvr_content_suggestions
- User-submitted VR content suggestions
professionals
- Healthcare professional profilesdoctor_infos
- Detailed doctor information and credentials
events
- Health events and activities with location, registration, and categorizationlikes
- User engagement tracking (polymorphic relations)
ai_recommendations
- AI-generated health insights and recommendations
- User β User Profile: One-to-one relationship for extended user data
- User β Connected Devices: One-to-many for health device integrations
- User β Professional: Healthcare professionals linked to user accounts
- Professional β Doctor Info: Detailed professional information
- Topics β Replies: Forum-style discussion system
- Events β Categories: Categorized health events
- VR Content β Categories: Organized VR health content
- Multilingual Support: UTF8MB4 collation for international content
- Soft Deletes: Safe deletion of events and content
- Polymorphic Relations: Flexible like system for topics and replies
- Health Device Integration: Support for multiple fitness/health APIs
- VR Integration: Sketchfab UID storage for 3D medical content
Run the test suite:
# Run all tests
php artisan test
# Run specific test suite
php artisan test --testsuite=Feature
# Run with coverage
php artisan test --coverage
- Caching: Laravel cache for frequently accessed data
- Database Indexing: Optimized database queries
- Asset Optimization: Minified CSS/JS for production
- Image Optimization: Compressed images for faster loading
- CSRF Protection
- Input Validation and Sanitization
- Authentication and Authorization
- SQL Injection Prevention
- XSS Protection
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues or have questions:
- Check the Issues page
- Create a new issue with detailed information
- Contact the development team
- Laravel Framework team
- Tailwind CSS team
- Health information content providers
- Open source community contributors
Note: This application is for informational purposes only and should not replace professional medical advice. Always consult with healthcare professionals for medical concerns.