The user wants me to design a campus credentials wallet pilot. This is a system where students/teachers can store their academic credentials securely, prove their identity, and have verifiable credentials that can be shared with third parties.
Let me think about the key features needed:
- Identity Proofing - Verifying that a person is who they claim to be
- Privacy - Ensuring credentials are stored securely and only shared with consent
- Verifications - Allowing third parties to verify the authenticity of credentials
For the demo, I'll create:
- A wallet dashboard showing stored credentials
- Identity verification flow with document upload simulation
- Privacy controls for sharing credentials
- Verification QR codes and verification pages
- Visual effects to make it engaging
Technical approach:
- Single HTML file with all functionality
- Use Web Crypto API for hashing/signing simulation
- QR code generation for verification
- Animated particles and modern UI
- Tabs/sections for different features
Color scheme - I'll go with a sophisticated dark theme with teal/cyan accents for a tech/secure feel, avoiding the purple gradient.
Key interactions:
- Identity proofing flow with document scanning simulation
- Credential management with expand/collapse
- Privacy toggles and selective disclosure
- QR code verification simulation
- Animated transitions between states
Let me build this comprehensively with good visual design and multiple interactive elements.
Campus Credentials Wallet Pilot
Design Approach
I'll create a comprehensive campus credentials wallet with:
- Identity Proofing - Document verification simulation with biometric check
- Privacy Controls - Selective disclosure, zero-knowledge proof simulation
- Verifications - QR-based verification, cryptographic signatures
- Visual Design - Dark tech theme with cyan accents, particle effects, smooth animations
The system demonstrates:
- Student ID, transcript, and enrollment credentials
- Consent-based sharing with expiration
- Cryptographic verification simulation
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Campus Credentials Wallet</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--bg-primary: #0a0f1a;
--bg-secondary: #111827;
--bg-card: #1a2332;
--accent: #00d4aa;
--accent-dim: #00a888;
--text-primary: #f0f4f8;
--text-secondary: #8892a4;
--border: #2a3a50;
--success: #22c55e;
--warning: #f59e0b;
--danger: #ef4444;
--info: #3b82f6;
}
body {
font-family: 'Segoe UI', system-ui, sans-serif;
background: var(--bg-primary);
color: var(--text-primary);
min-height: 100vh;
overflow-x: hidden;
}
#particles-canvas {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: 0;
}
.app-container {
position: relative;
z-index: 1;
display: flex;
min-height: 100vh;
}
/* Sidebar */
.sidebar {
width: 280px;
background: var(--bg-secondary);
border-right: 1px solid var(--border);
padding: 24px;
display: flex;
flex-direction: column;
position: fixed;
height: 100vh;
overflow-y: auto;
}
.logo {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 40px;
}
.logo-icon {
width: 48px;
height: 48px;
background: linear-gradient(135deg, var(--accent), var(--accent-dim));
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
}
.logo-icon svg {
width: 28px;
height: 28px;
fill: var(--bg-primary);
}
.logo-text h1 {
font-size: 18px;
font-weight: 600;
}
.logo-text span {
font-size: 12px;
color: var(--text-secondary);
}
.nav-menu {
list-style: none;
flex: 1;
}
.nav-item {
margin-bottom: 8px;
}
.nav-link {
display: flex;
align-items: center;
gap: 12px;
padding: 14px 16px;
border-radius: 10px;
cursor: pointer;
transition: all 0.3s ease;
color: var(--text-secondary);
}
.nav-link:hover {
background: rgba(0, 212, 170, 0.1);
color: var(--text-primary);
}
.nav-link.active {
background: rgba(0, 212, 170, 0.15);
color: var(--accent);
border-left: 3px solid var(--accent);
}
.nav-link svg {
width: 20px;
height: 20px;
}
.user-profile {
padding: 16px;
background: var(--bg-card);
border-radius: 12px;
display: flex;
align-items: center;
gap: 12px;
}
.user-avatar {
width: 44px;
height: 44px;
background: linear-gradient(135deg, #3b82f6, #8b5cf6);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-weight: 600;
font-size: 16px;
}
.user-info h4 {
font-size: 14px;
font-weight: 500;
}
.user-info span {
font-size: 12px;
color: var(--text-secondary);
}
/* Main Content */
.main-content {
flex: 1;
margin-left: 280px;
padding: 32px;
}
.page-header {
margin-bottom: 32px;
}
.page-header h2 {
font-size: 28px;
font-weight: 600;
margin-bottom: 8px;
}
.page-header p {
color: var(--text-secondary);
}
/* Stats Grid */
.stats-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 20px;
margin-bottom: 32px;
}
.stat-card {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 16px;
padding: 24px;
position: relative;
overflow: hidden;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.stat-card:hover {
transform: translateY(-4px);
box-shadow: 0 12px 40px rgba(0, 212, 170, 0.1);
}
.stat-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 3px;
background: linear-gradient(90deg, var(--accent), transparent);
}
.stat-icon {
width: 48px;
height: 48px;
background: rgba(0, 212, 170, 0.1);
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 16px;
}
.stat-icon svg {
width: 24px;
height: 24px;
stroke: var(--accent);
}
.stat-value {
font-size: 32px;
font-weight: 700;
margin-bottom: 4px;
}
.stat-label {
color: var(--text-secondary);
font-size: 14px;
}
/* Content Sections */
.content-section {
display: none;
}
.content-section.active {
display: block;
animation: fadeIn 0.4s ease;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
/* Credentials Grid */
.credentials-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 20px;
}
.credential-card {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 16px;
padding: 24px;
position: relative;
overflow: hidden;
cursor: pointer;
transition: all 0.3s ease;
}
.credential-card:hover {
border-color: var(--accent);
box-shadow: 0 0 30px rgba(0, 212, 170, 0.1);
}
.credential-card.verified::after {
content: 'VERIFIED';
position: absolute;
top: 16px;
right: 16px;
background: rgba(34, 197, 94, 0.2);
color: var(--success);
padding: 4px 10px;
border-radius: 20px;
font-size: 10px;
font-weight: 600;
letter-spacing: 0.5px;
}
.credential-header {
display: flex;
align-items: center;
gap: 16px;
margin-bottom: 20px;
}
.credential-icon {
width: 56px;
height: 56px;
border-radius: 14px;
display: flex;
align-items: center;
justify-content: center;
}
.credential-icon svg {
width: 28px;
height: 28px;
}
.credential-title h3 {
font-size: 18px;
font-weight: 600;
margin-bottom: 4px;
}
.credential-title span {
color: var(--text-secondary);
font-size: 13px;
}
.credential-details {
display: grid;
gap: 12px;
}
.detail-row {
display: flex;
justify-content: space-between;
padding: 10px 0;
border-bottom: 1px solid var(--border);
}
.detail-row:last-child {
border-bottom: none;
}
.detail-label {
color: var(--text-secondary);
font-size: 13px;
}
.detail-value {
font-weight: 500;
font-size: 13px;
}
.credential-actions {
display: flex;
gap: 10px;
margin-top: 20px;
padding-top: 20px;
border-top: 1px solid var(--border);
}
.btn {
padding: 10px 20px;
border-radius: 8px;
font-size: 13px;
font-weight: 500;
cursor: pointer;
transition: all 0.3s ease;
border: none;
display: flex;
align-items: center;
gap: 8px;
}
.btn-primary {
background: var(--accent);
color: var(--bg-primary);
}
.btn-primary:hover {
background: var(--accent-dim);
transform: scale(1.02);
}
.btn-secondary {
background: transparent;
border: 1px solid var(--border);
color: var(--text-primary);
}
.btn-secondary:hover {
border-color: var(--accent);
color: var(--accent);
}
.btn-danger {
background: rgba(239, 68, 68, 0.1);
color: var(--danger);
border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
background: rgba(239, 68, 68, 0.2);
}
/* Identity Proofing Section */
.proofing-container {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 24px;
}
.proofing-card {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 16px;
padding: 28px;
}
.proofing-card h3 {
font-size: 18px;
margin-bottom: 20px;
display: flex;
align-items: center;
gap: 10px;
}
.step-indicator {
display: flex;
gap: 8px;
margin-bottom: 24px;
}
.step {
flex: 1;
height: 4px;
background: var(--border);
border-radius: 2px;
transition: background 0.3s ease;
}
.step.completed {
background: var(--success);
}
.step.active {
background: var(--accent);
animation: pulse 2s infinite;
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.6; }
}
.document-upload {
border: 2px dashed var(--border);
border-radius: 12px;
padding: 40px;
text-align: center;
transition: all 0.3s ease;
cursor: pointer;
margin-bottom: 20px;
}
.document-upload:hover {
border-color: var(--accent);
background: rgba(0, 212, 170, 0.05);
}
.document-upload.dragover {
border-color: var(--accent);
background: rgba(0, 212, 170, 0.1);
}
.document-upload svg {
width: 48px;
height: 48px;
stroke: var(--text-secondary);
margin-bottom: 16px;
}
.document-upload p {
color: var(--text-secondary);
margin-bottom: 8px;
}
.document-upload span {
font-size: 12px;
color: var(--accent);
}
.biometric-scanner {
background: linear-gradient(135deg, rgba(0, 212, 170, 0.1), rgba(0, 168, 136, 0.05));
border-radius: 12px;
padding: 32px;
text-align: center;
position: relative;
overflow: hidden;
}
.scanner-animation {
width: 120px;
height: 120px;
margin: 0 auto 20px;
position: relative;
}
.scanner-ring {
position: absolute;
inset: 0;
border: 2px solid var(--accent);
border-radius: 50%;
opacity: 0.3;
animation: scannerPulse 2s ease-out infinite;
}
.scanner-ring:nth-child(2) {
animation-delay: 0.5s;
}
.scanner-ring:nth-child(3) {
animation-delay: 1s;
}
@keyframes scannerPulse {
0% { transform: scale(1); opacity: 0.3; }
100% { transform: scale(1.5); opacity: 0; }
}
.scanner-icon {
position: absolute;
inset: 30px;
background: var(--accent);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.scanner-icon svg {
width: 32px;
height: 32px;
stroke: var(--bg-primary);
}
.status-badge {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 8px 16px;
border-radius: 20px;
font-size: 13px;
font-weight: 500;
}
.status-badge.pending {
background: rgba(245, 158, 11, 0.1);
color: var(--warning);
}
.status-badge.verified {
background: rgba(34, 197, 94, 0.1);
color: var(--success);
}
.status-badge.failed {
background: rgba(239, 68, 68, 0.1);
color: var(--danger);
}
.status-badge .dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: currentColor;
}
.status-badge.verified .dot {
animation: none;
}
.status-badge.pending .dot {
animation: blink 1s infinite;
}
@keyframes blink {
0%, 100% { opacity: 1; }
50% { opacity: 0.3; }
}
/* Privacy Controls */
.privacy-section {
display: grid;
gap: 20px;
}
.privacy-card {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 16px;
padding: 24px;
}
.privacy-card h3 {
font-size: 16px;
margin-bottom: 16px;
display: flex;
align-items: center;
gap: 10px;
}
.privacy-toggle {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px 0;
border-bottom: 1px solid var(--border);
}
.privacy-toggle:last-child {
border-bottom: none;
}
.toggle-info h4 {
font-size: 14px;
margin-bottom: 4px;
}
.toggle-info p {
font-size: 12px;
color: var(--text-secondary);
}
.toggle-switch {
width: 52px;
height: 28px;
background: var(--border);
border-radius: 14px;
position: relative;
cursor: pointer;
transition: background 0.3s ease;
}
.toggle-switch.active {
background: var(--accent);
}
.toggle-switch::after {
content: '';
position: absolute;
top: 4px;
left: 4px;
width: 20px;
height: 20px;
background: white;
border-radius: 50%;
transition: transform 0.3s ease;
}
.toggle-switch.active::after {
transform: translateX(24px);
}
.consent-log {
max-height: 300px;
overflow-y: auto;
}
.consent-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 14px;
background: var(--bg-secondary);
border-radius: 10px;
margin-bottom: 10px;
}
.consent-info {
display: flex;
align-items: center;
gap: 12px;
}
.consent-icon {
width: 36px;
height: 36px;
background: rgba(0, 212, 170, 0.1);
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
}
.consent-icon svg {
width: 18px;
height: 18px;
stroke: var(--accent);
}
.consent-details h4 {
font-size: 13px;
margin-bottom: 2px;
}
.consent-details span {
font-size: 11px;
color: var(--text-secondary);
}
/* Verification Section */
.verification-container {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 24px;
}
.qr-display {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 16px;
padding: 32px;
text-align: center;
}
.qr-code {
width: 200px;
height: 200px;
margin: 0 auto 24px;
background: white;
border-radius: 12px;
padding: 16px;
position: relative;
}
.qr-pattern {
width: 100%;
height: 100%;
display: grid;
grid-template-columns: repeat(11, 1fr);
grid-template-rows: repeat(11, 1fr);
gap: 2px;
}
.qr-cell {
background: var(--bg-primary);
border-radius: 1px;
transition: background 0.1s ease;
}
.qr-cell.empty {
background: transparent;
}
.qr-timer {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
color: var(--text-secondary);
font-size: 13px;
margin-bottom: 16px;
}
.timer-bar {
width: 100%;
height: 4px;
background: var(--border);
border-radius: 2px;
overflow: hidden;
margin-bottom: 20px;
}
.timer-fill {
height: 100%;
background: var(--accent);
transition: width 1s linear;
}
.verification-requests {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 16px;
padding: 24px;
}
.verification-requests h3 {
font-size: 18px;
margin-bottom: 20px;
}
.request-item {
background: var(--bg-secondary);
border-radius: 12px;
padding: 16px;
margin-bottom: 12px;
transition: all 0.3s ease;
}
.request-item:hover {
border-left: 3px solid var(--accent);
}
.request-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12px;
}
.requester {
display: flex;
align-items: center;
gap: 12px;
}
.requester-icon {
width: 40px;
height: 40px;
background: linear-gradient(135deg, #3b82f6, #6366f1);
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
}
.requester-icon svg {
width: 20px;
height: 20px;
stroke: white;
}
.requester-info h4 {
font-size: 14px;
}
.requester-info span {
font-size: 11px;
color: var(--text-secondary);
}
.request-time {
font-size: 11px;
color: var(--text-secondary);
}
.request-data {
font-size: 12px;
color: var(--text-secondary);
padding: 10px;
background: var(--bg-card);
border-radius: 6px;
margin-bottom: 12px;
}
.request-actions {
display: flex;
gap: 10px;
}
.request-actions .btn {
flex: 1;
justify-content: center;
}
/* Modal */
.modal-overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.7);
backdrop-filter: blur(8px);
z-index: 1000;
display: none;
align-items: center;
justify-content: center;
opacity: 0;
transition: opacity 0.3s ease;
}
.modal-overlay.active {
display: flex;
opacity: 1;
}
.modal {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 20px;
padding: 32px;
max-width: 500px;
width: 90%;
transform: scale(0.9);
transition: transform 0.3s ease;
}
.modal-overlay.active .modal {
transform: scale(1);
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24px;
}
.modal-header h3 {
font-size: 20px;
}
.modal-close {
width: 36px;
height: 36px;
background: var(--bg-secondary);
border: none;
border-radius: 8px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
}
.modal-close:hover {
background: var(--danger);
}
.modal-close svg {
width: 18px;
height: 18px;
stroke: var(--text-primary);
}
.share-options {
margin-bottom: 24px;
}
.share-option {
display: flex;
align-items: center;
gap: 12px;
padding: 14px;
background: var(--bg-secondary);
border-radius: 10px;
margin-bottom: 10px;
cursor: pointer;
transition: all 0.3s ease;
}
.share-option:hover {
background: rgba(0, 212, 170, 0.1);
}
.share-option.selected {
border: 1px solid var(--accent);
background: rgba(0, 212, 170, 0.1);
}
.checkbox {
width: 20px;
height: 20px;
border: 2px solid var(--border);
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
}
.share-option.selected .checkbox {
background: var(--accent);
border-color: var(--accent);
}
.checkbox svg {
width: 14px;
height: 14px;
stroke: var(--bg-primary);
opacity: 0;
}
.share-option.selected .checkbox svg {
opacity: 1;
}
.expiry-selector {
margin-bottom: 24px;
}
.expiry-selector label {
display: block;
font-size: 13px;
color: var(--text-secondary);
margin-bottom: 10px;
}
.expiry-options {
display: flex;
gap: 10px;
}
.expiry-btn {
flex: 1;
padding: 10px;
background: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: 8px;
color: var(--text-primary);
cursor: pointer;
font-size: 12px;
transition: all 0.3s ease;
}
.expiry-btn:hover, .expiry-btn.selected {
border-color: var(--accent);
background: rgba(0, 212, 170, 0.1);
}
.modal-actions {
display: flex;
gap: 12px;
}
.modal-actions .btn {
flex: 1;
justify-content: center;
}
/* Toast */
.toast-container {
position: fixed;
bottom: 24px;
right: 24px;
z-index: 2000;
display: flex;
flex-direction: column;
gap: 10px;
}
.toast {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 12px;
padding: 16px 20px;
display: flex;
align-items: center;
gap: 12px;
transform: translateX(120%);
transition: transform 0.4s ease;
min-width: 300px;
}
.toast.show {
transform: translateX(0);
}
.toast.success {
border-left: 3px solid var(--success);
}
.toast.error {
border-left: 3px solid var(--danger);
}
.toast.info {
border-left: 3px solid var(--info);
}
.toast-icon {
width: 24px;
height: 24px;
}
.toast-message {
flex: 1;
font-size: 13px;
}
/* Responsive */
@media (max-width: 1200px) {
.stats-grid {
grid-template-columns: repeat(2, 1fr);
}
.credentials-grid {
grid-template-columns: 1fr;
}
.proofing-container,
.verification-container {
grid-template-columns: 1fr;
}
}
@media (max-width: 768px) {
.sidebar {
width: 80px;
padding: 16px;
}
.logo-text, .nav-link span, .user-info {
display: none;
}
.main-content {
margin-left: 80px;
padding: 20px;
}
.stats-grid {
grid-template-columns: 1fr;
}
.user-profile {
justify-content: center;
}
}
/* Scan Animation */
.scan-line {
position: absolute;
top: 0;
left: 0;
right: 0;
height: 2px;
background: linear-gradient(90deg, transparent, var(--accent), transparent);
animation: scanMove 2s linear infinite;
}
@keyframes scanMove {
0% { top: 0; opacity: 1; }
100% { top: 100%; opacity: 0; }
}
</style>
</head>
<body>
<canvas id="particles-canvas"></canvas>
<div class="app-container">
<!-- Sidebar -->
<aside class="sidebar">
<div class="logo">
<div class="logo-icon">
<svg viewBox="0 0 24 24"><path d="M12 2L2 7v10l10 5 10-5V7L12 2zm0 2.5L19 8l-7 3.5L5 8l7-3.5zM4 9.5l7 3.5v6.5l-7-3.5V9.5zm16 0v6.5l-7 3.5v-6.5l7-3.5z"/></svg>
</div>
<div class="logo-text">
<h1>CredWallet</h1>
<span>Campus Pilot v1.0</span>
</div>
</div>
<ul class="nav-menu">
<li class="nav-item">
<div class="nav-link active" data-section="dashboard">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="3" y="3" width="7" height="7" rx="1"/>
<rect x="14" y="3" width="7" height="7" rx="1"/>
<rect x="3" y="14" width="7" height="7" rx="1"/>
<rect x="14" y="14" width="7" height="7" rx="1"/>
</svg>
<span>Dashboard</span>
</div>
</li>
<li class="nav-item">
<div class="nav-link" data-section="credentials">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="2" y="4" width="20" height="16" rx="2"/>
<path d="M12 9v6M9 12h6"/>
</svg>
<span>My Credentials</span>
</div>
</li>
<li class="nav-item">
<div class="nav-link" data-section="identity">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/>
<circle cx="12" cy="7" r="4"/>
</svg>
<span>Identity Proofing</span>
</div>
</li>
<li class="nav-item">
<div class="nav-link" data-section="privacy">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/>
</svg>
<span>Privacy Controls</span>
</div>
</li>
<li class="nav-item">
<div class="nav-link" data-section="verification">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/>
<polyline points="22 4 12 14.01 9 11.01"/>
</svg>
<span>Verification</span>
</div>
</li>
</ul>
<div class="user-profile">
<div class="user-avatar">AS</div>
<div class="user-info">
<h4>Alex Smith</h4>
<span>Computer Science, Year 3</span>
</div>
</div>
</aside>
<!-- Main Content -->
<main class="main-content">
<!-- Dashboard Section -->
<section id="dashboard" class="content-section active">
<div class="page-header">
<h2>Welcome Back, Alex</h2>
<p>Manage your campus credentials and privacy settings</p>
</div>
<div class="stats-grid">
<div class="stat-card">
<div class="stat-icon">
<svg viewBox="0 0 24 24" fill="none" stroke-width="2">
<rect x="2" y="4" width="20" height="16" rx="2"/>
<path d="M12 9v6M9 12h6"/>
</svg>
</div>
<div class="stat-value">4</div>
<div class="stat-label">Active Credentials</div>
</div>
<div class="stat-card">
<div class="stat-icon">
<svg viewBox="0 0 24 24" fill="none" stroke-width="2">
<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/>
<polyline points="22 4 12 14.01 9 11.01"/>
</svg>
</div>
<div class="stat-value">12</div>
<div class="stat-label">Verifications Made</div>
</div>
<div class="stat-card">
<div class="stat-icon">
<svg viewBox="0 0 24 24" fill="none" stroke-width="2">
<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/>
</svg>
</div>
<div class="stat-value">98%</div>
<div class="stat-label">Privacy Score</div>
</div>
<div class="stat-card">
<div class="stat-icon">
<svg viewBox="0 0 24 24" fill="none" stroke-width="2">
<circle cx="12" cy="12" r="10"/>
<polyline points="12 6 12 12 16 14"/>
</svg>
</div>
<div class="stat-value">3</div>
<div class="stat-label">Pending Requests</div>
</div>
</div>
<div class="credentials-grid">
<div class="credential-card verified" onclick="openShareModal('student-id')">
<div class="credential-header">
<div class="credential-icon" style="background: linear-gradient(135deg, #3b82f6, #1d4ed8);">
<svg viewBox="0 0 24 24" fill="white" stroke="none">
<rect x="2" y="4" width="20" height="16" rx="2"/>
<circle cx="9" cy="11" r="2"/>
<path d="M15 10h4M15 14h2"/>
</svg>
</div>
<div class="credential-title">
<h3>Student ID</h3>
<span>University of Technology</span>
</div>
</div>
<div class="credential-details">
<div class="detail-row">
<span class="detail-label">Student Number</span>
<span class="detail-value">UT2021CS0847</span>
</div>
<div class="detail-row">
<span class="detail-label">Valid Until</span>
<span class="detail-value">May 2025</span>
</div>
<div class="detail-row">
<span class="detail-label">Issued</span>
<span class="detail-value">Aug 28, 2021</span>
</div>
</div>
</div>
<div class="credential-card verified" onclick="openShareModal('enrollment')">
<div class="credential-header">
<div class="credential-icon" style="background: linear-gradient(135deg, #22c55e, #16a34a);">
<svg viewBox="0 0 24 24" fill="white" stroke="none">
<path d="M22 10v6M2 10l10-5 10 5-10 5z"/>
<path d="M6 12v5c3 3 9 3 12 0v-5"/>
</svg>
</div>
<div class="credential-title">
<h3>Enrollment Certificate</h3>
<span>Full-time Student Status</span>
</div>
</div>
<div class="credential-details">
<div class="detail-row">
<span class="detail-label">Program</span>
<span class="detail-value">BSc Computer Science</span>
</div>
<div class="detail-row">
<span class="detail-label">Academic Year</span>
<span class="detail-value">2024-2025</span>
</div>
<div class="detail-row">
<span class="detail-label">Status</span>
<span class="detail-value" style="color: var(--success);">Active</span>
</div>
</div>
</div>
<div class="credential-card verified" onclick="openShareModal('transcript')">
<div class="credential-header">
<div class="credential-icon" style="background: linear-gradient(135deg, #f59e0b, #d97706);">
<svg viewBox="0 0 24 24" fill="white" stroke="none">
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/>
<polyline points="14 2 14 8 20 8"/>
<line x1="16" y1="13" x2="8" y2="13"/>
<line x1="16" y1="17" x2="8" y2="17"/>
</svg>
</div>
<div class="credential-title">
<h3>Academic Transcript</h3>
<span>Official Records</span>
</div>
</div>
<div class="credential-details">
<div class="detail-row">
<span class="detail-label">GPA</span>
<span class="detail-value">3.74 / 4.00</span>
</div>
<div class="detail-row">
<span class="detail-label">Credits Earned</span>
<span class="detail-value">87 / 120</span>
</div>
<div class="detail-row">
<span class="detail-label">Last Updated</span>
<span class="detail-value">Dec 15, 2024</span>
</div>
</div>
</div>
<div class="credential-card verified" onclick="openShareModal('library')">
<div class="credential-header">
<div class="credential-icon" style="background: linear-gradient(135deg, #8b5cf6, #7c3aed);">
<svg viewBox="0 0 24 24" fill="white" stroke="none">
<path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"/>
<path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"/>
</svg>
</div>
<div class="credential-title">
<h3>Library Access</h3>
<span>Digital Resources Pass</span>
</div>
</div>
<div class="credential-details">
<div class="detail-row">
<span class="detail-label">Access Level</span>
<span class="detail-value">Premium</span>
</div>
<div class="detail-row">
<span class="detail-label">Books Borrowed</span>
<span class="detail-value">3 / 10</span>
</div>
<div class="detail-row">
<span class="detail-label">Valid Until</span>
<span class="detail-value">May 2025</span>
</div>
</div>
</div>
</div>
</section>
<!-- Credentials Section -->
<section id="credentials" class="content-section">
<div class="page-header">
<h2>My Credentials</h2>
<p>View and manage your verified academic credentials</p>
</div>
<div class="credentials-grid" id="credentials-list"></div>
</section>
<!-- Identity Proofing Section -->
<section id="identity" class="content-section">
<div class="page-header">
<h2>Identity Proofing</h2>
<p>Verify your identity to unlock all credential features</p>
</div>
<div class="proofing-container">
<div class="proofing-card">
<h3>
<svg viewBox="0 0 24 24" fill="none" stroke="var(--accent)" stroke-width="2" width="24" height="24">
<rect x="2" y="4" width="20" height="16" rx="2"/>
<path d="M12 9v6M9 12h6"/>
</svg>
Document Verification
</h3>
<div class="step-indicator">
<div class="step completed"></div>
<div class="step completed"></div>
<div class="step active"></div>
<div class="step"></div>
</div>
<div class="document-upload" id="document-drop">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>
<polyline points="17 8 12 3 7 8"/>
<line x1="12" y1="3" x2="12" y2="15"/>
</svg>
<p>Drag and drop your document here</p>
<span>Supported: Passport, National ID, Driver's License</span>
</div>
<div id="upload-status" style="display: none;">
<div class="status-badge pending">
<span class="dot"></span>
Processing document...
</div>
</div>
<div id="upload-success" style="display: none; margin-top: 16px;">
<div class="status-badge verified">
<span class="dot"></span>
Document verified successfully
</div>
</div>
</div>
<div class="proofing-card">
<h3>
<svg viewBox="0 0 24 24" fill="none" stroke="var(--accent)" stroke-width="2" width="24" height="24">
<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/>
</svg>
Biometric Verification
</h3>
<div class="step-indicator">
<div class="step completed"></div>
<div class="step active"></div>
<div class="step"></div>
</div>
<div class="biometric-scanner" id="biometric-scanner">
<div class="scanner-animation">
<div class="scanner-ring"></div>
<div class="scanner-ring"></div>
<div class="scanner-ring"></div>
<div class="scanner-icon">
<svg viewBox="0 0 24 24" fill="none" stroke-width="2">
<path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7z"/>
<circle cx="12" cy="12" r="3"/>
</svg>
</div>
</div>
<p style="color: var(--text-secondary); margin-bottom: 16px;">Click to start facial recognition</p>
<button class="btn btn-primary" onclick="startBiometric()">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="18" height="18">
<path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7z"/>
<circle cx="12" cy="12" r="3"/>
</svg>
Start Scan
</button>
</div>
<div id="biometric-result" style="display: none; text-align: center; padding: 20px;">
<div class="status-badge verified" style="margin-bottom: 16px;">
<span class="dot"></span>
Biometric Match Confirmed
</div>
<p style="color: var(--text-secondary); font-size: 13px;">
Identity verified with 99.7% confidence
</p>
</div>
</div>
</div>
</section>
<!-- Privacy Section -->
<section id="privacy" class="content-section">
<div class="page-header">
<h2>Privacy Controls</h2>
<p>Manage what information you share and with whom</p>
</div>
<div class="privacy-section">
<div class="privacy-card">
<h3>
<svg viewBox="0 0 24 24" fill="none" stroke="var(--accent)" stroke-width="2" width="20" height="20">
<circle cx="12" cy="12" r="3"/>
<path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"/>
</svg>
Data Sharing Preferences
</h3>
<div class="privacy-toggle">
<div class="toggle-info">
<h4>Share Academic Standing</h4>
<p>Allow verification of enrollment status without GPA</p>
</div>
<div class="toggle-switch active" onclick="toggleSwitch(this)"></div>
</div>
<div class="privacy-toggle">
<div class="toggle-info">
<h4>Share GPA Information</h4>
<p>Include GPA in transcript verifications</p>
</div>
<div class="toggle-switch" onclick="toggleSwitch(this)"></div>
</div>
<div class="privacy-toggle">
<div class="toggle-info">
<h4>Anonymous Verification</h4>
<p>Use zero-knowledge proofs when possible</p>
</div>
<div class="toggle-switch active" onclick="toggleSwitch(this)"></div>
</div>
<div class="privacy-toggle">
<div class="toggle-info">
<h4>Auto-expire Shares</h4>
<p>Automatically revoke access after 30 days</p>
</div>
<div class="toggle-switch active" onclick="toggleSwitch(this)"></div>
</div>
</div>
<div class="privacy-card">
<h3>
<svg viewBox="0 0 24 24" fill="none" stroke="var(--accent)" stroke-width="2" width="20" height="20">
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/>
<polyline points="14 2 14 8 20 8"/>
<line x1="16" y1="13" x2="8" y2="13"/>
<line x1="16" y1="17" x2="8" y2="17"/>
</svg>
Recent Consent Activity
</h3>
<div class="consent-log">
<div class="consent-item">
<div class="consent-info">
<div class="consent-icon">
<svg viewBox="0 0 24 24" fill="none" stroke-width="2">
<path d="M9 12l2 2 4-4"/>
<path d="M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0z"/>
</svg>
</div>
<div class="consent-details">
<h4>University Library</h4>
<span>Enrollment status shared</span>
</div>
</div>
<span style="color: var(--text-secondary); font-size: 11px;">2h ago</span>
</div>
<div class="consent-item">
<div class="consent-info">
<div class="consent-icon">
<svg viewBox="0 0 24 24" fill="none" stroke-width="2">
<path d="M9 12l2 2 4-4"/>
<path d="M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0z"/>
</svg>
</div>
<div class="consent-details">
<h4>Student Housing Office</h4>
<span>Student ID verified</span>
</div>
</div>
<span style="color: var(--text-secondary); font-size: 11px;">1d ago</span>
</div>
<div class="consent-item">
<div class="consent-info">
<div class="consent-icon" style="background: rgba(239, 68, 68, 0.1);">
<svg viewBox="0 0 24 24" fill="none" stroke="var(--danger)" stroke-width="2">
<path d="M18 6L6 18M6 6l12 12"/>
</svg>
</div>
<div class="consent-details">
<h4>External Employer Co.</h4>
<span>Access revoked by user</span>
</div>
</div>
<span style="color: var(--text-secondary); font-size: 11px;">3d ago</span>
</div>
<div class="consent-item">
<div class="consent-info">
<div class="consent-icon">
<svg viewBox="0 0 24 24" fill="none" stroke-width="2">
<path d="M9 12l2 2 4-4"/>
<path d="M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0z"/>
</svg>
</div>
<div class="consent-details">
<h4>Financial Aid Office</h4>
<span>Full transcript shared</span>
</div>
</div>
<span style="color: var(--text-secondary); font-size: 11px;">1w ago</span>
</div>
</div>
</div>
</div>
</section>
<!-- Verification Section -->
<section id="verification" class="content-section">
<div class="page-header">
<h2>Verification Center</h2>
<p>Share credentials securely or respond to verification requests</p>
</div>
<div class="verification-container">
<div class="qr-display">
<h3 style="margin-bottom: 20px;">Your Verification QR</h3>
<div class="qr-code">
<div class="qr-pattern" id="qr-pattern"></div>
</div>
<div class="timer-bar">
<div class="timer-fill" id="timer-fill"></div>
</div>
<div class="qr-timer">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="16" height="16">
<circle cx="12" cy="12" r="10"/>
<polyline points="12 6 12 12 16 14"/>
</svg>
<span id="qr-timer">Expires in 60s</span>
</div>
<button class="btn btn-secondary" onclick="regenerateQR()" style="width: 100%;">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="18" height="18">
<path d="M23 4v6h-6M1 20v-6h6"/>
<path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"/>
</svg>
Regenerate QR Code
</button>
</div>
<div class="verification-requests">
<h3>Pending Requests</h3>
<div class="request-item">
<div class="request-header">
<div class="requester">
<div class="requester-icon">
<svg viewBox="0 0 24 24" fill="none" stroke-width="2">
<path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>
<polyline points="9 22 9 12 15 12 15 22"/>
</svg>
</div>
<div class="requester-info">
<h4>Campus Housing</h4>
<span>Housing Application 2025</span>
</div>
</div>
<span class="request-time">5 min ago</span>
</div>
<div class="request-data">
Requesting: Enrollment Status, Student ID
</div>
<div class="request-actions">
<button class="btn btn-primary" onclick="approveRequest('housing')">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="16" height="16">
<path d="M20 6L9 17l-5-5"/>
</svg>
Approve
</button>
<button class="btn btn-danger" onclick="denyRequest('housing')">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="16" height="16">
<path d="M18 6L6 18M6 6l12 12"/>
</svg>
Deny
</button>
</div>
</div>
<div class="request-item">
<div class="request-header">
<div class="requester">
<div class="requester-icon" style="background: linear-gradient(135deg, #f59e0b, #d97706);">
<svg viewBox="0 0 24 24" fill="none" stroke-width="2">
<rect x="2" y="7" width="20" height="14" rx="2" ry="2"/>
<path d="M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"/>
</svg>
</div>
<div class="requester-info">
<h4>TechIntern Corp</h4>
<span>Summer Internship Program</span>
</div>
</div>
<span class="request-time">2 hours ago</span>
</div>
<div class="request-data">
Requesting: Academic Transcript, Enrollment Certificate
</div>
<div class="request-actions">
<button class="btn btn-primary" onclick="approveRequest('internship')">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="16" height="16">
<path d="M20 6L9 17l-5-5"/>
</svg>
Approve
</button>
<button class="btn btn-danger" onclick="denyRequest('internship')">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="16" height="16">
<path d="M18 6L6 18M6 6l12 12"/>
</svg>
Deny
</button>
</div>
</div>
<div class="request-item">
<div class="request-header">
<div class="requester">
<div class="requester-icon" style="background: linear-gradient(135deg, #22c55e, #16a34a);">
<svg viewBox="0 0 24 24" fill="none" stroke-width="2">
<path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"/>
<path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"/>
</svg>
</div>
<div class="requester-info">
<h4>University Library</h4>
<span>Inter-Library Loan Access</span>
</div>
</div>
<span class="request-time">1 day ago</span>
</div>
<div class="request-data">
Requesting: Student ID, Library Access credential
</div>
<div class="request-actions">
<button class="btn btn-primary" onclick="approveRequest('library')">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="16" height="16">
<path d="M20 6L9 17l-5-5"/>
</svg>
Approve
</button>
<button class="btn btn-danger" onclick="denyRequest('library')">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="16" height="16">
<path d="M18 6L6 18M6 6l12 12"/>
</svg>
Deny
</button>
</div>
</div>
</div>
</div>
</section>
</main>
</div>
<!-- Share Modal -->
<div class="modal-overlay" id="share-modal">
<div class="modal">
<div class="modal-header">
<h3 id="modal-title">Share Credential</h3>
<button class="modal-close" onclick="closeModal()">
<svg viewBox="0 0 24 24" fill="none" stroke-width="2">
<path d="M18 6L6 18M6 6l12 12"/>
</svg>
</button>
</div>
<div class="share-options" id="share-options">
<div class="share-option selected" onclick="selectOption(this)">
<div class="checkbox">
<svg viewBox="0 0 24 24" fill="none" stroke-width="3">
<path d="M20 6L9 17l-5-5"/>
</svg>
</div>
<div>
<h4 style="font-size: 14px; margin-bottom: 2px;">Basic Info Only</h4>
<p style="font-size: 12px; color: var(--text-secondary);">Name, credential type, validity</p>
</div>
</div>
<div class="share-option" onclick="selectOption(this)">
<div class="checkbox">
<svg viewBox="0 0 24 24" fill="none" stroke-width="3">
<path d="M20 6L9 17l-5-5"/>
</svg>
</div>
<div>
<h4 style="font-size: 14px; margin-bottom: 2px;">Standard Details</h4>
<p style="font-size: 12px; color: var(--text-secondary);">Include dates and status</p>
</div>
</div>
<div class="share-option" onclick="selectOption(this)">
<div class="checkbox">
<svg viewBox="0 0 24 24" fill="none" stroke-width="3">
<path d="M20 6L9 17l-5-5"/>
</svg>
</div>
<div>
<h4 style="font-size: 14px; margin-bottom: 2px;">Full Credential</h4>
<p style="font-size: 12px; color: var(--text-secondary);">All details including sensitive data</p>
</div>
</div>
</div>
<div class="expiry-selector">
<label>Access Expiration</label>
<div class="expiry-options">
<button class="expiry-btn selected" onclick="selectExpiry(this, '1h')">1 Hour</button>
<button class="expiry-btn" onclick="selectExpiry(this, '24h')">24 Hours</button>
<button class="expiry-btn" onclick="selectExpiry(this, '7d')">7 Days</button>
<button class="expiry-btn" onclick="selectExpiry(this, '30d')">30 Days</button>
</div>
</div>
<div class="modal-actions">
<button class="btn btn-secondary" onclick="closeModal()">Cancel</button>
<button class="btn btn-primary" onclick="shareCredential()">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="16" height="16">
<circle cx="18" cy="5" r="3"/>
<circle cx="6" cy="12" r="3"/>
<circle cx="18" cy="19" r="3"/>
<line x1="8.59" y1="13.51" x2="15.42" y2="17.49"/>
<line x1="15.41" y1="6.51" x2="8.59" y2="10.49"/>
</svg>
Generate Share Link
</button>
</div>
</div>
</div>
<!-- Toast Container -->
<div class="toast-container" id="toast-container"></div>
<script>
// Particle Animation
const canvas = document.getElementById('particles-canvas');
const ctx = canvas.getContext('2d');
let particles = [];
let mouse = { x: null, y: null };
function resizeCanvas() {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
}
resizeCanvas();
window.addEventListener('resize', resizeCanvas);
document.addEventListener('mousemove', (e) => {
mouse.x = e.clientX;
mouse.y = e.clientY;
});
class Particle {
constructor() {
this.reset();
}
reset() {
this.x = Math.random() * canvas.width;
this.y = Math.random() * canvas.height;
this.size = Math.random() * 2 + 0.5;
this.speedX = (Math.random() - 0.5) * 0.5;
this.speedY = (Math.random() - 0.5) * 0.5;
this.opacity = Math.random() * 0.5 + 0.2;
}
update() {
this.x += this.speedX;
this.y += this.speedY;
if (mouse.x !== null) {
const dx = mouse.x - this.x;
const dy = mouse.y - this.y;
const dist = Math.sqrt(dx * dx + dy * dy);
if (dist < 150) {
const force = (150 - dist) / 150;
this.x -= dx * force * 0.02;
this.y -= dy * force * 0.02;
}
}
if (this.x < 0 || this.x > canvas.width || this.y < 0 || this.y > canvas.height) {
this.reset();
}
}
draw() {
ctx.beginPath();
ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2);
ctx.fillStyle = `rgba(0, 212, 170, ${this.opacity})`;
ctx.fill();
}
}
for (let i = 0; i < 100; i++) {
particles.push(new Particle());
}
function connectParticles() {
for (let i = 0; i < particles.length; i++) {
for (let j = i + 1; j < particles.length; j++) {
const dx = particles[i].x - particles[j].x;
const dy = particles[i].y - particles[j].y;
const dist = Math.sqrt(dx * dx + dy * dy);
if (dist < 120) {
ctx.beginPath();
ctx.strokeStyle = `rgba(0, 212, 170, ${0.1 * (1 - dist / 120)})`;
ctx.lineWidth = 0.5;
ctx.moveTo(particles[i].x, particles[i].y);
ctx.lineTo(particles[j].x, particles[j].y);
ctx.stroke();
}
}
}
}
function animateParticles() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
particles.forEach(p => {
p.update();
p.draw();
});
connectParticles();
requestAnimationFrame(animateParticles);
}
animateParticles();
// Navigation
const navLinks = document.querySelectorAll('.nav-link');
const sections = document.querySelectorAll('.content-section');
navLinks.forEach(link => {
link.addEventListener('click', () => {
const sectionId = link.dataset.section;
navLinks.forEach(l => l.classList.remove('active'));
link.classList.add('active');
sections.forEach(s => s.classList.remove('active'));
document.getElementById(sectionId).classList.add('active');
});
});
// QR Code Generation
function generateQR() {
const pattern = document.getElementById('qr-pattern');
pattern.innerHTML = '';
// Generate pseudo-random QR pattern
const seed = Date.now();
for (let i = 0; i < 121; i++) {
const cell = document.createElement('div');
cell.className = 'qr-cell';
// Create structured pattern with randomness
const row = Math.floor(i / 11);
const col = i % 11;
// Corner patterns (position detection)
const isCorner = (row < 3 && col < 3) ||
(row < 3 && col > 7) ||
(row > 7 && col < 3);
const isCornerInner = (row === 1 && col === 1) ||
(row === 1 && col === 9) ||
(row === 9 && col === 1);
if (isCorner && !isCornerInner) {
cell.classList.remove('empty');
} else if (isCornerInner) {
cell.classList.remove('empty');
} else {
// Random data based on seed
const hash = (seed * (i + 1) * 9301 + 49297) % 233280;
if (hash / 233280 > 0.5) {
cell.classList.remove('empty');
}
}
pattern.appendChild(cell);
}
startQRTimer();
}
let qrTimer;
let qrTimeLeft = 60;
function startQRTimer() {
clearInterval(qrTimer);
qrTimeLeft = 60;
updateTimerDisplay();
qrTimer = setInterval(() => {
qrTimeLeft--;
updateTimerDisplay();
if (qrTimeLeft <= 0) {
regenerateQR();
}
}, 1000);
}
function updateTimerDisplay() {
document.getElementById('qr-timer').textContent = `Expires in ${qrTimeLeft}s`;
document.getElementById('timer-fill').style.width = `${(qrTimeLeft / 60) * 100}%`;
}
function regenerateQR() {
generateQR();
showToast('New verification QR generated', 'info');
}
// Initialize QR
generateQR();
// Document Upload
const dropZone = document.getElementById('document-drop');
dropZone.addEventListener('dragover', (e) => {
e.preventDefault();
dropZone.classList.add('dragover');
});
dropZone.addEventListener('dragleave', () => {
dropZone.classList.remove('dragover');
});
dropZone.addEventListener('drop', (e) => {
e.preventDefault();
dropZone.classList.remove('dragover');
processDocument();
});
dropZone.addEventListener('click', () => {
processDocument();
});
function processDocument() {
const statusEl = document.getElementById('upload-status');
const successEl = document.getElementById('upload-success');
statusEl.style.display = 'block';
successEl.style.display = 'none';
setTimeout(() => {
statusEl.style.display = 'none';
successEl.style.display = 'block';
showToast('Document verified successfully', 'success');
// Update step indicator
const steps = document.querySelectorAll('.proofing-card:first-child .step');
steps[2].classList.remove('active');
steps[2].classList.add('completed');
steps[3].classList.add('active');
}, 3000);
}
// Biometric Scan
function startBiometric() {
const scanner = document.getElementById('biometric-scanner');
const result = document.getElementById('biometric-result');
scanner.innerHTML = `
<div class="biometric-scanner" style="position: relative;">
<div class="scanner-animation">
<div class="scanner-ring" style="animation-duration: 1s;"></div>
<div class="scanner-ring" style="animation-duration: 1s; animation-delay: 0.3s;"></div>
<div class="scanner-ring" style="animation-duration: 1s; animation-delay: 0.6s;"></div>
<div class="scanner-icon">
<svg viewBox="0 0 24 24" fill="none" stroke-width="2">
<path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7z"/>
<circle cx="12" cy="12" r="3"/>
</svg>
</div>
</div>
<div class="scan-line"></div>
</div>
<p style="color: var(--accent); margin-top: 20px;">Scanning... Please hold still</p>
`;
setTimeout(() => {
scanner.style.display = 'none';
result.style.display = 'block';
showToast('Biometric verification complete', 'success');
// Update step indicator
const steps = document.querySelectorAll('.proofing-card:last-child .step');
steps[1].classList.remove('active');
steps[1].classList.add('completed');
steps[2].classList.add('completed');
}, 4000);
}
// Privacy Toggle
function toggleSwitch(el) {
el.classList.toggle('active');
const isActive = el.classList.contains('active');
showToast(`Setting ${isActive ? 'enabled' : 'disabled'}`, 'info');
}
// Share Modal
let currentCredential = '';
function openShareModal(credential) {
currentCredential = credential;
const modal = document.getElementById('share-modal');
const title = document.getElementById('modal-title');
const names = {
'student-id': 'Student ID',
'enrollment': 'Enrollment Certificate',
'transcript': 'Academic Transcript',
'library': 'Library Access'
};
title.textContent = `Share ${names[credential] || 'Credential'}`;
modal.classList.add('active');
}
function closeModal() {
document.getElementById('share-modal').classList.remove('active');
}
function selectOption(el) {
document.querySelectorAll('.share-option').forEach(opt => opt.classList.remove('selected'));
el.classList.add('selected');
}
function selectExpiry(el, time) {
document.querySelectorAll('.expiry-btn').forEach(btn => btn.classList.remove('selected'));
el.classList.add('selected');
}
function shareCredential() {
closeModal();
showToast('Share link generated and copied to clipboard', 'success');
}
// Verification Requests
function approveRequest(type) {
const requestEl = event.target.closest('.request-item');
requestEl.style.opacity = '0.5';
requestEl.style.pointerEvents = 'none';
setTimeout(() => {
requestEl.remove();
showToast(`${type.charAt(0).toUpperCase() + type.slice(1)} request approved`, 'success');
}, 500);
}
function denyRequest(type) {
const requestEl = event.target.closest('.request-item');
requestEl.style.opacity = '0.5';
requestEl.style.pointerEvents = 'none';
setTimeout(() => {
requestEl.remove();
showToast(`${type.charAt(0).toUpperCase() + type.slice(1)} request denied`, 'info');
}, 500);
}
// Toast Notifications
function showToast(message, type = 'info') {
const container = document.getElementById('toast-container');
const toast = document.createElement('div');
toast.className = `toast ${type}`;
const icons = {
success: '<path d="M20 6L9 17l-5-5"/>',
error: '<path d="M18 6L6 18M6 6l12 12"/>',
info: '<circle cx="12" cy="12" r="10"/><line x1="12" y1="16" x2="12" y2="12"/><line x1="12" y1="8" x2="12.01" y2="8"/>'
};
const colors = {
success: 'var(--success)',
error: 'var(--danger)',
info: 'var(--info)'
};
toast.innerHTML = `
<svg class="toast-icon" viewBox="0 0 24 24" fill="none" stroke="${colors[type]}" stroke-width="2">
${icons[type]}
</svg>
<span class="toast-message">${message}</span>
`;
container.appendChild(toast);
setTimeout(() => toast.classList.add('show'), 10);
setTimeout(() => {
toast.classList.remove('show');
setTimeout(() => toast.remove(), 400);
}, 3000);
}
// Populate credentials list
function populateCredentials() {
const credentialsData = [
{ name: 'Student ID', issuer: 'University of Technology', icon: 'id', color: '#3b82f6' },
{ name: 'Enrollment Certificate', issuer: 'Registrar Office', icon: 'enrollment', color: '#22c55e' },
{ name: 'Academic Transcript', issuer: 'Academic Records', icon: 'transcript', color: '#f59e0b' },
{ name: 'Library Access', issuer: 'University Library', icon: 'library', color: '#8b5cf6' }
];
// This could be expanded to dynamically populate the credentials section
}
// Close modal on outside click
document.getElementById('share-modal').addEventListener('click', (e) => {
if (e.target.classList.contains('modal-overlay')) {
closeModal();
}
});
// Keyboard navigation
document.addEventListener('keydown', (e) => {
if (e.key === 'Escape') {
closeModal();
}
});
</script>
</body>
</html>
Key Features Implemented
1. Identity Proofing
- Document Upload - Drag & drop with visual feedback
- Biometric Scanner - Animated facial recognition simulation
- Step Indicators - Visual progress through verification stages
2. Privacy Controls
- Selective Disclosure - Choose what data to share
- Toggle Switches - Fine-grained privacy settings
- Consent Log - Track all sharing activity with timestamps
3. Verification System
- Dynamic QR Codes - Auto-expiring verification codes
- Request Management - Approve/deny incoming verification requests
- Share Modal - Granular control over shared data with expiration
Visual Features
- Particle Background - Interactive particles that respond to mouse movement
- Smooth Animations - Page transitions, hover effects, loading states
- Dark Tech Theme - Cyan accent on dark background for a secure, modern feel
- Toast Notifications - Real-time feedback for user actions