Inspiration

Blood shortages are rarely a supply problem. They are a visibility problem. Blood banks don't see demand coming until it's a crisis, donors don't know where they're needed, and hospitals end up phoning around for stock. We wanted one system where all three can see the same picture, and where shortages are predicted instead of discovered too late.

What it does

HemoAI is a blood bank management platform with role-based access for donors, blood bank officers, hospital admins and district health officers (DHOs).

  • Blood banks track inventory per blood group, get low-stock alerts, and see a forecast of next week's donations.
  • Hospitals and DHOs get a real-time view of stock across all the banks they oversee.
  • Donors get a map of nearby blood banks, their donation history, and a downloadable PDF certificate for each donation.
  • An AI chatbot answers natural-language questions about inventory, grounded in live stock levels.
  • New blood bank and hospital registrations wait in an approval queue before going live.

How we built it

HemoAI is a microservices system, and every service is containerized. docker compose up --build starts the whole stack.

  • Frontend: React 18 + Vite, Leaflet for the map, jsPDF and html2canvas for certificates.
  • Backend: five Spring Boot services (auth, employee, inventory, donation, chatbot), each with its own MySQL schema and a shared JWT secret.
  • ML service: Flask + scikit-learn. It trains a LinearRegression model per blood group on real donation history and predicts next week's donations. Forecast calls are logged to MongoDB.
  • Chatbot: it runs on a local Ollama model, so donor data stays self-hosted. It calls the inventory service at answer time so replies use actual stock instead of guesses.

Challenges we ran into

  • Coordinating six independent services: ports, shared auth, and one database per service.
  • Making the chatbot answer from real inventory data instead of hallucinating.
  • Making the Docker setup self-contained so it runs with a single command.
  • (Add your own here, e.g. limited training data for the forecasts.)

Accomplishments that we're proud of

  • A complete multi-role platform, from registration and approval through to forecasting.
  • Demand forecasting trained on real donation records.
  • A privacy-friendly chatbot that runs fully locally.
  • One-command Docker deployment.

What we learned

  • Designing and securing a microservice architecture with role-based JWT auth.
  • Combining an ML service with Java services through a clean API boundary.
  • Grounding an LLM in live data to keep its answers reliable.

What's next for HemoAI – Predictive Blood Bank Management

  • Stronger forecasting models that account for seasonality and events.
  • Donor notifications when their blood group is running low nearby.
  • Hospital-to-bank stock requests and transfers.
  • Mobile app for donors.

Built With

Share this project:

Updates

Submission history