Skip to content

SyedMohammedSameer/VitaShifa2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

26 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

VitaShifa - AI Health Companion ๐Ÿฅ

A comprehensive AI-powered health platform offering medical consultations, wellness planning, medication reminders, and emergency care assistance with multilingual support.

โœจ Features

๐Ÿค– AI Medical Consultation

  • Real-time chat with AI health assistant
  • Natural language processing in 7+ languages
  • Conversation history and continuity
  • Medical disclaimer and safety guidelines

๐Ÿ” AI Diagnosis from Medical Images

  • Medical image analysis (X-rays, MRI, dermatology)
  • Confidence scoring and findings analysis
  • Actionable recommendations
  • Privacy-focused processing

๐Ÿ’Š Medication Reminders

  • Smart medication scheduling
  • Adherence tracking and analytics
  • Multiple time slots and frequencies
  • Visual adherence charts

๐ŸŽฏ Wellness Planning

  • Personalized health assessments
  • AI-generated nutrition plans
  • Custom fitness recommendations
  • Mindfulness and stress management
  • Weekly scheduling with PDF export

๐Ÿšจ Emergency Care

  • Country-specific emergency contacts
  • Interactive first-aid guides
  • Symptom severity checker
  • Hospital location finder
  • Video-guided emergency procedures

๐ŸŒ Multilingual Support

  • 7 languages: English, Arabic, Spanish, French, Japanese, Indonesian, Hindi
  • RTL support for Arabic
  • Localized medical terminology
  • Cultural adaptations

๐Ÿ› ๏ธ Technology Stack

Frontend

  • Next.js 15 - React framework with App Router
  • TypeScript - Type-safe development
  • Tailwind CSS - Utility-first styling
  • Radix UI - Accessible component primitives
  • React i18next - Internationalization

Backend & APIs

  • Google Gemini AI - Medical reasoning and image analysis
  • Firebase Auth - User authentication
  • Firestore - Real-time database
  • Next.js API Routes - Serverless backend

Key Libraries

  • Lucide React - Icon system
  • Date-fns - Date manipulation
  • React Hook Form - Form management
  • Sonner - Toast notifications

๐Ÿš€ Getting Started

Prerequisites

  • Node.js 18+
  • pnpm (recommended) or npm
  • Firebase project
  • Google AI API key

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/vitashifa.git
cd vitashifa
  1. Install dependencies:
pnpm install
  1. Set up environment variables:
cp .env.example .env.local

Add your configuration:

# Firebase Configuration
NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_domain
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_bucket
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id

# Firebase Admin (Base64 encoded service account)
FIREBASE_SERVICE_ACCOUNT_BASE64=your_base64_service_account

# Google AI
GEMINI_API_KEY=your_gemini_api_key
  1. Set up Firebase:

    • Create a Firebase project
    • Enable Authentication (Email/Password)
    • Enable Firestore Database
    • Generate service account key
  2. Run the development server:

pnpm dev

Open http://localhost:3000 to see the app.

๐Ÿ“ Project Structure

โ”œโ”€โ”€ app/                    # Next.js App Router
โ”‚   โ”œโ”€โ”€ api/               # API routes
โ”‚   โ”‚   โ”œโ”€โ”€ ai-diagnosis/  # Image analysis
โ”‚   โ”‚   โ”œโ”€โ”€ medical-consultation/ # Chat API
โ”‚   โ”‚   โ”œโ”€โ”€ medication-reminders/ # Medication CRUD
โ”‚   โ”‚   โ””โ”€โ”€ wellness-planning/ # Wellness plans
โ”‚   โ”œโ”€โ”€ signin/           # Authentication pages
โ”‚   โ””โ”€โ”€ signup/
โ”œโ”€โ”€ components/           # React components
โ”‚   โ”œโ”€โ”€ ui/              # Reusable UI components
โ”‚   โ”œโ”€โ”€ ai-diagnosis.tsx # Medical image analysis
โ”‚   โ”œโ”€โ”€ medical-consultation.tsx # Chat interface
โ”‚   โ”œโ”€โ”€ wellness-planning.tsx # Health assessments
โ”‚   โ””โ”€โ”€ dashboard-layout.tsx # Main layout
โ”œโ”€โ”€ lib/                 # Utilities and configuration
โ”‚   โ”œโ”€โ”€ firebase.ts     # Firebase client
โ”‚   โ”œโ”€โ”€ firebaseAdmin.ts # Firebase admin
โ”‚   โ”œโ”€โ”€ i18n.ts         # Internationalization
โ”‚   โ””โ”€โ”€ utils.ts        # Helper functions
โ”œโ”€โ”€ public/locales/     # Translation files
โ””โ”€โ”€ context/            # React context providers

๐ŸŒŸ Key Features Detail

Smart Medical Consultation

  • Context-aware conversations
  • Medical reasoning with chain-of-thought
  • Safety guardrails and disclaimers
  • Multilingual medical terminology

Image Analysis Pipeline

  • HIPAA-compliant processing
  • Multi-modal AI analysis
  • Confidence scoring
  • Structured medical reports

Wellness Intelligence

  • Personalized recommendations
  • BMI and health metrics
  • Activity level assessment
  • Cultural dietary preferences

Emergency Response System

  • Geolocation-based contacts
  • Interactive first-aid videos
  • Severity triage algorithms
  • Multi-language emergency phrases

๐Ÿ”’ Privacy & Security

  • Data Protection: No medical images stored permanently
  • HIPAA Compliance: Privacy-first architecture
  • Encryption: All data encrypted in transit and at rest
  • Authentication: Secure Firebase Auth integration
  • Disclaimers: Clear medical advice limitations

๐ŸŒ Internationalization

Supported languages with full localization:

  • ๐Ÿ‡บ๐Ÿ‡ธ English (en)
  • ๐Ÿ‡ธ๐Ÿ‡ฆ Arabic (ar) - RTL support
  • ๐Ÿ‡ช๐Ÿ‡ธ Spanish (es)
  • ๐Ÿ‡ซ๐Ÿ‡ท French (fr)
  • ๐Ÿ‡ฏ๐Ÿ‡ต Japanese (ja)
  • ๐Ÿ‡ฎ๐Ÿ‡ฉ Indonesian (id)
  • ๐Ÿ‡ฎ๐Ÿ‡ณ Hindi (hi)

๐Ÿš€ Deployment

Vercel (Recommended)

  1. Connect your GitHub repository
  2. Set environment variables in Vercel dashboard
  3. Deploy automatically on push

Other Platforms

  • Netlify: Set build command to pnpm build
  • Railway: Dockerfile included
  • Firebase Hosting: Static export supported

๐Ÿ“š API Documentation

Medical Consultation

POST /api/medical-consultation
Content-Type: application/json

{
  "message": "string",
  "conversationId": "string (optional)",
  "language": "string"
}

Response:
{
  "reply": "string",
  "conversationId": "string"
}

AI Diagnosis

POST /api/ai-diagnosis
Content-Type: application/json

{
  "image": "string (base64)",
  "language": "string"
}

Response:
{
  "confidence": "number",
  "findings": ["string"],
  "recommendations": ["string"]
}

Medication Reminders

GET    /api/medication-reminders          # List all reminders
POST   /api/medication-reminders          # Create reminder
PUT    /api/medication-reminders/[id]     # Update reminder
DELETE /api/medication-reminders/[id]     # Delete reminder

๐Ÿค Contributing

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

Development Guidelines

  • Follow TypeScript best practices
  • Use existing UI components from components/ui/
  • Maintain i18n support for new features
  • Add proper error handling and loading states
  • Write descriptive commit messages

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

โš ๏ธ Medical Disclaimer

VitaShifa is an AI-powered health information tool and should not replace professional medical advice, diagnosis, or treatment. Always consult qualified healthcare providers for medical concerns.

๐Ÿ™ Acknowledgments

  • Google AI for Gemini API
  • Firebase for backend infrastructure
  • Radix UI for accessible components
  • The open-source community for amazing tools

๐Ÿ“ž Support

For support, email support@vitashifa.com or join our Discord community.


Built with โค๏ธ for global health accessibility

๐Ÿ”„ Roadmap

  • Integration with wearable devices
  • Telemedicine video consultations
  • Advanced AI models for better medical reasoning
  • Integration with electronic health records
  • Mobile app development
  • Voice-based interactions
  • Community health features

๐Ÿ‘จโ€๐Ÿ’ป Built By

Mohammed Sameer Syed
๐Ÿ“ง mohammedsameer@arizona.edu

๐Ÿ™ Special Thanks

Special thanks to Amine Montasir for his valuable contribution to this project.
๐Ÿ“ง Aminemontasir8.5.2004@gmail.com

About

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors