A premium, comprehensive public health awareness and wellness assistant designed specifically for rural and semi-urban India. ArogyaBot provides health guidance, disease awareness, vaccine information, personalized diet planning, BMI insights, medicine suggestions, safety/interaction checks, and seamless WhatsApp integration in a highly accessible, multilingual manner.
| Layer | Technology | Description |
|---|---|---|
| Frontend | React (v19) + Vite + Tailwind CSS (v3) | Ultra-fast rendering, responsive layout, modern design system. |
| Routing | React Router DOM (v7) | Dynamic routing and client-side page handling. |
| Authentication | Supabase Auth | Secure, token-based authentication and sessions. |
| Database | Supabase (PostgreSQL) | Secure and scalable user profile and health history storage. |
| Backend | Node.js + Express.js | Core API gateway and routing logic. |
| AI Engine | Google Gemini 2.5 Flash / OpenRouter (Llama 3.3) | State-of-the-art LLMs for smart chat, diet planning, and health checks. |
| Messaging | Twilio WhatsApp API | Direct delivery of health summaries and prescriptions via WhatsApp. |
| PDF/Canvas | jsPDF + html2canvas | On-the-fly generation of downloadable wellness reports. |
- AI Health Consultation: Conversational wellness guidance using Google Gemini or OpenRouter (Llama 3.3).
- Disease & Vaccine Awareness: Detailed information on regional diseases and immunization timelines.
- Multilingual Support: Real-time toggling and automated detection for Hindi and English.
- Speech-to-Text Integration: Chrome-based Web Speech API allows users to speak their questions instead of typing.
- Medical Disclaimer Protection: Safeguards user behavior by automatically appending necessary medical disclaimers.
- Alternative Systems of Medicine: Support for Ayurvedic, Homeopathic, and Allopathic suggestions.
- Age-Adjusted Dosages: Intelligent dosage recommendations tailored to Pediatric, Adult, and Geriatric groups.
- Multi-Step Safety Warning: Tailored precautions for chronic conditions, age limits, and allergies.
- Tailored Indian Diet Charts: Generates customized breakfast, lunch, snack, and dinner options.
- Multi-Factor Customization: Automatically calculates suggestions based on:
- Age, Height, Weight, and calculated BMI category.
- Health Goal (Weight Loss, Weight Gain, Maintenance).
- Dietary Preference (Vegetarian, Non-Vegetarian).
- Dynamic BMI Analysis: Calculates BMI instantly with visual category scales.
- Wellness Advisory Panel: Seasonal tips, hydration tracking, and preventative suggestions updated in real time.
- Emergency Contacts: Quick access to national and state-level healthcare helpline numbers.
- WhatsApp Share: Integrated Twilio messaging client to push diet plans and tips to a user's phone.
- PDF Report Generation: Instant export of health profile, diet plans, and BMI stats into a printable PDF.
ArogyaBot/
βββ Backend/
β βββ data/
β β βββ healthData.json # Static dictionary of diseases and vaccines
β βββ lib/
β β βββ supabase.js # Supabase server client initialization
β βββ routes/
β β βββ chat.js # Chatbot endpoint wrapper
β β βββ diet.js # Personal diet planner endpoint
β β βββ interactions.js # Medicine interactions checker route
β β βββ suggestions.js # Medicine suggestions generator route
β β βββ whatsapp.js # Twilio WhatsApp messaging logic
β βββ utils/
β β βββ claudeClient.js # Google Gemini & OpenRouter AI adapter
β βββ .env # Local Backend environment file (ignored)
β βββ package.json # Node dependencies and run scripts
β βββ server.js # Express application entrypoint
β
βββ frontend/
β βββ public/ # Static assets (favicons, logos)
β βββ src/
β β βββ assets/ # SVGs, images, and fonts
β β βββ components/
β β β βββ BMICalculator.jsx # Interactive BMI calculator and indicator
β β β βββ EmergencyNumbers.jsx # List of important Indian helpline numbers
β β βββ context/
β β β βββ AuthContext.jsx # Global Supabase authentication wrapper
β β βββ hooks/
β β β βββ useSpeech.js # Custom speech recognition hook
β β βββ lib/
β β β βββ supabase.js # Supabase client credentials and init
β β βββ pages/
β β β βββ Landing.jsx # Modern landing page with interactive features
β β β βββ Login.jsx # Clean login screen
β β β βββ Signup.jsx # Register user with email credentials
β β β βββ Onboarding.jsx # Collects initial user details (age, weight, goal)
β β β βββ Dashboard.jsx # Tabbed interface (Advisory, Suggester, Diet, BMI)
β β β βββ Chat.jsx # Speech-enabled healthcare assistant workspace
β β βββ App.css # Local component rules
β β βββ App.jsx # Routing configuration (Protected routes)
β β βββ index.css # Global tailwind rules & HSL color tokens
β β βββ main.jsx # React app mount
β βββ .env # Local Frontend environment file (ignored)
β βββ tailwind.config.js # Tailwind customization and color palette
β βββ vite.config.js # Vite bundler configurations
β
βββ supabase_schema.json # Database schema backup file
git clone https://github.com/YOUR_USERNAME/arogya-bot.git
cd arogya-botCreate .env files in both the Backend and frontend folders using the templates provided below.
cd Backend
npm install
npm run devThe backend will run on http://localhost:3000.
cd ../frontend
npm install
npm run devThe frontend will run on http://localhost:5173. Open your browser to explore the dashboard.
Create a file named .env in the Backend directory:
# Server Port
PORT=3000
# Google Gemini API
GOOGLE_API_KEY=your_gemini_api_key
# OpenRouter (Optional: Fallback/Alternative LLM Provider)
OPENROUTER_API_KEY=your_openrouter_api_key
OPENROUTER_MODEL=meta-llama/llama-3.3-70b-instruct:free
# Supabase Configurations
SUPABASE_URL=your_supabase_project_url
SUPABASE_SERVICE_KEY=your_supabase_service_role_key
# Twilio Credentials (WhatsApp integration)
TWILIO_ACCOUNT_SID=your_twilio_account_sid
TWILIO_AUTH_TOKEN=your_twilio_auth_tokenCreate a file named .env in the frontend directory:
# Supabase Configuration
VITE_SUPABASE_URL=your_supabase_project_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_publishable_key
# API connection URL
VITE_API_URL=http://localhost:3000Create a table profiles in your Supabase database using the SQL Editor:
create table profiles (
id uuid references auth.users not null primary key,
name text,
age numeric,
gender text,
height numeric,
weight numeric,
conditions text,
diet_preference text,
goal text,
updated_at timestamp with time zone default timezone('utc'::text, now()) not null
);
-- Enable Row Level Security (RLS)
alter table profiles enable row level security;
create policy "Users can view their own profile" on profiles
for select using (auth.uid() = id);
create policy "Users can update their own profile" on profiles
for update using (auth.uid() = id);
create policy "Users can insert their own profile" on profiles
for insert with check (auth.uid() = id);- Link your GitHub repository to Vercel.
- Configure build settings:
- Framework Preset:
Vite - Root Directory:
frontend
- Framework Preset:
- Add environmental variables:
VITE_SUPABASE_URLVITE_SUPABASE_ANON_KEYVITE_API_URL(Pointer to deployed backend URL)
- Deploy the
Backenddirectory as a Web Service. - Ensure the start script is set to
npm start. - Provide variables:
GOOGLE_API_KEY,SUPABASE_URL,SUPABASE_SERVICE_KEY,TWILIO_ACCOUNT_SID, andTWILIO_AUTH_TOKEN. - Copy the deployed backend URL and update your frontend's
VITE_API_URL.
Academic Project / Full Stack AI Healthcare Assistant aimed at improving public health literacy, accessibility, and emergency support for semi-urban and rural populations.
Disclaimer: ArogyaBot is an AI-powered public health assistant designed for educational and informational purposes only. It is not a substitute for professional medical advice, diagnosis, or treatment.