Skip to content
hackfest-devPublic

About

Hackfest26 repository for T14

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MediLine AI

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

Features

  • 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

Prerequisites

Install these first:

  • Git
  • Node.js 18+
  • npm
  • Python 3.9+
  • pip

Clone The Repo

git clone <your-repo-url>
cd HF26-14

Install Dependencies

Install backend packages:

cd server
npm install

Install frontend packages:

cd ../client
npm install

Install AI service packages:

cd ../ai-service
pip install -r requirements.txt

No Python virtual environment is required. If you already use Python globally and that works on your machine, this project can run that way.

Environment Variables

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_number

Notes:

  • 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.

Setup Database And AI Model

From the server folder:

cd server
node db/seed.js

This 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.py

This creates:

ai-service/model.pkl

Run The Project

Start all three services in separate terminals.

1. AI Service

cd ai-service
python main.py

Runs on:

http://localhost:8001

2. Backend

cd server
node index.js

Runs on:

http://localhost:5000

3. Frontend

cd client
npm run dev

Runs on:

http://localhost:3000

Open the frontend URL in your browser.

Default Seeded Logins

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

Useful Commands

Frontend lint:

cd client
npm run lint

Frontend build:

cd client
npm run build

Reset local database data:

cd server
node db/seed.js

Warning: the seed command deletes and recreates server/db/mediline.db.

Project Structure

HF26-14/
  ai-service/   FastAPI service and ML model training
  client/       React/Vite frontend
  server/       Express API, Socket.IO, SQLite database

About

Hackfest26 repository for T14

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages