This is the frontend repository for MediLink, a comprehensive Hospital Management System (HMS) built with React, Vite, and Tailwind CSS. It provides a complete user interface for various roles within a hospital, including patients, doctors, lab technicians, pharmacists, and administrators.
The application is split into a public-facing site and role-based private dashboards.
- Home: Landing page with an overview of services and stats.
- About Us: Information about the hospital and its team.
- Services: Detailed list of medical services offered.
- Our Doctors: A public list of doctors on staff.
- Contact Us: A contact form and location details.
- Role-Based Login: Separate login portals for Patients, Doctors, Lab Techs, Pharmacists, and Admins.
- Registration: A multi-step registration process for new patients and a separate flow for staff registration.
- Protected Routes: Client-side routing is protected based on user role and authentication status.
- Dashboard: A summary of upcoming appointments and recent prescriptions.
- Book Appointment: An interface to select a specialty and doctor to book a new appointment.
- My Appointments: View upcoming, past, and cancelled appointments.
- My Prescriptions: View a list of all prescriptions issued by doctors.
- Lab Appointments: View status and results of lab test appointments.
- Billing: View and pay outstanding bills (integrates with Razorpay).
- Profile Management: Update personal details and change password.
- Dashboard: A summary of today's appointments and other key stats.
- Appointments: View and manage the appointment schedule (today, upcoming, past).
- Create Prescription: A form to issue new prescriptions to patients during an appointment.
- Patients: View a list of patients associated with the doctor.
- Profile Management: Update professional details.
- Dashboard: A summary of pending and completed lab tests.
- Manage Lab Tests: Add, edit, and delete available lab test types and their fees.
- Manage Appointments: View assigned lab appointments, update status, and add remarks/results.
- Profile Management: Update personal details.
- Dashboard: A summary of pending orders and inventory status.
- Medicine Inventory: Manage the list of available medicines, update stock levels, and add new medicines.
- Medicine Orders: View and process pending medicine orders from patients/doctors.
- Profile Management: Update personal details.
- Dashboard: High-level overview of hospital statistics (total doctors, patients, appointments).
- Manage Doctors: Add new doctors, view all doctors, and remove doctors.
- Manage Patients: View a complete list of all registered patients.
- Manage Appointments: View and manage all appointments in the system.
- Frontend: React (v19)
- Bundler: Vite
- Routing: React Router (v6)
- Styling: Tailwind CSS
- API Client: Axios
- Notifications: React Toastify
Follow these instructions to get a copy of the project up and running on your local machine for development and testing purposes.
npmoryarn
-
Clone the repository:
-
Install dependencies:
npm install
or
yarn install
-
Run the Vite dev server:
npm run dev
-
Open http://localhost:5173 (or the port specified in your terminal) to view the application in your browser.
This frontend application is designed to work with a separate backend API, backend is in a separate repository HMSBackend.
- The API connection is configured in
src/services/api.js. - By default, the application attempts to connect to
http://localhost:8080/api. - You must have the corresponding backend server running at this address for the application to function correctly (including login, registration, and data fetching).