A full-stack hospital management system built with React, Node.js, Express, MongoDB, and Socket.io.
🚀 Live Demo: Click Here to View App
- Real-time appointment monitoring
- Patient registry management
- Booking system
- Prescription generator
- Live updates via WebSocket
- Frontend: React, TypeScript, Vite
- Backend: Node.js, Express, Socket.io
- Database: MongoDB
- Containerization: Docker
- Docker and Docker Compose installed
- MongoDB Atlas account (or local MongoDB)
🚀 Getting Started
For a detailed walkthrough, see the Docker Setup Guide.
- Clone the repository:
git clone https://github.com/No-Reed/Hospital-Management-System.git
cd hospital-management-system- Create a
.envfile in the root directory:
MONGO_URI=your_mongodb_connection_string
PORT=4000
NODE_ENV=production- Build and run with Docker Compose:
docker compose up --build- Access the application:
- Frontend: http://localhost:5173
- Backend API: http://localhost:4000
cd backend
npm install
npm startcd frontend
npm install
npm run devCreate a .env file in the root directory with:
MONGO_URI=mongodb+srv://username:password@cluster.mongodb.net/?appName=HMS
PORT=4000
NODE_ENV=production
For frontend, create a .env file in the frontend directory:
VITE_API_URL=http://localhost:4000/api
VITE_SOCKET_URL=http://localhost:4000
- Build containers:
docker-compose build - Start containers:
docker-compose up - Start in background:
docker-compose up -d - Stop containers:
docker-compose down - View logs:
docker-compose logs -f - Rebuild and restart:
docker-compose up --build
hospital-management-system/
├── backend/
│ ├── models/
│ ├── index.js
│ ├── Dockerfile
│ └── package.json
├── frontend/
│ ├── src/
│ ├── public/
│ ├── Dockerfile
│ ├── nginx.conf
│ └── package.json
├── DOCKER.md
└── docker-compose.yml
ISC