Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hospital Bed Allocation System (Mini Project)

A compact MERN + Next.js 14 full-stack project demonstrating OS, DSA, and DBMS concepts:

  • DSA: Priority Queue (severity-based patient admission)
  • OS: Banker's Algorithm for safe ICU bed allocation
  • DBMS: MongoDB with transaction rollback for unsafe allocations

Tech Stack

  • Frontend: Next.js 14 (App Router), TailwindCSS, Shadcn/UI
  • Backend: Express, Node.js, TypeScript
  • Database: MongoDB (Mongoose)

Features

  • Patient admission form (/admit)
  • Bed allocation with priority queue and Banker's Algorithm
  • Dashboard: patients, ICU bed usage, logs

Setup

1. Backend

cd backend
npm install
cp .env.example .env # or set MONGO_URI and PORT in .env
npm run dev:server

2. Frontend

cd frontend
npm install
npm run dev:client

API Endpoints

  • POST /api/patient – Admit patient
  • GET /api/patients – List patients
  • POST /api/allocate – Run allocation
  • GET /api/resources – ICU bed usage
  • GET /api/logs – System logs

Notes

  • ICU bed resource must be initialized in DB as { name: "ICU_BED", totalUnits: 10, allocatedUnits: 0 }
  • PriorityQueue and Banker's Algorithm are implemented with TODOs for further study.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages