The AI-Native Nervous System for Healthcare Facilities
Varuna AI is a predictive intelligence platform designed to transform emergency departments from reactive chaos to proactive preparedness. Built for the Mumbai Hacks 2025 hackathon.
Emergency Departments in densely populated urban centers face a critical disconnect:
- Frontline staff focus on individual patients (micro-clinical view)
- Administrators remain blind to aggregate trends until crisis hits
- External factors (pollution, festivals, epidemics) cause unpredictable surges
This latency in situational awareness leads to "Code Black" scenarios where patient safety is compromised by logistical collapse, not medical incompetence.
Varuna AI establishes a digital nervous system that:
- Predicts surges hours in advance using environmental data correlation
- Provides real-time situational awareness through a command center dashboard
- Streamlines triage with AI-powered clinical assessment
- Demonstrates capability through autonomous simulation
┌─────────────────────────────────────────────────────────────────┐
│ VARUNA AI │
├─────────────────┬─────────────────────┬─────────────────────────┤
│ FRONTLINE │ COMMAND CENTER │ SIMULATION AGENT │
│ INTERFACE │ DASHBOARD │ (Python) │
│ (/intake) │ (/dashboard) │ │
├─────────────────┼─────────────────────┼─────────────────────────┤
│ • Patient Entry │ • KPI Monitoring │ • AQI Modeling │
│ • Vital Signs │ • Surge Prediction │ • Patient Generation │
│ • AI Triage │ • Resource Radar │ • Alert Injection │
│ • CTAS Scoring │ • DEFCON Status │ • Crisis Simulation │
└─────────────────┴─────────────────────┴─────────────────────────┘
│
┌─────────┴─────────┐
│ SUPABASE │
│ (PostgreSQL + │
│ Realtime) │
└───────────────────┘
- Node.js 18+
- Python 3.8+
- Supabase account (free tier works)
cd varuna
npm install- Create a new project at supabase.com
- Go to SQL Editor and run the contents of
supabase_schema.sql - Go to Project Settings > API and copy your keys
# Edit .env.local with your Supabase credentials
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key# Start the Next.js development server
npm run devOpen http://localhost:3000 to see the landing page.
In a separate terminal:
# Install Python dependencies
pip install -r requirements.txt
# Run the simulation agent
python simulation_agent.py
# Or start in crisis mode for demo
python simulation_agent.py --crisisThe core intelligence runs as a separate service.
# Navigate to agent directory
cd agent
# Install dependencies
pip install -r requirements.txt
# Start the agent server
python main.pyDesign Philosophy: "Clinical Clarity" - high-contrast white background optimized for:
- Harsh fluorescent ER lighting
- Touch interaction with gloves
- Minimal cognitive load
Features:
- Patient demographics with auto-generated MRN
- Natural language chief complaint parsing
- Visual severity slider (1-10) with color interpolation
- Vital signs grid with validation
- AI triage assessment with CTAS classification
- Differential diagnosis suggestions
- Automated bed assignment
Design Philosophy: "Operational Intensity" - dark cyberpunk aesthetic for:
- 24/7 control room monitoring
- Wall-mounted displays
- Glanceable situational awareness
Features:
- DEFCON Status: Dynamic 1-5 scale based on metrics
- Environmental Banner: AQI warnings and pollution alerts
- KPI Cards: Active patients, occupancy, oxygen autonomy, staffing ratio
- Surge Predictor: Area chart showing past actuals and future predictions
- Resource Radar: Spider chart showing resource health
- Sentinel Feed: Real-time event stream
- AI Neural Link: Natural language query interface
Purpose: Autonomous "Ghost in the Machine" that:
- Simulates environmental conditions (AQI fluctuations)
- Generates clinically accurate synthetic patients
- Triggers pattern-based alerts
- Creates a "living" demo without manual interaction
Modes:
python simulation_agent.py # Normal mode (random crisis triggers)
python simulation_agent.py --crisis # Start in crisis mode immediately
python simulation_agent.py --normal # Force normal mode (no auto-crisis)| Layer | Technology |
|---|---|
| Frontend | Next.js 15, React 18, TypeScript |
| Styling | Tailwind CSS 3.4 |
| Charts | Recharts |
| Icons | Lucide React |
| Backend | Next.js API Routes |
| Database | Supabase (PostgreSQL) |
| Realtime | Supabase Realtime (WebSocket) |
| Simulation | Python 3, Faker, supabase-py |
varuna/
├── src/
│ ├── app/
│ │ ├── page.tsx # Landing page
│ │ ├── layout.tsx # Root layout
│ │ ├── globals.css # Global styles
│ │ ├── intake/
│ │ │ └── page.tsx # Frontline triage interface
│ │ ├── dashboard/
│ │ │ └── page.tsx # Command center dashboard
│ │ └── api/
│ │ └── triage/
│ │ └── route.ts # AI triage assessment API
│ ├── lib/
│ │ ├── supabase.ts # Supabase client
│ │ └── utils.ts # Utility functions
│ └── types/
│ └── database.ts # TypeScript types
├── simulation_agent.py # Python simulation script
├── supabase_schema.sql # Database schema
├── requirements.txt # Python dependencies
└── README.md
- Start the simulation agent in crisis mode:
python simulation_agent.py --crisis - Watch the AQI climb in the environmental banner
- Observe respiratory patients flooding the intake
- See the Surge Predictor show predicted increase
- Query the AI: "What protocol should we activate?"
- Run simulation in normal mode:
python simulation_agent.py --normal - Use the Intake interface to manually add patients
- Watch real-time updates on the dashboard
- Observe how DEFCON changes with metrics
- patients: Patient records with vitals, triage results, bed assignments
- alerts: Environmental and system alerts
- environmental_data: Time-series AQI and weather data
- resource_status: Hospital resource tracking (beds, ventilators, staff)
All tables have Realtime enabled for instant dashboard updates.
- Integration with actual AQI APIs (CPCB, OpenWeatherMap)
- Machine learning model for triage (replace rule-based)
- Mobile app for field paramedics
- Inter-hospital network for load balancing
- Historical analytics and reporting
- Multi-language support (Hindi, Marathi)
Built with ❤️ for Mumbai Hacks 2025
MIT License - Feel free to use and modify for your hackathon projects!
"Bridging the gap between chaos and care."