Build a Hospital Management System using ReactJs | MERN Stack Project | Full-Stack Project (2026)

Share

Summary

This video guides you through building a comprehensive hospital management system using the MERN stack (MongoDB, Express, React, Node.js). The system features an admin panel for managing doctors and services, and a doctor's panel for handling appointments. The project is suitable for resumes or college projects and includes a full demo of its functionalities, covering user authentication, appointment booking (online and cash payments), service booking, and admin/doctor dashboards.

Highlights

Project Overview and Demo
00:00:00

The video introduces a hospital management system built with the MERN stack, suitable for resumes or college projects. It provides a full demo of the site, showcasing the navbar with various navigation links, a banner, certified sections, a medical team display, patient testimonials, and a comprehensive footer.

Doctor and Service Profiles
00:02:36

The demo highlights the doctor's page with a search bar and doctor profiles, including ratings, specialization, qualifications, fees, and availability. It also demonstrates booking a doctor's appointment, showing a login requirement. The services page, populated from the server, details individual service information.

Appointment Management and Contact Form
00:03:58

The appointment page allows users to view their bookings for doctors and services. A contact form is shown which, upon submission, redirects to WhatsApp with prepopulated data. Doctor and patient login functionalities are demonstrated using Clerk for authentication.

Appointment Booking and Payment Integration (Stripe)
00:05:23

Detailed steps for booking a doctor's appointment are shown, including date/time selection, patient details, and payment options. Online payments are processed via Stripe checkout, confirming the appointment status upon successful payment. Duplicate booking prevention is also illustrated.

Doctor's Dashboard Features
00:07:54

The doctor's login provides access to a dashboard displaying latest appointments, total earnings, and appointment statistics. Doctors can update appointment statuses (e.g., to 'complete') and manage their profiles, including availability and time slots. The responsiveness across devices is also highlighted.

Admin Panel Functionality
00:09:43

The admin panel offers a comprehensive dashboard with statistics on doctors, users, appointments, and earnings. It allows for adding new doctors (with image upload to Cloudinary), managing existing doctor lists (search, filter, delete), and viewing all appointments. Similarly, services can be added, listed, edited, and deleted. All admin panel pages are responsive.

Frontend Setup: React, Tailwind, React Router DOM, Clerk
00:16:19

The video transitions to setting up the frontend development environment. This includes initializing a React project with Vite, integrating Tailwind CSS for styling, installing and configuring React Router DOM for navigation, and setting up Clerk for user authentication, complete with environment variables and provider wrapping.

Backend Setup: Express, MongoDB, Cloudinary, Stripe
00:40:30

The backend setup begins with creating an Express.js project. Essential dependencies like `body-parser`, `cloudinary`, `cors`, `dotenv`, `express`, `jsonwebtoken`, `mongoose`, `multer`, `nodemon`, `stripe`, and `validator` are installed. MongoDB Atlas is configured for database connection, and Cloudinary is set up for image storage, including API key handling. Stripe API is configured for payment processing, along with a custom JWT secret for authentication.

Doctor Model and API Development
00:50:30

The `Doctor` Mongoose schema is defined, including fields like email, password, name, specialization, image, experience, and availability. Helper functions for time conversion and schedule management are introduced. API endpoints are developed for creating, retrieving (all and by ID), updating, and deleting doctor profiles, as well as toggling their availability, and a dedicated login endpoint.

Authentication Middleware and Multer Setup
02:11:51

A custom authentication middleware for doctors is implemented using JSON Web Tokens (JWT) to verify user roles and fetch doctor data. Multer is set up as middleware for handling file uploads (specifically images) to a local 'uploads' directory, establishing file filtering and size limits before eventual upload to Cloudinary.

Service Model and API Development
03:30:54

The `Service` Mongoose schema is defined for managing hospital services, including fields like name, description, price, availability, image, and associated appointment statistics. Helper functions are created to parse JSON array fields and normalize time slots. API endpoints are developed for creating, retrieving, updating, and deleting services.

Appointment Model and API Development
05:05:30

The `Appointment` Mongoose schema is established to store details of doctor appointments, including patient and doctor information, appointment date/time, fees, status (pending, confirmed, completed, cancelled), and payment details (method, status, amount). Helper functions aid in converting time, building frontend URLs, and resolving Clerk user IDs.

Appointment API Endpoints and Stripe Integration
05:09:59

`Appointment` API endpoints are implemented for retrieving appointments (all, by patient, by doctor), creating new appointments (with Clerk authentication and duplicate booking prevention), confirming Stripe payments, updating appointment details, cancelling appointments, and fetching general statistics. Stripe checkout sessions are integrated for online payments.

Service Appointment Model and API Development
05:51:00

The `ServiceAppointment` Mongoose schema is designed for managing service bookings, capturing patient and service details, appointment specifics, and payment information (similar to `Appointment`). Helper functions assist in number formatting, time parsing, and managing date/time conversions. API endpoints are developed for creating, confirming payments, retrieving, updating, and cancelling service appointments, along with fetching statistics and retrieving appointments by patient.

Admin Panel UI Development: Navbar and Hero Section
06:11:51

The frontend of the admin panel is developed using React and Tailwind CSS. The `Navbar` component is built with desktop and mobile navigation, integrating Clerk for authentication. A `Hero` component introduces the admin panel, displaying dynamic welcome messages for doctors and administrators, along with informational cards describing system features.

Admin Panel UI Development: Dashboard and Add Doctor
07:05:07

The `Dashboard` component is created to display key statistics like total doctors, registered users, appointments, and earnings, featuring a UI for filtering and sorting doctor data. The `AddPage` component allows administrators to add new doctor profiles, including image uploads, detailed personal/professional information, and schedule management with time slot validation.

Admin Panel UI Development: Doctor List and Appointments
07:59:16

The `ListPage` component presents a searchable and filterable list of doctors, enabling administrators to view doctor details, toggle availability, and delete doctor profiles. The `AppointmentsPage` component provides an interface to manage all appointments, with filtering by status, search by patient/service name, and options to update appointment statuses.

Admin Panel UI Development: Service Dashboard and Add Service
08:35:55

The `ServiceDashboard` component offers an overview of services, appointments, and earnings. `AddServicePage` facilitates adding new services, allowing image uploads, description, pricing, and schedule configuration. The `ListServicePage` displays a list of services with options to filter, search, edit, and delete, similar to the doctor management.

Frontend UI Development: Homepage Features
09:02:18

The frontend UI begins with a `Banner` component featuring a dynamic title, star ratings, and call-to-action buttons for appointment booking and emergency calls. A `Certification` component showcases an animated display of recognized certifications and healthcare standards. The `HomeDoctors` section lists verified specialists with options to view their profiles and book appointments.

Frontend UI Development: Testimonials and Footer
09:12:15

A `Testimonial` component displays scrolling testimonials from medical professionals and patients, enhancing user trust. The `Footer` component includes company information, quick links, service links, and social media integration, along with copyright details and navigation to external links.

Frontend UI Development: Doctor and Service Pages
09:18:00

The `DoctorsPage` provides a comprehensive list of medical experts with search and filter functionalities, allowing users to view doctor profiles. `DoctorDetailsPage` displays extensive information about a specific doctor and enables appointment booking with form validation and Stripe payment integration. Service-related pages, including `ServicePage` and `ServiceDetailPage`, showcase available diagnostic services and allow for booking with similar validation and payment capabilities.

Frontend UI Development: Contact and Login Pages
09:30:57

The `ContactPage` features a form for user inquiries, integrating with WhatsApp for direct communication, along with clinic information and map location. The `LoginPage` (for doctor admin) provides a dedicated login interface for managing doctor-specific functionalities. Global UI elements like toast notifications, scroll-to-top functionality, and handling horizontal overflow are also managed.

Testing and Responsiveness
09:41:26

The application's full functionality is tested across the admin panel, doctor's dashboard, and user-facing frontend. This includes adding and managing doctors/services, booking appointments (online and cash), updating statuses, and verifying payments. The responsiveness of all pages across various devices (desktop, tablet, mobile) is rigorously demonstrated.

Recently Summarized Articles

Loading...