Smart hospital queue management system with:
- a React client
- a Node/Express backend
- a SQLite database
- a FastAPI AI service for wait-time prediction
- Socket.IO live queue updates
- Patient registration and login
- Hospital and department queue booking
- Priority queue handling for emergency and senior citizen cases
- Admin controls for calling the next patient and rescheduling no-shows
- Doctor and admin dashboards with live updates
- AI-assisted wait-time prediction
- Token-aware chatbot support
Install these first:
- Git
- Node.js 18+
- npm
- Python 3.9+
- pip
git clone <your-repo-url>
cd HF26-14Install backend packages:
cd server
npm installInstall frontend packages:
cd ../client
npm installInstall AI service packages:
cd ../ai-service
pip install -r requirements.txtNo Python virtual environment is required. If you already use Python globally and that works on your machine, this project can run that way.
For local use on a machine that already has working environment variables or an existing local server/.env, you do not need to create anything new.
The backend may use these values when available:
JWT_SECRET=replace_with_a_secret
GROQ_API_KEY=optional_groq_api_key
TWILIO_ACCOUNT_SID=optional_twilio_account_sid
TWILIO_AUTH_TOKEN=optional_twilio_auth_token
TWILIO_PHONE_NUMBER=optional_twilio_phone_numberNotes:
- Twilio is optional. If Twilio values are missing, SMS sending is effectively disabled.
- Groq is optional for the rest of the app, but needed for chatbot responses.
From the server folder:
cd server
node db/seed.jsThis creates and seeds:
server/db/mediline.db- sample hospitals
- sample departments
- sample doctors
- sample admin and doctor users
- sample patients and queue tokens
ai-service/historical_queue_data.csv
Then train the AI model:
cd ../ai-service
python train.pyThis creates:
ai-service/model.pkl
Start all three services in separate terminals.
cd ai-service
python main.pyRuns on:
http://localhost:8001
cd server
node index.jsRuns on:
http://localhost:5000
cd client
npm run devRuns on:
http://localhost:3000
Open the frontend URL in your browser.
After running node db/seed.js, the default password is:
password123
Examples:
superadmin
admin_h1_d1
doc_h1_d1
admin_h2_d1
doc_h2_d1
Patient test account:
Phone: 1234567890
Password: password123
Frontend lint:
cd client
npm run lintFrontend build:
cd client
npm run buildReset local database data:
cd server
node db/seed.jsWarning: the seed command deletes and recreates server/db/mediline.db.
HF26-14/
ai-service/ FastAPI service and ML model training
client/ React/Vite frontend
server/ Express API, Socket.IO, SQLite database