Real-time AI appointment scheduling that prioritizes emergencies and saves lives.
Traditional appointment systems fail during emergencies. Patients with critical conditions wait the same as routine visits.
HopSlot uses AI + real-time data to:
- ✅ Prioritize by urgency (severity, emergency status, visit reason)
- ✅ Doctor availability as primary factor
- ✅ Dynamic batch slot optimization
- ✅ Lab report management in one secure place
🤖 ML-Driven Ranking
- Patient urgency scoring (PyTorch + Scikit-learn)
- Real-time doctor availability tracking
- Emergency case escalation
⏰ Dynamic Scheduling
- Batch slot optimization
- Real-time availability updates (KafkaJS)
- Edge case handling (overbooking, cancellations)
📱 Patient Experience
- Flutter mobile-first interface
- Lab report viewer + secure storage
- B2B hospital integration ready
NestJS (Bun - Prisma - Fastify - RxJS - KafkaJS - IoRedis)
PostgreSQL - Redis (caching) - Docker (containerization)
Python 3.12 - PyTorch - Scikit-learn - Pandas - NumPy - joblib
Real-time inference + model retraining pipelines
Flutter (mobile-first responsive design)
Clean architecture + state management
ApiDog (API testing) - DataGrip (DB) - Warp Terminal
Android Studio - VS Code - PyCharm
graph TB
Patient[Patient App<br/>Flutter] -->|Kafka| Backend[NestJS API<br/>Real-time Queue]
Backend --> ML[PyTorch ML<br/>Urgency Ranking]
Backend --> DB[(PostgreSQL<br/>Appointments + Reports)]
Backend --> Cache[Redis<br/>Live Availability]
Doctor[Doctor Portal] --> Backend
Admin[Hospital Admin] --> Backend
Docker - Bun - PostgreSQL - Python 3.12 - Flutter SDK# Clone & install
git clone https://github.com/arhamsc/HopSlot.git
cd HopSlot/backend
# Bun setup (faster than npm!)
bun install
# Env setup (copy .env.example)
cp .env.example .env
# Update DB credentials, Kafka broker, etc.
# Docker compose (recommended)
docker-compose up -d
# Or local dev
bun run start:devcd ml-models
pip install -r requirements.txt
python train.py # Train urgency model
python serve.py # Start inference servercd frontend
flutter pub get
flutter run1. Patient submits appointment request + urgency details
2. ML model scores urgency (PyTorch → 0-1 score)
3. Real-time doctor availability fetched (PostgreSQL + Redis)
4. Kafka queue processes batch optimization
5. Optimal slot assigned → Patient + Doctor notified instantly
6. Lab reports accessible via secure patient portal
Edge cases handled:
- Emergency overrides (score > 0.9)
- Doctor no-shows/cancellations
- Overlapping high-priority cases
- Real-time rescheduling
- Saves lives through emergency prioritization
- 60% faster scheduling vs traditional systems
- B2B ready for hospital chains
- Scalable to millions of appointments
- Complete patient journey (scheduling → reports)
Built by S C Arham
✉️ [email protected]
⭐ Star if you find it useful!
🙌 Contributions welcome (see CONTRIBUTING.md)
🐛 Found a bug? Open an issue!
HopSlot — Where time meets lives saved. 🩺⚡