Free AI Car Diagnosis Dubai | FixHive Garage 💬 Free Diagnostic Check — WhatsApp us your car problem now Chat Now →
About
Services
Brands
Packages
More
✦ Powered by AI

What's wrong with your car?

Answer 4 quick questions. Our AI analyses your symptoms and pinpoints the most likely issues — free, in under 60 seconds.

Free — no cost ever No signup required Results in 60 seconds Dubai-specific analysis
Step 1 of 4

Let's start — what's your name?

We'll personalise your diagnosis report and use it on the WhatsApp booking message.

: window.FIXHIVE_WORKER_URL = 'https://fixhive-diagnosis.YOUR-SUBDOMAIN.workers.dev'; */ const WORKER_URL = (typeof window.FIXHIVE_WORKER_URL !== 'undefined' && window.FIXHIVE_WORKER_URL) ? window.FIXHIVE_WORKER_URL : 'https://fixhive-diagnosis.fixhive.workers.dev'; /* replace with your actual worker URL */ /* ── CONSTANTS ── */ const SYMPTOMS = [ { icon: '🚫', label: 'Engine won\'t start' }, { icon: '💡', label: 'Check engine light on' }, { icon: '🌡️', label: 'Overheating / temp warning' }, { icon: '🔊', label: 'Strange engine noise (knock/tick)' }, { icon: '📳', label: 'Rough idle / engine shaking' }, { icon: '🐌', label: 'Poor acceleration / loss of power' }, { icon: '⛽', label: 'High fuel consumption' }, { icon: '❄️', label: 'AC not cooling' }, { icon: '💨', label: 'AC making noise or smell' }, { icon: '🛑', label: 'Brake squealing or grinding' }, { icon: '🦶', label: 'Soft / spongy brake pedal' }, { icon: '↔️', label: 'Car pulling to one side' }, { icon: '📳', label: 'Vibration / shaking while driving' }, { icon: '💥', label: 'Suspension noise / rough ride' }, { icon: '⚙️', label: 'Transmission slipping or jerking' }, { icon: '🔄', label: 'Gear shifting issues' }, { icon: '🔋', label: 'Battery or electrical issue' }, { icon: '💧', label: 'Oil or fluid leak' }, { icon: '💨', label: 'Smoke from engine or exhaust' }, { icon: '🔵', label: 'Tyre pressure warning light' }, ]; const BRANDS = [ 'Alfa Romeo','Aston Martin','Audi','Bentley','BMW','BYD','Cadillac','Changan', 'Chery','Chevrolet','Chrysler','Daihatsu','Dodge','Ferrari','Fiat','Ford', 'GAC','Geely','Genesis','GMC','Haval','Honda','HongQi','Hyundai','Infiniti', 'Isuzu','Jaguar','Jeep','Jetour','Kia','Lamborghini','Land Rover','Lexus', 'Lincoln','Maserati','Maybach','Mazda','Mercedes-Benz','MG','MINI','Mitsubishi', 'Nissan','Peugeot','Porsche','RAM','Range Rover','Renault','Rolls-Royce', 'Subaru','Suzuki','Tesla','Toyota','Volkswagen','Volvo','Other' ]; /* ── STATE ── */ const state = { name: '', year: '', brand: '', model: '', symptoms: [], mileage: '', urgency: '' }; /* ── INIT ── */ (function init() { /* Year dropdown */ const sel = document.getElementById('inputYear'); for (let y = new Date().getFullYear(); y >= 1995; y--) { const o = document.createElement('option'); o.value = y; o.textContent = y; sel.appendChild(o); } /* Brand dropdown */ const bSel = document.getElementById('inputBrand'); const blank = document.createElement('option'); blank.value = ''; blank.textContent = 'Select brand'; blank.disabled = true; blank.selected = true; bSel.appendChild(blank); BRANDS.forEach(b => { const o = document.createElement('option'); o.value = b; o.textContent = b; bSel.appendChild(o); }); /* Symptom chips */ const grid = document.getElementById('symptomGrid'); SYMPTOMS.forEach((s, i) => { const chip = document.createElement('div'); chip.className = 'symptom-chip'; chip.dataset.index = i; chip.dataset.label = s.label; chip.innerHTML = `${s.icon}${s.label}`; chip.addEventListener('click', () => toggleSymptom(chip, s.label)); grid.appendChild(chip); }); /* Input listeners for step validation */ document.getElementById('inputName').addEventListener('input', validateStep1); document.getElementById('inputBrand').addEventListener('change', validateStep2); document.getElementById('inputModel').addEventListener('input', validateStep2); document.getElementById('inputMileage').addEventListener('input', validateStep4); })(); /* ── VALIDATION ── */ function validateStep1() { document.getElementById('btn1').disabled = !document.getElementById('inputName').value.trim(); } function validateStep2() { const ok = document.getElementById('inputBrand').value && document.getElementById('inputModel').value.trim(); document.getElementById('btn2').disabled = !ok; } function validateStep4() { const hasUrgency = !!state.urgency; document.getElementById('btn4').disabled = !hasUrgency; } /* ── STEP NAVIGATION ── */ function goStep(n) { /* Save state on exit */ state.name = document.getElementById('inputName').value.trim(); state.year = document.getElementById('inputYear').value; state.brand = document.getElementById('inputBrand').value; state.model = document.getElementById('inputModel').value.trim(); state.mileage = document.getElementById('inputMileage').value; [1,2,3,4].forEach(i => document.getElementById('step'+i).classList.add('hidden')); document.getElementById('step'+n).classList.remove('hidden'); const pct = { 1:25, 2:50, 3:75, 4:100 }[n]; document.getElementById('progressFill').style.width = pct + '%'; document.getElementById('diagCard').scrollIntoView({ behavior: 'smooth', block: 'start' }); /* Re-validate */ if (n === 1) validateStep1(); if (n === 2) validateStep2(); if (n === 4) validateStep4(); } /* ── SYMPTOMS ── */ function toggleSymptom(chip, label) { chip.classList.toggle('selected'); if (chip.classList.contains('selected')) { state.symptoms.push(label); } else { state.symptoms = state.symptoms.filter(s => s !== label); } document.getElementById('btn3').disabled = state.symptoms.length === 0; } /* ── SYMPTOM SEARCH + CUSTOM ADD ── */ (function initSymptomSearch() { const searchInput = document.getElementById('symptomSearch'); const addBtn = document.getElementById('symptomAddBtn'); const grid = document.getElementById('symptomGrid'); searchInput.addEventListener('input', function() { const q = this.value.trim().toLowerCase(); const chips = grid.querySelectorAll('.symptom-chip'); let anyVisible = false; chips.forEach(chip => { const text = chip.dataset.label.toLowerCase(); const show = !q || text.includes(q); chip.classList.toggle('hidden', !show); if (show) anyVisible = true; }); /* Show "+ Add" button when query doesn't match any existing chip */ const exactMatch = [...chips].some(c => c.dataset.label.toLowerCase() === q); addBtn.classList.toggle('hidden', !q || exactMatch); }); addBtn.addEventListener('click', function() { const label = searchInput.value.trim(); if (!label) return; /* Don't add duplicates */ const existing = [...grid.querySelectorAll('.symptom-chip')].find( c => c.dataset.label.toLowerCase() === label.toLowerCase() ); if (existing) { if (!existing.classList.contains('selected')) toggleSymptom(existing, existing.dataset.label); existing.classList.remove('hidden'); existing.scrollIntoView({ behavior: 'smooth', block: 'nearest' }); } else { const chip = document.createElement('div'); chip.className = 'symptom-chip selected'; chip.dataset.label = label; chip.innerHTML = `⚠️${label}`; chip.addEventListener('click', () => toggleSymptom(chip, label)); grid.appendChild(chip); state.symptoms.push(label); document.getElementById('btn3').disabled = false; } searchInput.value = ''; addBtn.classList.add('hidden'); /* Re-show all chips */ grid.querySelectorAll('.symptom-chip').forEach(c => c.classList.remove('hidden')); }); })(); /* ── URGENCY ── */ function selectUrgency(level) { ['low','medium','high'].forEach(l => { const el = document.getElementById('urg' + l.charAt(0).toUpperCase() + l.slice(1)); el.className = 'urgency-opt'; if (l === level) el.classList.add('sel-' + level); }); state.urgency = level; validateStep4(); } /* ── AI DIAGNOSIS ── */ async function runDiagnosis() { state.mileage = document.getElementById('inputMileage').value; /* Show loading screen */ ['step1','step2','step3','step4','stepResults','stepError'].forEach(id => document.getElementById(id).classList.add('hidden') ); document.getElementById('stepLoading').classList.remove('hidden'); document.getElementById('progressFill').style.width = '100%'; document.getElementById('diagCard').scrollIntoView({ behavior: 'smooth', block: 'start' }); /* Build the structured payload — worker handles the prompt + Anthropic call */ const payload = { name: state.name, brand: state.brand, model: state.model, year: state.year, mileage: state.mileage || 'unknown', symptoms: state.symptoms, urgency: state.urgency, when: '', /* reserved for future "when did it start" step */ extra: '' /* reserved for future free-text notes step */ }; try { const res = await fetch(WORKER_URL, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(payload) }); if (!res.ok) { const errText = await res.text(); throw new Error('Server error ' + res.status + ': ' + errText); } const data = await res.json(); /* Worker returns { issues: [...] } */ const issues = data.issues; if (!Array.isArray(issues) || issues.length === 0) { throw new Error('No issues returned — the AI response may have been empty.'); } showResults(issues); } catch (err) { console.error('Diagnosis error:', err); document.getElementById('stepLoading').classList.add('hidden'); document.getElementById('stepError').classList.remove('hidden'); document.getElementById('errorMsg').textContent = 'We couldn\'t complete the diagnosis (' + err.message + '). ' + 'Please try again or WhatsApp us for a free assessment.'; } } /* ── RENDER RESULTS ── */ function showResults(issues) { document.getElementById('stepLoading').classList.add('hidden'); document.getElementById('resultsTitle').textContent = state.name + '\'s Diagnosis — ' + state.year + ' ' + state.brand + ' ' + state.model; document.getElementById('resultsSubtitle').textContent = issues.length + ' likely issue' + (issues.length > 1 ? 's' : '') + ' identified based on your reported symptoms. Tap any issue to expand.'; const list = document.getElementById('issueList'); list.innerHTML = ''; issues.forEach(issue => { const urg = (issue.urgency || 'low').toLowerCase(); const prob = Math.min(100, Math.max(0, parseInt(issue.prob) || 50)); const badgeClass = { high: 'badge-high', medium: 'badge-medium', low: 'badge-low' }[urg] || 'badge-low'; const badgeLabel = { high: '⚠ Urgent', medium: 'Monitor', low: 'Non-urgent' }[urg]; const tags = Array.isArray(issue.tags) ? issue.tags : []; const card = document.createElement('div'); card.className = 'issue-card urg-' + urg; card.innerHTML = `
${escHtml(issue.title || 'Unknown Issue')}
${badgeLabel}
Likelihood
${prob}%

${escHtml(issue.desc || '')}

${tags.length ? '
' + tags.map(t => `${escHtml(t)}`).join('') + '
' : ''} `; list.appendChild(card); }); /* Animate probability bars after render */ requestAnimationFrame(() => { requestAnimationFrame(() => { document.querySelectorAll('.prob-bar[data-prob]').forEach(el => { el.style.width = el.dataset.prob + '%'; }); }); }); /* Build WhatsApp pre-fill */ const wa = buildWaMessage(issues); document.getElementById('waBookBtn').href = 'https://wa.me/971541699500?text=' + encodeURIComponent(wa); document.getElementById('stepResults').classList.remove('hidden'); document.getElementById('diagCard').scrollIntoView({ behavior: 'smooth', block: 'start' }); } function buildWaMessage(issues) { const topIssues = issues.slice(0, 3).map(i => '• ' + i.title).join('\n'); return `Hi FixHive! I just used the AI Diagnosis tool on your website and got these results. My car: ${state.year} ${state.brand} ${state.model} (~${state.mileage ? state.mileage + ' km' : 'mileage unknown'}) Symptoms: ${state.symptoms.join(', ')} Urgency: ${state.urgency} My name: ${state.name} Top AI-identified issues: ${topIssues} Can you help me book a full diagnostic and get a quote?`; } function escHtml(str) { return String(str).replace(/&/g,'&').replace(//g,'>').replace(/"/g,'"'); } /* ── RESTART ── */ function restartTool() { state.name = ''; state.year = ''; state.brand = ''; state.model = ''; state.symptoms = []; state.mileage = ''; state.urgency = ''; document.getElementById('inputName').value = ''; document.getElementById('inputModel').value = ''; document.getElementById('inputMileage').value = ''; document.getElementById('inputBrand').selectedIndex = 0; document.querySelectorAll('.symptom-chip').forEach(c => c.classList.remove('selected')); ['low','medium','high'].forEach(l => { document.getElementById('urg'+l.charAt(0).toUpperCase()+l.slice(1)).className = 'urgency-opt'; }); ['stepResults','stepError','stepLoading','step2','step3','step4'].forEach(id => document.getElementById(id).classList.add('hidden') ); document.getElementById('btn4').disabled = true; document.getElementById('btn3').disabled = true; document.getElementById('btn1').disabled = true; goStep(1); } /* Initial validation state */ document.getElementById('btn1').disabled = true; document.getElementById('btn2').disabled = true;