The Hospital Management System is a web application designed to streamline hospital operations, manage patient records, and enhance the overall efficiency of healthcare services. This application is built using React for the frontend and Node.js with Express for the backend, along with MongoDB for data storage.
- User authentication for patients, doctors, and admins
- Patient management including records and appointments
- Doctor management with profiles and schedules
- Admin dashboard for overseeing hospital operations
- Responsive design for mobile and desktop users
-
Frontend:
- React
- React Router
- Tailwind CSS
- Lucide Icons
- Axios for API calls
-
Backend:
- Node.js
- Express
- MongoDB
- Mongoose
- JWT for authentication
- dotenv for environment variable management
- Node.js (v14 or higher)
- MongoDB (local or cloud instance)
-
Clone the repository:
git clone https://github.com/MKPTechnicals/Hospital-Management-System-MERN.git
-
Navigate to the frontend directory and install dependencies:
cd frontend npm install
-
Navigate to the backend directory and install dependencies:
cd backend npm install
-
Update a
/backend/server.js
&/backend/createAdmin.js
file in the backend directory and add your MongoDB connection string:// MongoDB connection mongoose.connect('<your_MongoDB_connection_string>', {
-
To create first admin, add your details to
/backend/createAdmin.js
file in backend directory:const admin = new Admin({ firstName: "abc", lastName: "xyz", email: "abc@gmail.com", password: "xyz123", role: "admin" });
Then, execute it once using:
node createAdmin.js
-
Start the backend server:
cd backend node server.js
-
Start the frontend application:
cd frontend npm start
-
Open your browser and navigate to
http://localhost:3000
to view the application.
In the frontend directory, you can run:
npm start
: Runs the app in development mode.npm test
: Launches the test runner.npm run build
: Builds the app for production.npm run eject
: Ejects the configuration files.
Contributions are welcome! Please feel free to submit a pull request or open an issue for any suggestions or improvements.