Legal AI-Powered Personal Data Protection Guide

Personal Data Protection Guide

Assess your data handling practices and get AI-powered recommendations.

1Data Collection

3Data Storage & Security

4User Rights

Based on your answers, here are key risk areas and recommendations:

`; let findings = []; // 1. Data Collection document.querySelectorAll('#q-collection input:checked').forEach(input => { findings.push(recommendations[input.value]); }); // 2. Consent const consent = document.querySelector('input[name="consent"]:checked'); if (consent && consent.value === 'no' && (document.querySelector('input[value="health"]:checked') || document.querySelector('input[value="biometric"]:checked'))) { findings.push(recommendations['consent_no']); } const sharing = document.querySelector('input[name="sharing"]:checked'); if (sharing && sharing.value === 'yes') { findings.push(recommendations['sharing_yes']); } // 3. Security const encryption = document.querySelector('input[value="encryption"]:checked'); const accessControl = document.querySelector('input[value="access_control"]:checked'); if (!encryption) findings.push(recommendations['no_encryption']); if (!accessControl) findings.push(recommendations['no_access_control']); // 4. User Rights const userRights = document.querySelector('input[name="user-rights"]:checked'); if (userRights && userRights.value === 'no') { findings.push(recommendations['user_rights_no']); } // Build HTML if (findings.length > 0) { findings.forEach(finding => { reportHTML += `

${finding.risk.charAt(0).toUpperCase() + finding.risk.slice(1)} Risk

${finding.text}

`; }); } else { reportHTML += `

Low Risk

Your practices appear to follow general data protection principles. Continue to monitor regulations and maintain your high standards.

`; } guideContent.innerHTML = reportHTML; resultsContainer.classList.remove('hidden'); resultsContainer.scrollIntoView({ behavior: 'smooth' }); }; generateBtn.addEventListener('click', generateGuide); downloadPdfBtn.addEventListener('click', () => { const { jsPDF } = window.jspdf; const pdfContent = document.getElementById('pdf-content'); const pdfHeader = document.getElementById('pdf-header'); if (!pdfContent || !pdfHeader) return; document.getElementById('pdf-generation-date').textContent = new Date().toLocaleDateString('en-US'); pdfHeader.classList.remove('hidden'); html2canvas(pdfContent, { scale: 2, useCORS: true }).then(canvas => { const imgData = canvas.toDataURL('image/png'); const pdf = new jsPDF({ orientation: 'portrait', unit: 'pt', format: 'a4' }); const pdfWidth = pdf.internal.pageSize.getWidth(); const pdfHeight = pdf.internal.pageSize.getHeight(); const margin = 40; const contentWidth = pdfWidth - (margin * 2); const imgProps = pdf.getImageProperties(imgData); const contentHeight = (imgProps.height * contentWidth) / imgProps.width; let heightLeft = contentHeight; let position = margin; pdf.addImage(imgData, 'PNG', margin, position, contentWidth, contentHeight); heightLeft -= (pdfHeight - (margin * 2)); while (heightLeft > 0) { position = heightLeft - contentHeight + margin; pdf.addPage(); pdf.addImage(imgData, 'PNG', margin, position, contentWidth, contentHeight); heightLeft -= (pdfHeight - (margin * 2)); } pdf.save('Personal_Data_Protection_Guide.pdf'); pdfHeader.classList.add('hidden'); }).catch(err => { console.error("Error generating PDF:", err); pdfHeader.classList.add('hidden'); }); }); });
Scroll to Top