Skip to content

dr5t/bedmgmt

Repository files navigation

πŸ₯ Clinical Horizon

Hospital Bed Management System

React Firebase Vite TailwindCSS License

A modern, real-time hospital bed management platform that gives healthcare networks a unified command center for bed availability, patient flow, admissions, discharges, and staff coordination.

Live Demo Β· Report Bug Β· Request Feature


✨ Features

Module Description
πŸ›οΈ Bed Management Real-time ward inventory with occupancy heatmaps
πŸ‘€ Patient Registry Full patient lifecycle from intake to discharge
πŸ“‹ Admissions Structured intake with bed assignment and approval flows
πŸ”„ Discharge Flow 4-step discharge checklist with logistics & sign-off
πŸ”” Notifications Priority-based alert center with emergency broadcast
πŸ“Š Analytics Admissions history, flow dynamics, department charts
🏒 Hospital Network Multi-facility map with live inter-hospital transfers
πŸ‘₯ Staff Roster Workforce scheduling and credential management
πŸ”§ Maintenance Queue Bed maintenance tracking and status updates
πŸ” Role-based Access User / Hospital Admin / Admin / Superadmin tiers
πŸŒ— Dark Mode Full light/dark theme with persisted preference
πŸ“± Responsive Works on desktop, tablet, and mobile

πŸ—οΈ Tech Stack

  • Frontend: React 19, React Router 7, Framer Motion
  • Styling: Tailwind CSS 3 + custom CSS design tokens (Material 3 color system)
  • Charts: Chart.js + react-chartjs-2
  • Backend / Auth: Firebase Authentication + Firestore
  • Build tool: Vite 8
  • Deployment: Firebase Hosting

πŸš€ Getting Started

Prerequisites

  • Node.js 18+ and npm 9+
  • A Firebase project with Authentication and Firestore enabled

1. Clone the repository

git clone https://github.com/dr5t/bedmgmt.git
cd bedmgmt

2. Install dependencies

npm install

3. Configure environment variables

cp .env.example .env

Edit .env and fill in your Firebase project credentials:

VITE_FIREBASE_API_KEY=your_api_key
VITE_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your_project_id
VITE_FIREBASE_STORAGE_BUCKET=your_project.firebasestorage.app
VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
VITE_FIREBASE_APP_ID=your_app_id
VITE_FIREBASE_MEASUREMENT_ID=G-XXXXXXXXXX

4. Start the development server

npm run dev

The app will be available at http://localhost:5173.


πŸ‘€ User Roles

Role Access
user Dashboard, Patient Locator, Notifications, Help, Settings
hospital_admin All user routes + clinical, bed, asset management
admin All hospital_admin routes + System Admin, Audit Logs, Approvals, API Docs
superadmin Full access to all routes and actions

πŸ“ Project Structure

bedmgmt/
β”œβ”€β”€ public/                  # Static assets
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ DashboardLayout.jsx  # Sidebar + header shell
β”‚   β”‚   └── SkeletonLoader.jsx
β”‚   β”œβ”€β”€ context/
β”‚   β”‚   └── AuthContext.jsx      # Firebase auth state + login/register logic
β”‚   β”œβ”€β”€ pages/               # One component per route (35+ pages)
β”‚   β”œβ”€β”€ services/            # Firebase service helpers
β”‚   β”œβ”€β”€ hooks/               # Custom React hooks
β”‚   β”œβ”€β”€ utils/               # Shared utilities
β”‚   β”œβ”€β”€ styles/              # Extra CSS modules
β”‚   β”œβ”€β”€ firebase.js          # Firebase app initialization
β”‚   β”œβ”€β”€ App.jsx              # Router + lazy-loaded routes
β”‚   β”œβ”€β”€ index.css            # Global design tokens + Tailwind layers
β”‚   └── main.jsx             # Entry point
β”œβ”€β”€ .env.example             # Environment variable template
β”œβ”€β”€ .gitignore
β”œβ”€β”€ firebase.json            # Firebase Hosting config
β”œβ”€β”€ tailwind.config.js
β”œβ”€β”€ vite.config.js
└── package.json

πŸ”§ Available Scripts

Command Description
npm run dev Start development server with HMR
npm run build Production build to dist/
npm run preview Serve the production build locally
npm run lint Run ESLint on the entire codebase

🚒 Deployment

Firebase Hosting

npm run build
npx firebase deploy --only hosting

Or use the Firebase CLI:

npx firebase login
npx firebase init hosting
npm run build
npx firebase deploy

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/AmazingFeature
  3. Commit your changes: git commit -m 'Add AmazingFeature'
  4. Push to the branch: git push origin feature/AmazingFeature
  5. Open a Pull Request

Please read SECURITY.md before submitting any security-related issues.


πŸ“„ License

Distributed under the MIT License. See LICENSE for more information.


πŸ‘¨β€πŸ’» Author

Shaurya Tiwari β€” @dr5t


Made with ❀️ for better healthcare infrastructure

About

A modern, real-time hospital bed management platform that gives healthcare networks a unified command center for bed availability, patient flow, admissions, discharges, and staff coordination.

Topics

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors