AI-powered pharmacy analytics that transforms spreadsheets into actionable intelligence — helping hospitals save thousands monthly on expired medications.
Hospital pharmacies are hemorrhaging money on expired medications.
- $2.8 billion — wasted annually on expired medications in US hospitals
- 20-50% — of prepared anesthesia drugs discarded unused
- 72% — of all drug returns are expired inventory
- 4x increase — in drug shortages over the past 5 years
Pharmacy directors manage millions in inventory using spreadsheets and gut instinct.
- No visibility into what's expiring until it's too late
- No demand forecasting — just over-ordering "to be safe"
- No FIFO compliance tracking — newer lots get used first, older lots expire
- No analytics layer between inventory systems and decisions
"I manage 2,000+ medications in Excel. I don't know what's expiring until it's too late." — Hospital Pharmacist
MedShare transforms pharmacy spreadsheets into actionable intelligence.
- Upload your existing inventory export (CSV/Excel) — takes 5 seconds
- Instantly see expiring medications ranked by dollars at risk
- AI analyzes your usage patterns and forecasts 30-day demand
- Get specific recommendations: "Reduce Propofol order by 15%"
One hospital. One upload. $4,200/month saved.
- Real-time inventory overview with 4 key stat cards
- Usage trend charts with 8-week historical data
- Department breakdown showing medication usage by OR, ICU, ER
- AI-powered insights with specific recommendations
- 30-day demand forecasting with confidence intervals
- Smart prioritization by urgency (High/Medium/Low)
- Dollar impact calculation showing value at risk
- FIFO violation detection preventing waste
- CSV export for pharmacy directors and compliance
- Real-time notifications panel with alert counts
- Dynamic voice announcements using Web Speech API
- Live transcript display with word-by-word animation
- Medicine-specific alerts with quantities and expiration dates
- Customizable messages based on actual inventory data
- 🤖 Gemini AI Vision — 90%+ accuracy drug label recognition
- Real-time webcam feed with LiveKit streaming
- Smart multi-layer recognition:
- Gemini Vision (most accurate)
- Gemini Text + OCR (fallback)
- OpenFDA API validation
- Automatic extraction: Drug names, NDC codes, lot numbers, expiry dates
- Confidence scoring and error handling
- Voice alerts for urgent medications
- See
docs/GEMINI_AI_INTEGRATION.mdfor full details
- Hospital selector with 3 demo locations:
- Metro General Hospital (Urban, Downtown)
- St. Mary's Medical Center (Suburban, 12 miles)
- County Medical Center (Rural, 25 miles)
- Distance-based matching for hospital transfers
- Location tracking and facility management
- 5 report types: Inventory, Expiration, FIFO, Forecast, Insights
- PDF generation with professional formatting
- CSV exports for expiration alerts
- Download tracking and report history
- Interactive help with common questions
- Feature guidance for onboarding
- Contextual assistance based on current view
- Beautiful chat UI with animations
- Glassmorphism design with aurora gradients
- Dark mode support with proper contrast
- Responsive layout for desktop and tablet
- Smooth animations using Framer Motion
- Professional color palette appropriate for healthcare
┌─────────────────┐ ┌─────────────────┐
│ Frontend │────▶│ Backend │
│ React + Vite │ │ Express + TS │
│ Port: 5173 │ │ Port: 3001 │
└─────────────────┘ └─────────────────┘
│ │
│ │
┌───▼────────────────────────▼───┐
│ Features & Integrations │
│ • Web Speech API (Voice) │
│ • CSV Parsing (PapaParse) │
│ • PDF Generation (PDFKit) │
│ • AI Ready (Gemini/Vision) │
└────────────────────────────────┘
| Technology | Purpose |
|---|---|
| React 18 | UI framework |
| TypeScript | Type safety |
| Vite | Build tool & dev server |
| Tailwind CSS | Utility-first styling |
| Framer Motion | Animations |
| Recharts | Data visualization |
| shadcn/ui | Component library |
| Lucide React | Icon system |
| Sonner | Toast notifications |
| Technology | Purpose |
|---|---|
| Node.js | Runtime |
| Express | Web framework |
| TypeScript | Type safety |
| PDFKit | PDF generation |
| CORS | Cross-origin support |
| tsx | TS execution & watch mode |
| Technology | Purpose |
|---|---|
| Google Gemini Pro Vision | Advanced drug label recognition (90%+ accuracy) |
| Tesseract.js | OCR text extraction (fallback) |
| OpenFDA API | Drug data validation & enrichment |
| LiveKit | Real-time video streaming & data channels |
| Web Speech API | Voice alerts for critical notifications |
NEW! 🚀 Gemini AI Integration
- Vision-based drug label analysis
- Context-aware pharmaceutical recognition
- Smart fallback to OCR + FDA validation
- See
docs/GEMINI_AI_INTEGRATION.mdfor details
- Node.js 18+ and npm
- Git
# Clone the repository
git clone https://github.com/candpixie/MedShare-NexHacks.git
cd MedShare-NexHacks-1
# Install backend dependencies
cd backend
npm install
# Install frontend dependencies
cd ../frontend
npm installTerminal 1 — Backend:
cd backend
npm run devBackend runs on http://localhost:3001
Terminal 2 — Frontend:
cd frontend
npm run devFrontend runs on http://localhost:5173
Open your browser: http://localhost:5173
MedShare-NexHacks-1/
├── frontend/
│ ├── src/
│ │ ├── app/
│ │ │ ├── App.tsx # Main application
│ │ │ └── components/
│ │ │ ├── Header.tsx # Top navigation
│ │ │ ├── StatCard.tsx # Dashboard metrics
│ │ │ ├── AlertCard.tsx # Expiration alerts
│ │ │ ├── VoiceAlert.tsx # Voice announcement
│ │ │ ├── SupportChatbot.tsx # Support assistant
│ │ │ ├── InventoryView.tsx # Full inventory list
│ │ │ ├── ReportsView.tsx # PDF reports
│ │ │ ├── SettingsView.tsx # User & hospital settings
│ │ │ ├── MatchCard.tsx # Hospital matching
│ │ │ ├── NetworkRequest.tsx # Transfer requests
│ │ │ ├── TransferModal.tsx # Transfer UI
│ │ │ └── ui/ # shadcn components
│ │ └── styles/
│ │ ├── index.css
│ │ ├── theme.css # Design tokens
│ │ └── tailwind.css
│ ├── public/
│ │ ├── medshare-logo.svg
│ │ └── favicon.svg
│ └── package.json
│
├── backend/
│ ├── src/
│ │ ├── server.ts # Express server
│ │ ├── routes/
│ │ │ ├── inventory.ts # Inventory endpoints
│ │ │ ├── reports.ts # PDF report generation
│ │ │ └── settings.ts # User/hospital settings
│ │ ├── data/
│ │ │ └── mockData.ts # Demo inventory data
│ │ └── types/
│ │ └── index.ts # TypeScript types
│ └── package.json
│
├── README.md
├── docs/QUICKSTART.md
└── .gitignore
| Endpoint | Method | Description |
|---|---|---|
/api/inventory |
GET | Get all medications with alerts |
/api/inventory/:id |
GET | Get single medication details |
/api/inventory/stats/summary |
GET | Get dashboard statistics |
| Endpoint | Method | Description |
|---|---|---|
/api/reports |
GET | List available reports |
/api/reports/download/:type |
GET | Download PDF report |
Report Types: inventory, expiration, fifo, forecast, insights
| Endpoint | Method | Description |
|---|---|---|
/api/settings/profile |
GET | Get user profile |
/api/settings/profile |
PUT | Update user profile |
/api/settings/hospital |
GET | Get hospital information |
-
Propofol 200mg/20mL
- Stock: 70 vials
- 2 lots (expiring Feb 7 & Mar 15, 2026)
- Unit cost: $60-62
- Alerts: Expiring soon
-
Atropine 0.4mg/mL
- Stock: 30 vials
- 1 lot (expiring Jan 31, 2026)
- Unit cost: $20
- Alerts: Expiring soon, FIFO risk
-
Succinylcholine 20mg/mL
- Stock: 40 vials
- 1 lot (expiring Feb 21, 2026)
- Unit cost: $30
- Alerts: Expiring soon
- Metro General Hospital (Your hospital) — Urban, Downtown
- St. Mary's Medical Center — 12 miles, Bronx area
- County Medical Center — 25 miles, Suffern, NY
1. Click "Upload Data" in header
2. Select CSV file with columns:
- ndc_code, drug_name, form_type, quantity
- lot_number, expiration_date, unit_cost
- par_level, daily_usage
3. App parses and displays medications
4. Dashboard updates with new data
1. Dashboard shows alerts ranked by urgency
2. Each card displays:
- Drug name & expiry days
- Stock/Need/Excess quantities
- Dollar value at risk
3. Click "Export CSV" to download
4. Click "Mark Reviewed" to acknowledge
1. Navigate to Reports tab
2. Choose from 5 report types
3. Click "Download PDF"
4. Professional PDF opens/downloads
1. Click hospital selector in header
2. Modal shows 3 hospitals with:
- Type (Urban/Suburban/Rural)
- Distance from your location
- City/area
3. Select to switch context
1. Click "Scan Drug Label" in Quick Actions
2. Modal opens with webcam interface
3. Click "Start Camera" (demo mode)
4. Position drug label in frame
5. AI detects: Name, NDC, Lot, Expiry
6. Data added to inventory
/* Light Mode */
--navy-ink: #0F172A; /* Primary text */
--med-blue: #0284C7; /* Primary actions */
--aurora-cyan: #06B6D4; /* Accents */
--aurora-violet: #7C3AED; /* Special features */
--soft-ice: #F8FAFC; /* Background */
--success-mint: #059669; /* Positive states */
--warning-amber: #D97706; /* Warnings */
--danger-rose: #E11D48; /* Errors */
/* Dark Mode */
--text-primary: #F1F5F9; /* High contrast text */
--text-muted: #94A3B8; /* Secondary text */
--med-blue: #0EA5E9; /* Brighter blue */- Headings: System font stack with semibold weight
- Body: Base 16px, line-height 1.5
- Code/Numbers: Tabular nums for alignment
# Install Vercel CLI
npm i -g vercel
# Deploy from root
vercel
# Set environment variables in Vercel dashboardFrontend: Vercel, Netlify, or Cloudflare Pages
Backend: Railway, Render, or Fly.io
- Gemini AI Vision integration ✅ (90%+ accuracy drug scanning!)
- LiveKit webcam streaming ✅ (Real-time video with data channels)
- Real OCR + OpenFDA validation ✅ (Multi-layer recognition)
- ElevenLabs voice synthesis (currently using Web Speech API)
- User authentication system
- MongoDB Atlas integration
- Hospital-to-hospital transfer workflow
- Multi-facility dashboards
- Automated reorder suggestions
- Mobile app (React Native)
- EHR integrations (Epic, Cerner)
- Predictive shortage alerts
- GPO contract optimization
- National hospital network
Core Technologies:
- react • typescript • vite • tailwind • framer-motion
- express • node.js • pdfkit • tsx
- recharts • shadcn/ui • lucide-react • sonner
AI/ML Ready:
- gemini-api • elevenlabs • computer-vision • ocr
Built at NexHacks 2026
All Rights Reserved - Built for educational purposes at NexHacks 2026.
- ASHP Guidelines on Drug Shortages
- Published research on anesthesia drug waste
- NexHacks 2026 organizers and sponsors
- Hospital pharmacists who shared their challenges
Questions or feedback? Open an issue or contact the team.
Every expired vial is money wasted. MedShare turns spreadsheets into savings.
© 2026 MedShare Team. All rights reserved.
For detailed information about our Wood Wide AI integration, including:
- AutoML model training and deployment
- Demand prediction and forecasting
- Drug clustering algorithms
- Anomaly detection systems
- API integration guide and best practices
👉 See our complete guide: backend/wood_wide_models/README.md
Star this repo if you found it helpful!