diff --git a/client/src/components/Footer.jsx b/client/src/components/Footer.jsx index 61515a6..536058d 100644 --- a/client/src/components/Footer.jsx +++ b/client/src/components/Footer.jsx @@ -1,3 +1,5 @@ +"use client"; + import "react"; import { toast, ToastContainer } from "react-toastify"; import { useState } from "react"; @@ -10,13 +12,33 @@ import { Instagram, Linkedin, Heart, - ExternalLink + ExternalLink, } from "lucide-react"; +import { Link } from "react-router-dom"; import { showErrorToast, showSuccessToast } from "../helpers/utils"; import commnApiEndpoint from "../common/backendAPI"; const Footer = () => { + // ==================== STATE ==================== + const [email, setEmail] = useState(""); + + // ==================== DATA & CONSTANTS ==================== + const companyInfo = { + name: "HealthCare+", + description: + "Providing exceptional healthcare service and care to all our patients. Your health is our priority, and we are here to help you every step of the way.", + trustBadge: "Trusted by 10,000+ families", + }; + const quickLinks = [ + { name: "Home", href: "/" }, + { name: "About Us", href: "/about" }, + { name: "Services", href: "/services" }, + { name: "Doctors", href: "/doctors" }, + { name: "Appointments", href: "/appointments" }, + { name: "Contact", href: "/contact" }, + ]; + const contactInfo = [ { type: "email", @@ -39,24 +61,22 @@ const Footer = () => { href: null, icon: MapPin, }, - ] + ]; const socialLinks = [ { Icon: Facebook, href: "#", name: "Facebook" }, { Icon: Twitter, href: "#", name: "Twitter" }, { Icon: Instagram, href: "#", name: "Instagram" }, { Icon: Linkedin, href: "#", name: "LinkedIn" }, - ] + ]; const legalLinks = [ - { name: "Privacy Policy", href: "#" }, - { name: "Terms of Service", href: "#" }, - { name: "Cookie Policy", href: "#" }, - ] + { name: "Privacy Policy", href: "/privacy-policy" }, + { name: "Terms of Service", href: "/terms-of-service" }, + { name: "Cookie Policy", href: "/cookie-policy" }, + ]; // ==================== FUNCTIONS ==================== - const [email, setEmail] = useState(""); - const handleSubmit = async (e) => { e.preventDefault(); try { @@ -85,15 +105,19 @@ const Footer = () => { {/* Company Description */} -

{companyInfo.description}

+

+ {companyInfo.description} +

{/* Trust Badge */}
- {companyInfo.trustBadge} + + {companyInfo.trustBadge} +
- ) + ); const renderMainContent = () => (
@@ -134,7 +158,7 @@ const Footer = () => { return (
@@ -184,73 +208,68 @@ const Footer = () => {

Connect With Us

- { - socialLinks.map(({ Icon, href, name }, index) => { - const isTwitter = name === 'Twitter'; - - return ( - -
- { - isTwitter ? ( -
- - - -
+ {socialLinks.map(({ Icon, href, name }, index) => { + const isTwitter = name === "Twitter"; - ) : ( - - )} -
- - {name} - -
- ); - }) -} - -
+ return ( + +
+ {isTwitter ? ( +
+ + + +
+ ) : ( + + )} +
+ + {name} + +
+ ); + })} +
- ) - - + ); const renderFooterBottom = () => (
{/* Copyright */}
-

© 2024 {companyInfo.name}. All rights reserved.

+

+ © 2024 {companyInfo.name}. All rights reserved. +

{/* Legal Links */}
{legalLinks.map((link, index) => ( - {link.name} - + ))}
- ) + ); // ==================== MAIN RENDER ==================== return ( diff --git a/client/src/pages/CareCoPilot.jsx b/client/src/pages/CareCoPilot.jsx index bc67b8c..e441570 100644 --- a/client/src/pages/CareCoPilot.jsx +++ b/client/src/pages/CareCoPilot.jsx @@ -1,14 +1,19 @@ -import React, { useState } from 'react'; -import { FaBaby, FaThermometerHalf, FaPills, FaExclamationTriangle, FaInfoCircle } from 'react-icons/fa'; -import { MdHealthAndSafety } from 'react-icons/md'; -import SkeletonLoader from '../components/SkeletonLoader'; +import { useState } from "react"; +import { + FaBaby, + FaThermometerHalf, + FaPills, + FaExclamationTriangle, + FaInfoCircle, +} from "react-icons/fa"; +import { MdHealthAndSafety } from "react-icons/md"; const CareCoPilot = () => { const [formData, setFormData] = useState({ - childAge: '', - childWeight: '', - symptoms: '', - additionalNotes: '' + childAge: "", + childWeight: "", + symptoms: "", + additionalNotes: "", }); const [loading, setLoading] = useState(false); const [response, setResponse] = useState(null); @@ -16,9 +21,9 @@ const CareCoPilot = () => { const handleInputChange = (e) => { const { name, value } = e.target; - setFormData(prev => ({ + setFormData((prev) => ({ ...prev, - [name]: value + [name]: value, })); }; @@ -29,10 +34,10 @@ const CareCoPilot = () => { setResponse(null); try { - const res = await fetch('http://localhost:5000/api/care-co-pilot', { - method: 'POST', + const res = await fetch("http://localhost:5000/api/care-co-pilot", { + method: "POST", headers: { - 'Content-Type': 'application/json', + "Content-Type": "application/json", }, body: JSON.stringify(formData), }); @@ -40,7 +45,7 @@ const CareCoPilot = () => { const data = await res.json(); if (!res.ok) { - throw new Error(data.message || 'Something went wrong'); + throw new Error(data.message || "Something went wrong"); } setResponse(data.data); @@ -54,17 +59,32 @@ const CareCoPilot = () => { const formatResponse = (text) => { // Convert markdown-style formatting to HTML with better styling for user-friendly format return text - .replace(/\*\*(.*?)\*\*/g, '$1') + .replace( + /\*\*(.*?)\*\*/g, + '$1' + ) .replace(/\*(.*?)\*/g, '$1') - .replace(/^# (.*?)$/gm, '

$1

') - .replace(/^## (.*?)$/gm, '

$1

') - .replace(/^### (.*?)$/gm, '

$1

') + .replace( + /^# (.*?)$/gm, + '

$1

' + ) + .replace( + /^## (.*?)$/gm, + '

$1

' + ) + .replace( + /^### (.*?)$/gm, + '

$1

' + ) .replace(/• (.*?)$/gm, '
  • • $1
  • ') .replace(/(\n\n)/g, '

    ') - .replace(/\n/g, '
    ') + .replace(/\n/g, "
    ") .replace(/^/, '

    ') - .replace(/$/, '

    ') - .replace(/
  • • (.*?)<\/li>/g, '
  • • $1
  • '); + .replace(/$/, "

    ") + .replace( + /
  • • (.*?)<\/li>/g, + '
  • • $1
  • ' + ); }; return ( @@ -76,57 +96,58 @@ const CareCoPilot = () => {

    Care Co-Pilot

    -

    - AI-Powered Medicine Finder for All Ages -

    -
    -
    - -
    -

    - ⚠️ Important: This is for learning only! -

    -

    - Always ask a doctor before taking any medicine. This tool cannot replace a real doctor. -

    -
    -
    -
    +

    + AI-Powered Medicine Finder for All Ages +

    +
    +
    + +
    +

    + ⚠️ Important: This is for learning only! +

    +

    + Always ask a doctor before taking any medicine. This tool + cannot replace a real doctor. +

    +
    +
    +
    {/* Form Section */}
    -

    - - Patient Information -

    +

    + + Patient Information +

    {/* Age Input */}
    - - + +
    {/* Weight Input */}
    - + {
    -

    Important Safety Notice

    +

    + Important Safety Notice +

      -
    • • Never give medication to children under 2 without consulting a doctor
    • -
    • • Always verify dosage with a healthcare professional
    • -
    • • Seek immediate medical attention if symptoms worsen
    • -
    • • This AI cannot diagnose or provide medical treatment
    • +
    • + • Never give medication to children under 2 without + consulting a doctor +
    • +
    • + • Always verify dosage with a healthcare professional +
    • +
    • + • Seek immediate medical attention if symptoms worsen +
    • +
    • + • This AI cannot diagnose or provide medical treatment +
    @@ -256,25 +288,23 @@ const CareCoPilot = () => { {response && (
    - - {/* Child Info Summary */}
    -

    - - Patient Information -

    +

    + + Patient Information +

    -
    - Age: - {response.patientAge} years -
    - {response.patientWeight && ( -
    - Weight: - {response.patientWeight} kg -
    - )} +
    + Age: + {response.patientAge} years +
    + {response.patientWeight && ( +
    + Weight: + {response.patientWeight} kg +
    + )}
    Symptoms:

    {response.symptoms}

    @@ -289,14 +319,14 @@ const CareCoPilot = () => { Medical Guidance - - AI Generated - + + AI Generated +
    -
    @@ -304,7 +334,8 @@ const CareCoPilot = () => { {/* Timestamp and Disclaimer */}
    - Generated on: {new Date(response.timestamp).toLocaleString()} + Generated on:{" "} + {new Date(response.timestamp).toLocaleString()}
    {response.note && (
    @@ -319,10 +350,13 @@ const CareCoPilot = () => {
    -

    Ready to Get Started

    -

    - Fill out the form on the left and submit to get AI-powered medicine guidance for any age. -

    +

    + Ready to Get Started +

    +

    + Fill out the form on the left and submit to get AI-powered + medicine guidance for any age. +

    )} @@ -337,7 +371,9 @@ const CareCoPilot = () => {
    -

    Emergency Symptoms:

    +

    + Emergency Symptoms: +

    • • High fever (above 40°C/104°F)
    • • Difficulty breathing
    • @@ -347,12 +383,14 @@ const CareCoPilot = () => {
    -

    Call Doctor If:

    +

    + Call Doctor If: +

    • • Symptoms persist for more than 3 days
    • • Child is under 3 months old
    • • Child has underlying health conditions
    • -
    • • You're unsure about medication
    • +
    • • You`re unsure about medication
    • • Child refuses to eat or drink
    @@ -363,4 +401,4 @@ const CareCoPilot = () => { ); }; -export default CareCoPilot; \ No newline at end of file +export default CareCoPilot; diff --git a/client/src/pages/CookiePolicy.jsx b/client/src/pages/CookiePolicy.jsx new file mode 100644 index 0000000..8f4fc92 --- /dev/null +++ b/client/src/pages/CookiePolicy.jsx @@ -0,0 +1,190 @@ +import ScrollToTop from '../components/ScrollToTop'; + +const CookiePolicy = () => { + return ( + <> + +
    + {/* Background Elements */} +
    +
    +
    +
    +
    +
    + +
    +
    +

    + Cookie Policy +

    + +
    +

    Effective Date: January 1, 2024

    +

    Last Updated: January 1, 2024

    +
    + +
    + +
    +

    + + 1. What Are Cookies? +

    +
    +

    + Cookies are small text files that are stored on your device (computer, tablet, or mobile) when you visit our website. + They help us provide you with a better experience by remembering your preferences and improving our platform's functionality. +

    +

    + Similar technologies include web beacons, pixels, and local storage objects, which we collectively refer to as "cookies" in this policy. +

    +
    +
    + +
    +

    + + 2. How We Use Cookies +

    +
    +

    InfantCare Compass uses cookies to:

    +
      +
    • Keep you logged in to your account
    • +
    • Remember your preferences and settings
    • +
    • Provide personalized healthcare reminders
    • +
    • Improve our platform's performance and user experience
    • +
    • Understand how you interact with our platform
    • +
    • Prevent fraud and enhance security
    • +
    • Comply with legal and regulatory requirements
    • +
    +
    +
    + +
    +

    + + 3. Types of Cookies We Use +

    + +
    +
    +

    3.1 Essential Cookies

    +
    +

    Purpose: These cookies are necessary for our platform to function properly.

    +
    +
      +
    • Authentication: Keep you logged in to your account
    • +
    • Security: Protect against cross-site request forgery
    • +
    • Session Management: Maintain your session state
    • +
    +
    + +
    +

    3.2 Functional Cookies

    +
    +

    Purpose: Enhance your user experience with personalized features.

    +
    +
      +
    • Preferences: Remember your language, timezone, and notification settings
    • +
    • Customization: Store your dashboard layout preferences
    • +
    • Accessibility: Remember accessibility settings like font size
    • +
    +
    + +
    +

    3.3 Analytics Cookies

    +
    +

    Purpose: Help us understand how you use our platform to improve it.

    +
    +
      +
    • Usage Analytics: Track which features are most used
    • +
    • Performance Monitoring: Identify slow-loading pages or errors
    • +
    • User Journey: Understand how users navigate through our platform
    • +
    +
    +
    +
    + +
    +

    + + 4. Children's Privacy and Cookies +

    +
    +

    We take special care with children's data:

    +
      +
    • We do not set marketing cookies based on children's health information
    • +
    • Analytics cookies related to children's data are anonymized immediately
    • +
    • Parents can request deletion of all cookies related to their child's account
    • +
    • We comply with COPPA requirements for children under 13
    • +
    +
    +
    + +
    +

    + + 5. Managing Your Cookie Preferences +

    +
    +

    You can control cookies through your browser settings:

    +
    +
    +

    Chrome:

    +

    Settings → Privacy and Security → Cookies

    +
    +
    +

    Firefox:

    +

    Preferences → Privacy & Security → Cookies

    +
    +
    +

    Safari:

    +

    Preferences → Privacy → Cookies

    +
    +
    +

    Edge:

    +

    Settings → Cookies and Site Permissions

    +
    +
    +
    +

    + Important: Disabling essential cookies may affect platform functionality, + including your ability to log in and access your child's health records. +

    +
    +
    +
    + +
    +

    + + 6. Contact Us About Cookies +

    +
    +
    +
    +

    Email

    +

    privacy@infantcarecompass.live

    +
    +
    +

    Phone

    +

    +91 919956****

    +
    +
    +

    Address

    +

    InfantCare Compass Cookie Privacy

    +
    +
    +
    +
    + +
    +
    +
    +
    + + ); +}; + +export default CookiePolicy; \ No newline at end of file diff --git a/client/src/pages/PrivacyPolicy.jsx b/client/src/pages/PrivacyPolicy.jsx new file mode 100644 index 0000000..614a332 --- /dev/null +++ b/client/src/pages/PrivacyPolicy.jsx @@ -0,0 +1,135 @@ +import ScrollToTop from '../components/ScrollToTop'; + +const PrivacyPolicy = () => { + return ( + <> + +
    + {/* Background Elements */} +
    +
    +
    +
    +
    +
    + +
    +
    +

    + Privacy Policy +

    + +
    +

    Effective Date: January 1, 2024

    +

    Last Updated: January 1, 2024

    +
    + +
    + +
    +

    + + 1. Introduction +

    +
    +

    + InfantCare Compass ("we," "our," or "us") is committed to protecting your privacy and the privacy of your children. + This Privacy Policy explains how we collect, use, disclose, and safeguard your information when you use our + healthcare platform designed to assist parents in managing their child's healthcare needs. +

    +
    +

    + Important: This platform deals with children's health information. We comply with the Children's + Online Privacy Protection Act (COPPA) and take extra precautions to protect children's data. +

    +
    +
    +
    + +
    +

    + + 2. Information We Collect +

    + +
    +
    +

    2.1 Personal Information

    +
      +
    • Parent/Guardian contact information (name, email, phone number)
    • +
    • Account credentials (username, encrypted password)
    • +
    • Profile information and preferences
    • +
    +
    + +
    +

    2.2 Child Health Information

    +
      +
    • Child's name, date of birth, and basic demographics
    • +
    • Vaccination records and schedules
    • +
    • Health-related notes and reminders
    • +
    • Consultation records (with explicit consent)
    • +
    +
    + +
    +

    2.3 Technical Information

    +
      +
    • Device information and browser type
    • +
    • IP address and location data (when permitted)
    • +
    • Usage analytics and interaction data
    • +
    • Cookies and similar tracking technologies
    • +
    +
    +
    +
    + +
    +

    + + 3. How We Use Your Information +

    +
    +
      +
    • Healthcare Management: Track vaccination schedules and send reminders
    • +
    • Educational Content: Provide personalized parenting resources
    • +
    • Communication: Send important health notifications and updates
    • +
    • Platform Improvement: Analyze usage to enhance our services
    • +
    • Safety & Security: Protect against fraud and ensure platform security
    • +
    • Legal Compliance: Meet regulatory requirements and legal obligations
    • +
    +
    +
    + +
    +

    + + 4. Contact Information +

    +
    +
    +
    +

    Email

    +

    privacy@infantcarecompass.live

    +
    +
    +

    Phone

    +

    +91 919956****

    +
    +
    +

    Address

    +

    InfantCare Compass Privacy Office

    +
    +
    +
    +
    + +
    +
    +
    +
    + + ); +}; + +export default PrivacyPolicy; \ No newline at end of file diff --git a/client/src/pages/TermsOfService.jsx b/client/src/pages/TermsOfService.jsx new file mode 100644 index 0000000..838cc6a --- /dev/null +++ b/client/src/pages/TermsOfService.jsx @@ -0,0 +1,139 @@ +import ScrollToTop from '../components/ScrollToTop'; + +const TermsOfService = () => { + return ( + <> + +
    + {/* Background Elements */} +
    +
    +
    +
    +
    +
    + +
    +
    +

    + Terms of Service +

    + +
    +

    Effective Date: January 1, 2024

    +

    Last Updated: January 1, 2024

    +
    + +
    + +
    +

    + + 1. Acceptance of Terms +

    +
    +

    + By accessing and using InfantCare Compass ("the Platform," "Service," "we," "us," or "our"), you ("User," "you," or "your") + agree to be bound by these Terms of Service ("Terms"). If you do not agree to these Terms, please do not use our Platform. +

    +
    +

    + Important: This Platform provides healthcare management tools but does not replace professional medical advice, + diagnosis, or treatment. Always consult with qualified healthcare providers for medical decisions. +

    +
    +
    +
    + +
    +

    + + 2. Description of Service +

    +
    +

    InfantCare Compass provides:

    +
      +
    • Vaccination tracking and reminder systems
    • +
    • Educational resources for childcare
    • +
    • Healthcare consultation booking platform
    • +
    • AI-powered care guidance tools
    • +
    • Community resources and support
    • +
    +
    +

    + Medical Disclaimer: Our Platform is for informational and organizational purposes only. + It is not intended to diagnose, treat, cure, or prevent any disease or medical condition. +

    +
    +
    +
    + +
    +

    + + 3. User Responsibilities +

    +
    +
      +
    • You must be at least 18 years old or the legal guardian of a child
    • +
    • You must provide accurate and complete registration information
    • +
    • You are responsible for maintaining the confidentiality of your account
    • +
    • Use the Platform for legitimate healthcare management purposes
    • +
    • Follow healthcare providers' professional guidance
    • +
    +
    +
    + +
    +

    + + 4. Emergency Situations +

    +
    +
    +

    EMERGENCY NOTICE:

    +

    + For medical emergencies, call emergency services immediately. Do not rely on our Platform + for urgent medical situations. +

    +
    +
      +
    • Call 911 or local emergency services for immediate medical help
    • +
    • Contact your child's pediatrician for urgent health concerns
    • +
    • Use our Platform for routine healthcare management only
    • +
    +
    +
    + +
    +

    + + 5. Contact Information +

    +
    +
    +
    +

    Email

    +

    legal@infantcarecompass.live

    +
    +
    +

    Phone

    +

    +91 919956****

    +
    +
    +

    Address

    +

    InfantCare Compass Legal Department

    +
    +
    +
    +
    + +
    +
    +
    +
    + + ); +}; + +export default TermsOfService; \ No newline at end of file diff --git a/client/src/routes/routes.jsx b/client/src/routes/routes.jsx index cbc42e9..e3c29a7 100644 --- a/client/src/routes/routes.jsx +++ b/client/src/routes/routes.jsx @@ -14,12 +14,13 @@ import Registration from "../pages/Registration"; import NotFoundPage from "../pages/NotFoundPage"; import CareCoPilot from "../pages/CareCoPilot"; import VaccineReminder from "../pages/VaccineReminder"; - import PersonalisedLearningHub from "../pages/LearningHub"; import DoctorDetails from "../pages/DoctorDetails"; import LearningHub from "../pages/LearningHub"; import ConsultationPage from "../pages/consult"; - +import PrivacyPolicy from "../pages/PrivacyPolicy"; +import TermsOfService from "../pages/TermsOfService"; +import CookiePolicy from "../pages/CookiePolicy"; const router = createBrowserRouter([ { @@ -68,20 +69,10 @@ const router = createBrowserRouter([ path: "vaccineReminder", element: , }, - { -{ - path: "care-co-pilot", - element: , -}, -{ - path: "*", - element: , - handle: { noLayout: true }, -} - + path: "care-co-pilot", + element: , }, - { path: "babyfeeder", element: , @@ -90,16 +81,24 @@ const router = createBrowserRouter([ path: "sleeper", element: , }, + // Policy pages (from your footer policy links functionality) { - path: "care-co-pilot", - element: , + path: "privacy-policy", + element: , + }, + { + path: "terms-of-service", + element: , + }, + { + path: "cookie-policy", + element: , }, { path: "*", element: , handle: { noLayout: true }, }, - ], }, { @@ -116,4 +115,4 @@ const router = createBrowserRouter([ }, ]); -export default router; +export default router; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 28de24d..425d3a0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "InfantCareCompass-GSSoc", + "name": "InfantCareCompass", "lockfileVersion": 3, "requires": true, "packages": {}