Enterprise and Military Grade Identity Verification Platform
Hash algorithms, fraud detection mechanics, MAR protocol, and development guidelines
Hash Algorithms & Duplicate DetectionMethod: SHA-256 of E.164 normalized string
Accuracy: ~100%
Raw: (11) 99999-8888
Normalized: +5511999998888
Hash: SHA-256(normalized)
Method: SHA-256 of normalized Textract fields
Accuracy: ~95%
Fields: nome + cpf + rg + ...
Normalize: lowercase, trim,
remove accents/punctuation
Hash: SHA-256(concatenated)
Method: Perceptual hash + Rekognition
Accuracy: ~99%
pHash: Pre-filter (~90%)
Hamming distance < 10
Rekognition: Confirmation
CompareFaces > 85%
Original photo → SHA-256 → abc123...
Same person, rescanned → xyz789...
Result: DIFFERENT HASH ❌
Tiny differences cause total hash change:
• Different lighting
• Slight rotation
• Compression artifacts
• Different camera
Photo → Rekognition → Face Vector
[0.234, -0.891, 0.445, ...]
Same person → Similar vector
Cosine similarity > 0.85 = MATCH ✅
Perceptual hash for fast pre-filter:
pHash distance < 10 = candidate
Then confirm with Rekognition
Verification completes → Profile written with hashes
↓
EventBridge fires VERIFICATION_COMPLETED
↓
SQS Queue (buffer — absorbs load spikes)
↓
Fraud Lambda (max 10 concurrent)
↓
Query hash indexes for duplicates:
• DocumentHashIndex (SHA-256)
• MobileHashIndex (SHA-256)
• FaceHashIndex (pHash)
↓
If match found:
→ Rekognition CompareFaces (faces only)
→ profile.fraud.flagged = true
→ FraudCase created with profileId reference
→ Fraud reviewer notified
↓
If Lambda fails → SQS retries (max 3)
↓
If still fails → Dead Letter Queue (DLQ)
↓
DLQ → Manual inspection by System Admin
interface ProfileHashes {
documentHash: string;
// SHA-256 of normalized fields
mobileHash: string;
// SHA-256 of E.164 mobile
faceHash: string;
// pHash for index lookup
faceVector: number[];
// Rekognition 128-dim embedding
}
Written atomically when each factor completes. Fraud Lambda reads from profile — never re-processes images.
Fast lookup without table scan:
Fraud Lambda queries indexes directly. No throttling. ~10-50ms per query.
/* MAR: /mar-analysis/FileName.md | Last: YYYY-MM-DD */
Every modified file must include this header at the top. Links to corresponding analysis document.
Glassmorphism + Neumorphism + MUI Enterprise
Philosophy: Clean, serious, trustworthy. Perfect for security products.
background: rgba(255,255,255,0.05);
backdrop-filter: blur(12px);
border: 1px solid rgba(255,255,255,0.08);
border-radius: 16px;
background: rgba(0,0,0,0.03);
backdrop-filter: blur(12px);
border: 1px solid rgba(0,0,0,0.06);
border-radius: 16px;
| Element | Size | Weight | Usage |
|---|---|---|---|
| h1 | 32px | 700 | Page titles |
| h2 | 24px | 600 | Section headers |
| h3 | 20px | 600 | Card titles |
| h4 | 18px | 500 | Subsection titles |
| body1 | 16px | 400 | Primary content |
| body2 | 14px | 400 | Secondary content |
| caption | 12px | 400 | Labels, timestamps |
Font: Inter (primary), Geist (fallback), system-ui, sans-serif
Development Tools & Scripts# Delete all external users
./scripts/nuke-external-users.sh
# Delete specific tenant's users
./scripts/nuke-external-users.sh
# Delete entire tenant
./scripts/delete-tenant.sh
# Local project backup
pnpm backup
# AWS infrastructure backup
pnpm backup:aws
# Full disaster recovery
./scripts/disaster-recovery-backup.sh
# Deploy to dev
pnpm sst deploy --stage dev
# Deploy with logging
./scripts/deploy-with-logging.sh
# Remove deployment
pnpm sst remove --stage dev