<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    
    <!-- Google Tag Manager -->
    <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
    'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
    })(window,document,'script','dataLayer','GTM-NJS3LCGQ');</script>
    <!-- End Google Tag Manager -->
    
    <title>Educafric - African Educational Technology Platform</title>
    <meta name="description" content="Africa's leading educational technology platform, empowering schools, teachers, parents, and students across the continent with comprehensive digital learning solutions." />
    
    <!-- SEO Meta Tags -->
    <meta name="keywords" content="African education, educational technology, school management, digital learning, online education Africa, EdTech Africa, student management system, teacher portal, parent engagement, educational platform, e-learning Africa, school administration, academic management, educational software" />
    <meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1" />
    <meta name="author" content="Educafric" />
    <link rel="canonical" href="https://educafric.com/" />
    
    <!-- Multilingual SEO - Hreflang Tags -->
    <link rel="alternate" hreflang="x-default" href="https://educafric.com/" />
    
    <!-- Open Graph Meta Tags for Social Media -->
    <meta property="og:type" content="website" />
    <meta property="og:title" content="Educafric - African Educational Technology Platform" />
    <meta property="og:description" content="Transform African education with Educafric's comprehensive digital platform. Streamline school management, enhance learning experiences, and connect teachers, students, and parents across Africa." />
    <meta property="og:image" content="https://educafric.com/images/educafric-social-share.png" />
    <meta property="og:image:alt" content="Educafric - African Educational Technology Platform Logo" />
    <meta property="og:image:width" content="1200" />
    <meta property="og:image:height" content="630" />
    <meta property="og:url" content="https://educafric.com/" />
    <meta property="og:site_name" content="Educafric" />
    <meta property="og:locale" content="en_US" />
    <meta property="og:locale:alternate" content="fr_FR" />
    
    <!-- Twitter Card Meta Tags -->
    <meta name="twitter:card" content="summary_large_image" />
    <meta name="twitter:title" content="Educafric - African Educational Technology Platform" />
    <meta name="twitter:description" content="Transform African education with Educafric's comprehensive digital platform. Streamline school management, enhance learning experiences, and connect teachers, students, and parents across Africa." />
    <meta name="twitter:image" content="https://educafric.com/images/educafric-social-share.png" />
    <meta name="twitter:image:alt" content="Educafric - African Educational Technology Platform Logo" />
    <meta name="twitter:site" content="@educafric" />
    <meta name="twitter:creator" content="@educafric" />
    
    <!-- Standard favicon -->
    <link rel="icon" href="/favicon.ico" />
    <link rel="icon" type="image/png" sizes="32x32" href="/educafric-logo-128.png" />
    <link rel="icon" type="image/png" sizes="16x16" href="/educafric-logo-128.png" />
    
    <!-- Apple Touch Icons -->
    <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
    <link rel="apple-touch-icon" sizes="180x180" href="/educafric-logo-512.png" />
    <link rel="apple-touch-icon" sizes="152x152" href="/educafric-logo-512.png" />
    <link rel="apple-touch-icon" sizes="144x144" href="/educafric-logo-512.png" />
    <link rel="apple-touch-icon" sizes="120x120" href="/educafric-logo-128.png" />
    <link rel="apple-touch-icon" sizes="114x114" href="/educafric-logo-128.png" />
    <link rel="apple-touch-icon" sizes="76x76" href="/educafric-logo-128.png" />
    <link rel="apple-touch-icon" sizes="72x72" href="/educafric-logo-128.png" />
    <link rel="apple-touch-icon" sizes="60x60" href="/educafric-logo-128.png" />
    <link rel="apple-touch-icon" sizes="57x57" href="/educafric-logo-128.png" />
    
    <!-- PWA Manifest -->
    <link rel="manifest" href="/manifest.json" />
    
    <!-- PWA Theme Color -->
    <meta name="theme-color" content="#0079F2" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="default" />
    <meta name="apple-mobile-web-app-title" content="Educafric" />
    
    <!-- Android Chrome -->
    <meta name="mobile-web-app-capable" content="yes" />
    <meta name="application-name" content="Educafric" />
    <link rel="icon" type="image/png" sizes="192x192" href="/educafric-logo-128.png" />
    <link rel="icon" type="image/png" sizes="512x512" href="/educafric-logo-512.png" />
    
    <!-- Android Homescreen -->
    <link rel="shortcut icon" href="/educafric-logo-512.png" />
    <link rel="bookmark" href="/educafric-logo-512.png" />
    
    <!-- Microsoft Tiles -->
    <meta name="msapplication-TileColor" content="#0079F2" />
    <meta name="msapplication-TileImage" content="/educafric-logo-512.png" />


    <!-- JSON-LD Structured Data for SEO -->
    <script type="application/ld+json">
    [
      {
        "@context": "https://schema.org",
        "@type": "Organization",
        "name": "Educafric",
        "alternateName": "EduConnect Africa",
        "description": "Africa's leading educational technology platform, empowering schools, teachers, parents, and students across the continent with comprehensive digital learning solutions.",
        "url": "https://educafric.com",
        "logo": "https://educafric.com/educafric-logo-512.png",
        "image": "https://educafric.com/educafric-logo-512.png",
        "sameAs": [
          "https://www.facebook.com/educafrique/",
          "https://twitter.com/educafric",
          "https://www.linkedin.com/company/108875436"
        ],
        "contactPoint": {
          "@type": "ContactPoint",
          "contactType": "Customer Service",
          "areaServed": "Africa",
          "availableLanguage": ["English", "French"]
        },
        "areaServed": {
          "@type": "Place",
          "name": "Africa"
        },
        "founder": {
          "@type": "Person",
          "name": "Simon Muehling"
        },
        "foundingDate": "2024",
        "slogan": "Transforming African Education Through Technology"
      },
      {
        "@context": "https://schema.org",
        "@type": "WebSite",
        "name": "Educafric",
        "alternateName": "EduConnect Africa",
        "url": "https://educafric.com",
        "description": "Africa's leading educational technology platform for schools, teachers, parents, and students.",
        "inLanguage": ["en", "fr"],
        "copyrightYear": "2024",
        "copyrightHolder": {
          "@type": "Organization",
          "name": "Educafric"
        },
        "potentialAction": {
          "@type": "SearchAction",
          "target": {
            "@type": "EntryPoint",
            "urlTemplate": "https://educafric.com/search?q={search_term_string}"
          },
          "query-input": "required name=search_term_string"
        }
      },
      {
        "@context": "https://schema.org",
        "@type": "WebApplication",
        "name": "Educafric Platform",
        "description": "Comprehensive school management and digital learning platform for African educational institutions.",
        "url": "https://educafric.com",
        "applicationCategory": "EducationalApplication",
        "operatingSystem": ["Web", "iOS", "Android"],
        "offers": {
          "@type": "Offer",
          "category": "Educational Software",
          "description": "Digital platform for school management, student tracking, and educational content delivery",
          "areaServed": "Africa"
        },
        "featureList": [
          "School Management System",
          "Student Portal",
          "Teacher Dashboard",
          "Parent Engagement Tools",
          "Grade Management",
          "Attendance Tracking",
          "Report Card Generation",
          "Communication Platform"
        ],
        "audience": {
          "@type": "Audience",
          "audienceType": "Educational Institutions",
          "geographicArea": "Africa"
        }
      }
    ]
    </script>

    <!-- Service Worker Registration disabled for development -->
    <script>
      // Service Worker registration disabled to avoid errors during development
      console.log('Service Worker registration disabled for development');
    </script>
    <!-- 🔔 PWA Notifications Fix Script -->
    <script src="/pwa-notifications-fix.js"></script>
    
    <!-- 🔧 WebSocket Error Handler - Fix DOMException -->
    <script>
      // Prevent WebSocket DOMException errors from Vite HMR (development only)
      (function() {
        // Only apply in development environment
        if (location.hostname !== 'localhost' && !location.hostname.includes('replit')) {
          return;
        }
        
        const originalWebSocket = window.WebSocket;
        
        window.WebSocket = function(url, protocols) {
          try {
            // Check for invalid URLs (undefined port, etc.)
            if (typeof url === 'string' && (url.includes('undefined') || url.includes(':undefined'))) {
              console.warn('[WEBSOCKET] Blocked invalid WebSocket URL:', url);
              // Return a comprehensive mock WebSocket that doesn't connect
              return {
                readyState: 3, // CLOSED
                close: function() {},
                send: function() {},
                addEventListener: function() {},
                removeEventListener: function() {},
                onopen: null,
                onmessage: null,
                onclose: null,
                onerror: null,
                url: url,
                protocol: '',
                extensions: '',
                bufferedAmount: 0,
                binaryType: 'blob'
              };
            }
            
            const ws = new originalWebSocket(url, protocols);
            
            // Add error handling for connection failures
            ws.addEventListener('error', function(event) {
              console.warn('[WEBSOCKET] Connection error handled gracefully:', event);
            });
            
            return ws;
          } catch (error) {
            console.warn('[WEBSOCKET] WebSocket creation error handled:', error.message);
            // Return a comprehensive mock WebSocket on error
            return {
              readyState: 3, // CLOSED
              close: function() {},
              send: function() {},
              addEventListener: function() {},
              removeEventListener: function() {},
              onopen: null,
              onmessage: null,
              onclose: null,
              onerror: null,
              url: url || '',
              protocol: '',
              extensions: '',
              bufferedAmount: 0,
              binaryType: 'blob'
            };
          }
        };
        
        // Copy static properties and constants
        Object.keys(originalWebSocket).forEach(key => {
          window.WebSocket[key] = originalWebSocket[key];
        });
        
        // Ensure WebSocket constants are preserved
        window.WebSocket.CONNECTING = originalWebSocket.CONNECTING || 0;
        window.WebSocket.OPEN = originalWebSocket.OPEN || 1;
        window.WebSocket.CLOSING = originalWebSocket.CLOSING || 2;
        window.WebSocket.CLOSED = originalWebSocket.CLOSED || 3;
        
        // Preserve prototype chain
        window.WebSocket.prototype = originalWebSocket.prototype;
        
        console.log('[WEBSOCKET] ✅ Error handler installed to prevent DOMException (dev mode)');
      })();
    </script>
    <script type="module" crossorigin src="/assets/index-BNJtYsZ1.js"></script>
    <link rel="stylesheet" crossorigin href="/assets/index-CYxI0Gqu.css">
  </head>
  <body>
    <!-- Google Tag Manager (noscript) -->
    <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NJS3LCGQ"
    height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
    <!-- End Google Tag Manager (noscript) -->
    
    <div id="root"></div>
    <!-- This is a replit script which adds a banner on the top of the page when opened in development mode outside the replit environment -->
    <script type="text/javascript" src="https://replit.com/public/js/replit-dev-banner.js"></script>
  </body>
</html>