malipo / verification.html
Meech888's picture
create a database schema that captures every attribute in this system - Follow Up Deployment
02e7676 verified
Raw History Blame Contribute Delete
17.7 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Identity Verification | MALiPo</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<style>
.verification-gradient {
background: linear-gradient(135deg, #6e00ff 0%, #00d1ff 100%);
}
.verification-card {
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.step-indicator {
width: 40px;
height: 40px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
margin-right: 12px;
}
.step-active {
background: linear-gradient(135deg, #6e00ff 0%, #00d1ff 100%);
color: white;
}
.step-inactive {
background-color: #e5e7eb;
color: #6b7280;
}
.step-completed {
background-color: #10b981;
color: white;
}
.upload-area {
border: 2px dashed #d1d5db;
border-radius: 8px;
padding: 40px;
text-align: center;
transition: all 0.3s ease;
}
.upload-area:hover {
border-color: #6e00ff;
background-color: #f9fafb;
}
.camera-container {
width: 100%;
max-width: 400px;
height: 300px;
background-color: #f3f4f6;
border-radius: 8px;
overflow: hidden;
margin: 0 auto;
}
#video {
width: 100%;
height: 100%;
object-fit: cover;
}
#canvas {
display: none;
}
</style>
</head>
<body class="font-sans antialiased text-gray-900">
<!-- Navigation -->
<nav class="bg-white shadow-sm fixed w-full z-50">
<div class="max-w-7xl mx-auto px-4 sm极速:px-6 lg:px-8">
<div class="flex justify-between h-16">
<div class="flex items-center">
<div class="flex-shrink-0 flex items-center">
<i data-feather="zap" class="h-8 w-8 text-indigo-600"></i>
<span class="ml-2 text-xl font-bold text-gray-900">MALiPo</span>
</div>
</div>
<div class="flex items-center">
<a href="index.html" class="text-gray-500 hover:text-indigo-600 px-4 py-2 text-sm font-medium">Back to Home</a>
</div>
</div>
</div>
</nav>
<!-- Main Content -->
<div class="min-h-screen pt-20 pb-12 verification-gradient">
<div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8">
<!-- Progress Steps -->
<div class="bg-white rounded-lg p-6 mb-8 verification-card">
<h2 class="text-2xl font-bold text-gray-900 mb-6">Complete Your Verification</h2>
<div class="space-y-6">
<!-- Step 1: Email Verification -->
<div class="flex items-center">
<div class="step-indicator step-completed">
<i data-feather="check" class="h-5 w-5"></i>
</div>
<div class="flex-1">
<h3 class="font-semibold text-gray-900">Email Verification</h3>
<p class="text-sm text-gray-600">Verification email sent to your address</p>
</div>
<span class="px-3 py-1 text-xs font-semibold text-green-800 bg-green-100 rounded-full">Completed</span>
</div>
<!-- Step 2: ID Upload -->
<div class="flex items-center">
<div class="step-indicator step-active">2</div>
<div class="flex-1">
<h3 class="font-semibold text-gray-900">ID Document Upload</h3>
<p class="text-sm text-gray-600">Upload government-issued ID</p>
</div>
<span class="px-3 py-1 text-xs font-semibold text-blue-800 bg-blue-100 rounded-full">In Progress</span>
</div>
<!-- Step 3: Facial Recognition -->
<div class="flex items-center">
<div class="step-indicator step-inactive">3</div>
<div class="flex-1">
<h3 class="font-semibold text-gray-900">Facial Recognition</h3>
<p class="text-sm text-gray-600">Verify your identity with facial recognition</p>
</div>
<span class="px-3 py-1 text-xs font-semibold text-gray-800 bg-gray-100 rounded-full">Pending</span>
</div>
</div>
</div>
<!-- ID Upload Section -->
<div class="bg-white rounded-lg p-6 verification-card">
<h3 class="text-xl font-semibold text-gray-900 mb-4">Upload Your ID Document</h3>
<p class="text-gray-600 mb-6">Please upload a clear photo of one of the following documents:</p>
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-6">
<div class="text-center p-4 border border-gray-200 rounded-lg hover:border-indigo-300 transition-colors">
<i data-feather="credit-card" class="h-8 w-8 text-indigo-600 mx-auto mb-2"></i>
<p class="text-sm font-medium">Passport</p>
</div>
<div class="text-center p-4 border border-gray-200 rounded-lg hover:border-indigo-300 transition-colors">
<div class="w-16 h-10 mx-auto mb-2 bg-indigo-100 rounded-md flex items-center justify-center relative">
<div class="w-12 h-8 bg-white border border-gray-300 rounded-sm flex flex-col items-center justify-center">
<div class="w-8 h-1 bg-gray-400 mb-1"></div>
<div class="w-6 h-1 bg-gray-400 mb-1"></div>
<div class="w-10 h-4 bg-indigo-200 rounded-sm flex items-center justify-center">
<div class="w-8 h-3 bg-white border border-gray-300"></div>
</div>
</div>
</div>
<p class="text-sm font-medium">Driver's License</p>
</div>
<div class="text-center p-4 border border-gray-200 rounded-lg hover:border-indigo-300 transition-colors">
<i data-feather="file-text" class="h-8极速-8 text-indigo-600 mx-auto mb-2"></i>
<p class="text-sm font-medium">National ID</p>
</div>
</div>
<!-- Upload Area -->
<div class="upload-area mb-6" id="uploadArea">
<i data-feather="upload-cloud" class="h-12 w-12 text-gray-400 mx-auto mb-4"></i>
<p class="text-lg font-medium text-gray-900 mb-2">Drag & drop your file here</p>
<p class="text-sm text-gray-600 mb-4">or click to browse</p>
<input type="file" id="idUpload" accept="image/*,.pdf" class="hidden">
<button type="button" onclick="document.getElementById('idUpload').click()" class="px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700">
Choose File
</button>
</div>
<!-- Upload Requirements -->
<div class="bg-yellow-50 border border-yellow-200 rounded-lg p-4">
<h4 class="font-medium text-yellow-800 mb-2">Important Requirements:</h4>
<ul class="text-sm text-yellow-700 space-y-1">
<li>• Document must be valid and not expired</li>
<li>• All four corners must be visible</li>
<li>• Photo must be clear and readable</li>
<li>• File size must be less than 10MB</li>
<li>• Accepted formats: JPG, PNG, PDF</li>
</ul>
</div>
<!-- Preview and Submit -->
<div class="mt-6 flex justify-end space-x-4">
<button type="button" id="skipVerification" class="px-6 py-2 border border-gray-300 text-gray-700 rounded-md hover:bg-gray-50">
Skip for Now
</button>
<button type="button" id="submitId" disabled class="px极速-6 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 disabled:opacity-50 disabled:cursor-not-allowed">
Continue to Facial Recognition
</button>
</div>
</div>
<!-- Facial Recognition Section (Hidden initially) -->
<div class="bg-white rounded-lg p-6 verification-card hidden" id="facialRecognitionSection">
<h3 class="text-xl font-semibold text-gray-900 mb-4">Facial Recognition Verification</h3>
<p class="text-gray-600 mb-6">Please allow camera access to verify your identity.</p>
<div class="camera-container mb-6">
<video id="video" autoplay playsinline></video>
<canvas id="canvas"></canvas>
</div>
<div class="text-center mb-6">
<button type="button" id="startCamera" class="px-6 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700">
Start Camera
</button>
<button type="button" id="capturePhoto" class="px-6 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 hidden">
Capture Photo
</button>
<button type="button" id="retakePhoto" class="px-6 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 hidden">
Retake
</button>
</div>
<div class="bg-blue-50 border border-blue-200 rounded-lg p-4 mb-6">
<h4 class="font-medium text-blue-800 mb-2">Tips for best results:</h4>
<ul class="text-sm text-blue-700 space-y-1">
<li>• Ensure good lighting on your face</li>
<li>• Remove sunglasses or hats</li>
<li>• Look directly at the camera</li>
<li>• Keep a neutral expression</li>
</ul>
</div>
<div class="flex justify-end">
<button type="button" id="completeVerification" class="px-6 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 hidden">
Complete Verification
</button>
</div>
</div>
</div>
</div>
<!-- Footer -->
<footer class="bg-gray-50">
<div class="max-w-7xl mx-auto py-8 px-4 sm:px-6 lg:px-8">
<div class="text-center">
<p class="text-sm text-gray-600">
&copy; 2023 MALiPo. All rights reserved.
<a href="#" class="text-indigo-600 hover:text-indigo-500">Privacy Policy</a> •
<a href="#" class="text-indigo-600 hover:text-indigo-500">Terms of Service</a>
</p>
</div>
</div>
</footer>
<script>
feather.replace();
// File upload handling
const uploadArea = document.getElementById('uploadArea');
const idUpload = document.getElementById('idUpload');
const submitId = document.getElementById('submitId');
const facialRecognitionSection = document.getElementById('facialRecognitionSection');
idUpload.addEventListener('change', function(e) {
const file = e.target.files[0];
if (file) {
// Validate file size
if (file.size > 10 * 1024 * 1024) {
alert('File size must be less than 10MB');
return;
}
// Validate file type
const validTypes = ['image/jpeg', 'image/png', 'application/pdf'];
if (!validTypes.includes(file.type)) {
alert('Please upload a JPG, PNG, or PDF file');
return;
}
// Update UI
uploadArea.innerHTML = `
<i data-feather="check-circle" class="h-12 w-12 text-green-600 mx-auto mb-4"></i>
<p class="text-lg font-medium text-gray-900 mb-2">File Uploaded Successfully</p>
<p class="text-sm text-gray-600">${file.name}</p>
`;
feather.replace();
submitId.disabled = false;
}
});
submitId.addEventListener('click', function() {
facialRecognitionSection.classList.remove('hidden');
this.closest('.verification-card').scrollIntoView({ behavior: 'smooth' });
});
// Camera functionality
const video = document.getElementById('video');
const canvas = document.getElementById('canvas');
const startCamera = document.getElementById('startCamera');
const capturePhoto = document.getElementById('capturePhoto');
const retakePhoto = document.getElementById('retakePhoto');
const completeVerification = document.getElementById('completeVerification');
let stream = null;
startCamera.addEventListener('click', async function() {
try {
stream = await navigator.mediaDevices.getUserMedia({
video: {
facingMode: 'user',
width: { ideal: 1280 },
height: { ideal: 720 }
}
});
video.srcObject = stream;
startCamera.classList.add('hidden');
capturePhoto.classList.remove('hidden');
} catch (error) {
alert('Error accessing camera: ' + error.message);
}
});
capturePhoto.addEventListener('click', function() {
const context = canvas.getContext('2d');
canvas.width = video.videoWidth;
canvas.height = video.videoHeight;
context.drawImage(video, 0, 0, canvas.width, canvas.height);
// Stop camera stream
if (stream) {
stream.getTracks().forEach(track => track.stop());
}
capturePhoto.classList.add('hidden');
retakePhoto.classList.remove('hidden');
completeVerification.classList.remove('hidden');
});
retakePhoto.addEventListener('click', function() {
// Clear canvas
const context = canvas.getContext('2d');
context.clearRect(0, 0, canvas.width, canvas.height);
// Restart camera
startCamera.click();
retakePhoto.classList.add('hidden');
completeVerification.classList.add('hidden');
});
completeVerification.addEventListener('click', function() {
alert('Verification process completed! Your account is now being reviewed.');
// In a real application, this would submit the data to the server
window.location.href = 'index.html'; // Redirect to home after completion
});
// Skip verification handling
document.getElementById('skipVerification').addEventListener('click', function() {
if (confirm('If you skip verification now, your account will be restricted from major platform features including transactions. You can complete verification later from your account settings. Continue?')) {
alert('Account verification skipped. Your account has been created with restricted access. Please complete verification to unlock full functionality.');
window.location.href = 'index.html'; // Redirect to home
}
});
// Drag and drop functionality
uploadArea.addEventListener('dragover', function(e) {
e.preventDefault();
uploadArea.style.borderColor = '#6e00ff';
uploadArea.style.backgroundColor = '#f9fafb';
});
uploadArea.addEventListener('dragleave', function(e) {
e.preventDefault();
uploadArea.style.borderColor = '#d1d5db';
uploadArea.style.backgroundColor = 'transparent';
});
uploadArea.addEventListener('drop', function(e) {
e.preventDefault();
uploadArea.style.borderColor = '#d1d5db';
uploadArea.style.backgroundColor = 'transparent';
const files = e.dataTransfer.files;
if (files.length > 0) {
idUpload.files = files;
idUpload.dispatchEvent(new Event('change'));
}
});
</script>
</body>
</html>