diff --git a/react/.gitignore b/.gitignore similarity index 100% rename from react/.gitignore rename to .gitignore diff --git a/admin.html b/admin.html deleted file mode 100644 index 7723211..0000000 --- a/admin.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - Admin Panel - HealthHub - - - - - -
- -
- -
-
-

Admin Panel

-
-

Login

-
- - - -
-
- -
-
- - - - - - diff --git a/appointments.html b/appointments.html deleted file mode 100644 index 13ac923..0000000 --- a/appointments.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - Appointments - HealthHub - - - - -
- -
- -
-
-

Manage Appointments

-

Book and view appointments with ease

-
- -
-

Book an Appointment

-
- - - - - -
-
- -
-

Upcoming Appointments

- -
-
- - - - - - diff --git a/doctors.html b/doctors.html deleted file mode 100644 index e69ca57..0000000 --- a/doctors.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - Doctors - HealthHub - - - - -
- -
- -
-
-

Our Doctors

-

Meet our team of experienced healthcare professionals

-
- -
-

Doctor Directory

-
-
-
- - - - - - diff --git a/react/eslint.config.js b/eslint.config.js similarity index 100% rename from react/eslint.config.js rename to eslint.config.js diff --git a/index.html b/index.html index ada5472..0c589ec 100644 --- a/index.html +++ b/index.html @@ -1,69 +1,13 @@ - + + - HealthHub - Advanced Hospital Management System - - + Vite + React - -
- -
- -
-
-
-

Welcome to HealthHub

-

Advanced Hospital Management at Your Fingertips

- Learn More -
-
- -
-

Our Features

-
-
- -

Easy Appointments

-

Book and manage appointments with ease.

-
-
- -

Patient Management

-

Efficiently manage patient records and history.

-
-
- -

Doctor Directory

-

Access our comprehensive list of healthcare professionals.

-
-
- -

Admin Dashboard

-

Powerful tools for hospital administration.

-
-
-
-
- - - - + +
+ diff --git a/react/package-lock.json b/package-lock.json similarity index 100% rename from react/package-lock.json rename to package-lock.json diff --git a/react/package.json b/package.json similarity index 100% rename from react/package.json rename to package.json diff --git a/patients.html b/patients.html deleted file mode 100644 index 13c212c..0000000 --- a/patients.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - Patients - HealthHub - - - - -
- -
- -
-
-

Patient Management

-

Efficiently manage patient records and information

-
- -
-

Add New Patient

-
- - - - - -
-
- -
-

Patient Records

- - - - - - - - - - - -
NameAgeGenderContactActions
-
-
- - - - - - diff --git a/react/postcss.config.js b/postcss.config.js similarity index 100% rename from react/postcss.config.js rename to postcss.config.js diff --git a/react/public/vite.svg b/public/vite.svg similarity index 100% rename from react/public/vite.svg rename to public/vite.svg diff --git a/react/README.md b/react/README.md deleted file mode 100644 index f768e33..0000000 --- a/react/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# React + Vite - -This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. - -Currently, two official plugins are available: - -- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh -- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh diff --git a/react/index.html b/react/index.html deleted file mode 100644 index 0c589ec..0000000 --- a/react/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Vite + React - - -
- - - diff --git a/script.js b/script.js deleted file mode 100644 index 850a7b2..0000000 --- a/script.js +++ /dev/null @@ -1,245 +0,0 @@ -// script.js -document.addEventListener('DOMContentLoaded', function() { - // Add smooth scrolling to all links - document.querySelectorAll('a[href^="#"]').forEach(anchor => { - anchor.addEventListener('click', function (e) { - e.preventDefault(); - document.querySelector(this.getAttribute('href')).scrollIntoView({ - behavior: 'smooth' - }); - }); - }); - - // Add animation to feature cards - const featureCards = document.querySelectorAll('.feature-card'); - featureCards.forEach(card => { - card.addEventListener('mouseenter', () => { - card.style.transform = 'scale(1.05)'; - }); - card.addEventListener('mouseleave', () => { - card.style.transform = 'scale(1)'; - }); - }); - - // Sample data (replace with actual data from backend) - let doctors = [ - { id: 1, name: "Dr. Smith", specialty: "Cardiology", patients: 0 }, - { id: 2, name: "Dr. Johnson", specialty: "Pediatrics", patients: 0 }, - { id: 3, name: "Dr. Williams", specialty: "Orthopedics", patients: 0 }, - ]; - - let patients = [ - { - id: 1, - name: "John Doe", - age: 35, - gender: "Male", - contact: "123-456-7890", - }, - { - id: 2, - name: "Jane Smith", - age: 28, - gender: "Female", - contact: "987-654-3210", - }, - ]; - - let appointments = []; - - // Populate doctor select options - function populateDoctors() { - const doctorSelect = document.getElementById("doctor-select"); - doctorSelect.innerHTML = ''; - doctors.forEach((doctor) => { - const option = document.createElement("option"); - option.value = doctor.id; - option.textContent = `${doctor.name} - ${doctor.specialty}`; - doctorSelect.appendChild(option); - }); - - // Add this at the end of the function - doctorSelect.style.animation = 'fadeIn 0.5s'; - } - - // Populate patient table - function populatePatients() { - const patientTableBody = document.querySelector("#patient-table tbody"); - patientTableBody.innerHTML = ""; - patients.forEach((patient) => { - const row = document.createElement("tr"); - row.innerHTML = ` - ${patient.name} - ${patient.age} - ${patient.gender} - ${patient.contact} - - - - - `; - patientTableBody.appendChild(row); - }); - - // Add this at the end of the function - patientTableBody.style.animation = 'fadeIn 0.5s'; - } - - // Populate doctor list - function populateDoctorList() { - const doctorList = document.getElementById("doctor-list"); - doctorList.innerHTML = ""; - doctors.forEach((doctor) => { - const card = document.createElement("div"); - card.className = "doctor-card"; - card.innerHTML = ` -

${doctor.name}

-

Specialty: ${doctor.specialty}

-

Patients: ${doctor.patients}

- `; - doctorList.appendChild(card); - }); - - // Add this at the end of the function - doctorList.style.animation = 'fadeIn 0.5s'; - } - - // Appointment form submission - const appointmentForm = document.getElementById("appointment-form"); - if (appointmentForm) { - appointmentForm.addEventListener("submit", function (e) { - e.preventDefault(); - const patientName = document.getElementById("patient-name").value; - const appointmentDate = document.getElementById("appointment-date").value; - const doctorId = document.getElementById("doctor-select").value; - const notes = document.getElementById("appointment-notes").value; - - const appointment = { - id: appointments.length + 1, - patientName, - appointmentDate, - doctorId: parseInt(doctorId), - notes, - }; - - appointments.push(appointment); - updateAppointmentList(); - updateDoctorPatients(appointment.doctorId); - this.reset(); - showNotification('Appointment booked successfully!'); - }); - } - - // Update appointment list - function updateAppointmentList() { - const appointmentList = document.getElementById("upcoming-appointments"); - appointmentList.innerHTML = ""; - appointments.forEach((appointment) => { - const li = document.createElement("li"); - const doctor = doctors.find((d) => d.id === appointment.doctorId); - li.textContent = `${appointment.patientName} - ${appointment.appointmentDate} with ${doctor.name}`; - appointmentList.appendChild(li); - }); - } - - // Update doctor's patient count - function updateDoctorPatients(doctorId) { - const doctor = doctors.find((d) => d.id === doctorId); - if (doctor) { - doctor.patients++; - populateDoctorList(); - } - } - - // Patient form submission - const patientForm = document.getElementById("patient-form"); - if (patientForm) { - patientForm.addEventListener("submit", function (e) { - e.preventDefault(); - const name = document.getElementById("new-patient-name").value; - const age = document.getElementById("new-patient-age").value; - const gender = document.getElementById("new-patient-gender").value; - const contact = document.getElementById("new-patient-contact").value; - - const newPatient = { - id: patients.length + 1, - name, - age: parseInt(age), - gender, - contact, - }; - - patients.push(newPatient); - populatePatients(); - this.reset(); - showNotification('Patient added successfully!'); - }); - } - - // Admin login form submission - const adminLoginForm = document.getElementById("admin-login"); - if (adminLoginForm) { - adminLoginForm.addEventListener("submit", function (e) { - e.preventDefault(); - const username = document.getElementById("admin-username").value; - const password = document.getElementById("admin-password").value; - - // Simple check (replace with actual authentication) - if (username === "admin" && password === "password") { - document.getElementById("admin-login").style.display = "none"; - document.getElementById("admin-dashboard").style.display = "block"; - } else { - showNotification("Invalid credentials", "error"); - } - }); - } - - // Generate PDF report - document - .getElementById("generate-report") - .addEventListener("click", function () { - const { jsPDF } = window.jspdf; - const doc = new jsPDF(); - - doc.text("Hospital Management System Report", 10, 10); - doc.text(`Total Patients: ${patients.length}`, 10, 20); - doc.text(`Total Doctors: ${doctors.length}`, 10, 30); - doc.text(`Total Appointments: ${appointments.length}`, 10, 40); - - doc.save("hospital_report.pdf"); - }); - - // Initialize - populateDoctors(); - populatePatients(); - populateDoctorList(); -}); - -// Edit patient function (to be implemented) -function editPatient(patientId) { - alert(`Edit patient with ID: ${patientId}`); - // Implement edit functionality -} - -// Delete patient function -function deletePatient(patientId) { - if (confirm("Are you sure you want to delete this patient?")) { - patients = patients.filter((patient) => patient.id !== patientId); - populatePatients(); - } -} - -// Add this new function for visual feedback -function showNotification(message, type = 'success') { - const notification = document.createElement('div'); - notification.textContent = message; - notification.className = `notification ${type}`; - document.body.appendChild(notification); - - setTimeout(() => { - notification.style.opacity = '0'; - setTimeout(() => { - document.body.removeChild(notification); - }, 500); - }, 3000); -} \ No newline at end of file diff --git a/react/src/App.css b/src/App.css similarity index 100% rename from react/src/App.css rename to src/App.css diff --git a/react/src/App.jsx b/src/App.jsx similarity index 100% rename from react/src/App.jsx rename to src/App.jsx diff --git a/react/src/assets/react.svg b/src/assets/react.svg similarity index 100% rename from react/src/assets/react.svg rename to src/assets/react.svg diff --git a/react/src/components/Admin.jsx b/src/components/Admin.jsx similarity index 100% rename from react/src/components/Admin.jsx rename to src/components/Admin.jsx diff --git a/react/src/components/Appointments.jsx b/src/components/Appointments.jsx similarity index 100% rename from react/src/components/Appointments.jsx rename to src/components/Appointments.jsx diff --git a/react/src/components/Doctors.jsx b/src/components/Doctors.jsx similarity index 100% rename from react/src/components/Doctors.jsx rename to src/components/Doctors.jsx diff --git a/react/src/components/Footer.jsx b/src/components/Footer.jsx similarity index 100% rename from react/src/components/Footer.jsx rename to src/components/Footer.jsx diff --git a/react/src/components/Header.jsx b/src/components/Header.jsx similarity index 100% rename from react/src/components/Header.jsx rename to src/components/Header.jsx diff --git a/react/src/components/Home.jsx b/src/components/Home.jsx similarity index 100% rename from react/src/components/Home.jsx rename to src/components/Home.jsx diff --git a/react/src/components/Patients.jsx b/src/components/Patients.jsx similarity index 100% rename from react/src/components/Patients.jsx rename to src/components/Patients.jsx diff --git a/react/src/hooks/useMediaQuery.jsx b/src/hooks/useMediaQuery.jsx similarity index 100% rename from react/src/hooks/useMediaQuery.jsx rename to src/hooks/useMediaQuery.jsx diff --git a/react/src/index.css b/src/index.css similarity index 100% rename from react/src/index.css rename to src/index.css diff --git a/react/src/main.jsx b/src/main.jsx similarity index 100% rename from react/src/main.jsx rename to src/main.jsx diff --git a/style.css b/style.css deleted file mode 100644 index d38c470..0000000 --- a/style.css +++ /dev/null @@ -1,208 +0,0 @@ -/* styles.css */ -:root { - --primary-color: #3498db; - --secondary-color: #2ecc71; - --text-color: #333; - --background-color: #f4f4f4; - --card-background: #ffffff; -} - -* { - margin: 0; - padding: 0; - box-sizing: border-box; -} - -body { - font-family: 'Arial', sans-serif; - line-height: 1.6; - color: var(--text-color); - background-color: var(--background-color); -} - -header { - background-color: var(--primary-color); - color: white; - padding: 1rem; - position: sticky; - top: 0; - z-index: 100; -} - -nav { - display: flex; - justify-content: space-between; - align-items: center; -} - -.logo { - display: flex; - align-items: center; - font-size: 1.5rem; - font-weight: bold; -} - -.logo i { - font-size: 2rem; - margin-right: 10px; -} - -nav ul { - display: flex; - list-style: none; -} - -nav ul li { - margin-left: 20px; -} - -nav ul li a { - color: white; - text-decoration: none; - transition: color 0.3s ease; -} - -nav ul li a:hover, nav ul li a.active { - color: var(--secondary-color); -} - -main { - max-width: 1200px; - margin: 0 auto; - padding: 20px; -} - -section { - background-color: var(--card-background); - margin-bottom: 30px; - padding: 20px; - border-radius: 5px; - box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); -} - -h1, h2, h3 { - margin-bottom: 15px; -} - -.btn { - display: inline-block; - background-color: var(--primary-color); - color: white; - padding: 10px 20px; - border: none; - border-radius: 5px; - cursor: pointer; - transition: background-color 0.3s ease; - text-decoration: none; -} - -.btn:hover { - background-color: var(--secondary-color); -} - -form { - display: flex; - flex-direction: column; - max-width: 400px; - margin-bottom: 20px; -} - -input, select, textarea { - margin-bottom: 10px; - padding: 10px; - border: 1px solid #ddd; - border-radius: 4px; -} - -table { - width: 100%; - border-collapse: collapse; - margin-top: 20px; -} - -table th, table td { - border: 1px solid #ddd; - padding: 12px; - text-align: left; -} - -table th { - background-color: var(--primary-color); - color: white; -} - -#doctor-grid, .feature-grid, .stat-grid { - display: grid; - grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); - gap: 20px; -} - -.doctor-card, .feature-card, .stat-card { - background-color: var(--card-background); - border: 1px solid #ddd; - border-radius: 5px; - padding: 15px; - text-align: center; - transition: box-shadow 0.3s ease; -} - -.doctor-card:hover, .feature-card:hover, .stat-card:hover { - box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); -} - -.doctor-card img, .feature-card i, .stat-card i { - width: 100px; - height: 100px; - object-fit: cover; - border-radius: 50%; - margin-bottom: 10px; -} - -.feature-card i, .stat-card i { - font-size: 3rem; - color: var(--primary-color); -} - -footer { - background-color: var(--primary-color); - color: white; - text-align: center; - padding: 10px; - position: fixed; - bottom: 0; - width: 100%; -} - -#hero, #appointments-hero, #patients-hero, #doctors-hero, #admin-hero { - background-image: url('path/to/hero-image.jpg'); - background-size: cover; - background-position: center; - color: white; - text-align: center; - padding: 100px 0; - margin-bottom: 30px; -} - -.hero-content { - background-color: rgba(0, 0, 0, 0.5); - padding: 20px; - border-radius: 5px; -} - -@media (max-width: 768px) { - nav { - flex-direction: column; - } - - nav ul { - margin-top: 10px; - } - - nav ul li { - margin: 0 10px; - } - - form { - max-width: 100%; - } -} \ No newline at end of file diff --git a/react/tailwind.config.js b/tailwind.config.js similarity index 100% rename from react/tailwind.config.js rename to tailwind.config.js diff --git a/react/vite.config.js b/vite.config.js similarity index 100% rename from react/vite.config.js rename to vite.config.js