Swasthik (เคธเฅเคตเคพเคธเฅเคฅเคฟเค) is an AI-powered healthcare assistant designed specifically for rural and semi-urban communities across India. The application provides comprehensive health guidance, symptom analysis, medication information, and healthcare facility location services in multiple Indian languages.
- 24/7 Health Chat: Get instant health guidance powered by Google Gemini AI
- Multilingual Support: Available in English, Hindi, Bengali, Tamil, Telugu, and Marathi
- Contextual Conversations: Maintains conversation history for better assistance
- Voice Interaction: Speak your health concerns and receive voice responses
- Intelligent Symptom Checker: Analyze symptoms with AI-powered recommendations
- Severity Assessment: Get urgency levels and appropriate next steps
- Personalized Recommendations: Tailored health advice based on symptoms
- Medical Disclaimers: Always includes appropriate health disclaimers
- Drug Database: Search and get detailed information about medications
- Dosage Guidelines: Safe dosage recommendations with doctor consultation reminders
- Side Effects & Interactions: Comprehensive medication safety information
- Price Information: Approximate pricing in Indian Rupees
- Location-Based Search: Find nearby hospitals, clinics, and healthcare facilities
- Detailed Information: Contact details, services, ratings, and timings
- Emergency Services: Quick access to emergency healthcare facilities
- Multiple Healthcare Types: Hospitals, clinics, pharmacies, and diagnostic centers
- Health Image Analysis: Upload photos for AI-powered medical guidance
- Visual Symptom Assessment: Analyze skin conditions, wounds, and other visible symptoms
- Medical Image Interpretation: Get insights from X-rays, scans, and medical images
- Medication Reminders: Set reminders for medication schedules
- Appointment Alerts: Never miss important health appointments
- Vaccination Reminders: Track vaccination schedules
- Health Checkup Alerts: Regular health monitoring reminders
- Responsive Design: Works seamlessly on desktop, tablet, and mobile devices
- Intuitive Interface: Clean, modern design with easy navigation
- Accessibility: Designed for users with varying technical expertise
- Progressive Web App: Fast loading and offline capabilities
- React 18.3.1 - Modern UI library
- TypeScript 5.6.3 - Type-safe JavaScript
- TailwindCSS 3.4.17 - Utility-first CSS framework
- Wouter 3.3.5 - Lightweight routing
- Framer Motion 11.13.1 - Smooth animations
- Radix UI - Accessible component primitives
- React Query - Data fetching and caching
- Express.js 4.21.2 - Web application framework
- Node.js - JavaScript runtime
- TypeScript - Type-safe backend development
- Multer - File upload handling
- WebSocket - Real-time communication
- Google Gemini AI - Advanced AI for health assistance
- Drizzle ORM - Type-safe database operations
- PostgreSQL - Robust database system
- Neon Database - Serverless PostgreSQL
- Vite - Fast build tool and dev server
- ESBuild - JavaScript bundler
- Drizzle Kit - Database migrations
- Zod - Schema validation
- Node.js 18+
- npm or yarn
- PostgreSQL database
- Google Gemini API key
-
Clone the repository
git clone <repository-url> cd health-chabot
-
Install dependencies
npm install
-
Environment Setup Create a
.env
file in the root directory:# Google Gemini AI API Key (Required for AI chat) GEMINI_API_KEY=your_gemini_api_key_here # Database Configuration (Optional for demo) DATABASE_URL=your_postgresql_connection_string # Server Configuration NODE_ENV=development PORT=5000
Get your Google Gemini API Key:
- Visit Google AI Studio
- Sign in with your Google account
- Click "Get API Key" and create a new key
- Copy the key to your
.env
file
-
Database Setup
npm run db:push
-
Start Development Server
npm run dev
-
Access the Application Open your browser and navigate to
http://localhost:5000
# Build the application
npm run build
# Start production server
npm start
health-chabot/
โโโ client/ # Frontend React application
โ โโโ src/
โ โ โโโ components/ # Reusable UI components
โ โ โ โโโ ui/ # Base UI components (Radix UI)
โ โ โ โโโ ChatInterface.tsx
โ โ โ โโโ SymptomChecker.tsx
โ โ โ โโโ ...
โ โ โโโ pages/ # Application pages
โ โ โ โโโ chat.tsx
โ โ โ โโโ landing.tsx
โ โ โ โโโ ...
โ โ โโโ hooks/ # Custom React hooks
โ โ โโโ lib/ # Utility libraries
โ โ โโโ main.tsx # Application entry point
โโโ server/ # Backend Express application
โ โโโ index.ts # Server entry point
โ โโโ routes.ts # API route handlers
โ โโโ storage.ts # Database operations
โโโ shared/ # Shared types and schemas
โ โโโ schema.ts # Database schemas and types
โโโ package.json # Dependencies and scripts
โโโ vite.config.ts # Vite configuration
โโโ tailwind.config.ts # TailwindCSS configuration
โโโ tsconfig.json # TypeScript configuration
POST /api/chat
- Send chat message to AI assistantPOST /api/analyze-image
- Analyze uploaded health imagesPOST /api/analyze-symptoms
- Analyze user symptomsPOST /api/transcribe-audio
- Convert voice to text
GET /api/medications/search
- Search medication informationPOST /api/health-centers/search
- Search healthcare facilitiesPOST /api/find-health-centers
- Find nearby health centers
GET /api/reminders
- Get user remindersPOST /api/reminders
- Create new reminderPATCH /api/reminders/:id
- Update reminderDELETE /api/reminders/:id
- Delete reminder
- English ๐ฌ๐ง
- เคนเคฟเคเคฆเฅ (Hindi) ๐ฎ๐ณ
- เฆฌเฆพเฆเฆฒเฆพ (Bengali) ๐ง๐ฉ
- เฎคเฎฎเฎฟเฎดเฏ (Tamil) ๐ฎ๐ณ
- เฐคเฑเฐฒเฑเฐเฑ (Telugu) ๐ฎ๐ณ
- เคฎเคฐเคพเค เฅ (Marathi) ๐ฎ๐ณ
- Rural Communities: Accessible healthcare information for underserved areas
- Semi-Urban Areas: Bridge the gap between rural and urban healthcare
- Multilingual Users: Native language support for better understanding
- Mobile-First Users: Optimized for smartphone usage
- Healthcare Seekers: General health information and guidance
- Not a Medical Diagnosis: This application provides general health information only
- Professional Consultation: Always consult qualified healthcare professionals for medical advice
- Emergency Situations: For medical emergencies, call 108 or visit the nearest hospital
- Data Privacy: User health data is handled with strict privacy measures
- AI Limitations: AI responses should not replace professional medical judgment
Error: Could not find the build directory
Solution: Run npm run build
before starting the server
Error: listen EADDRINUSE: address already in use :::5000
Solution:
# Find and kill the process using port 5000
netstat -ano | findstr :5000
taskkill /PID [process_id] /F
# Or use a different port
set PORT=3000 && npm run dev
ApiError: PERMISSION_DENIED
Solution:
- Get a valid Google Gemini API key from Google AI Studio
- Add it to your
.env
file - Restart the server
Error: listen ENOTSUP: operation not supported on socket
Solution: This is fixed in the current version
If you don't have a Google Gemini API key, the app runs in demo mode with basic functionality.
- Data Encryption: All data transmission is encrypted
- User Privacy: No personal health data is stored permanently
- Secure Authentication: Firebase-based user authentication
- API Security: Protected API endpoints with proper validation
- File Upload Security: Secure file handling with type validation
GEMINI_API_KEY=your_gemini_api_key
DATABASE_URL=your_database_connection_string
NODE_ENV=production
PORT=5000
# Development
npm run dev
# Production build
npm run build
npm start
# Type checking
npm run check
- 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.
For support and questions:
- Emergency: Call 108 (India)
- General Health: Use the chat interface
- Technical Issues: Create an issue in the repository
- Google Gemini AI for advanced language processing
- Radix UI for accessible component primitives
- TailwindCSS for utility-first styling
- React Community for excellent tooling and libraries
- Indian Healthcare Community for inspiration and guidance