Contractor license, insurance, and identity verification workflows — Stripe Identity + Checkr inspired
contractorVerifications // Per-doc record
contractorId: v.id("contractorUsers")
type: "license" | "insurance" | "background" | "identity"
status: "pending" | "approved" | "rejected" | "expired"
documentUrl: string
extractedData: { licenseNum, issuer, expiry }
aiConfidence: number (0-100)
reviewedBy: v.id("adminUsers") | "auto"
complianceRules // Configurable rules
requiredDocs: string[]
autoApproveThreshold: number
expiryWarningDays: number[]
autoSuspend: boolean
verificationAuditLog // Immutable log
action: "approved" | "rejected" | "override" | "reminder"
performedBy: string
reason: string
documentSnapshot: object
listPending // Queue with priority sort
getVerification // Single doc detail
getBackgroundCheck // Checkr status
getComplianceOverview // Gauge + expiring
getContractorProfile // Full compliance view
getAuditLog // Paginated, filterable
getDocument // Presigned URL + metadata
getRules // Current rule config
approve
args: verificationId
reject
args: verificationId, reason
requestMoreInfo
args: verificationId, message
overrideSuspension
args: contractorId, duration, reason
updateRules
args: ruleConfig object
bulkNotify
args: contractorIds[], templateId
VerificationQueue // FlatList + filters
VerificationDetail // Review + actions
DocumentViewer // Zoom/rotate/flag
BackgroundCheckStatus // Timeline + items
ComplianceDashboard // Gauge + lists
RulesEngine // Toggle configs
ContractorComplianceProfile
AuditLog // Search + export
Stripe Identity // Photo ID verification
Document upload → AI extraction
Selfie matching → confidence score
Checkr // Background checks
Webhook: check.completed
Webhook: check.flagged
Ohio OCILB // License DB lookup
Verify license # against state records
SendGrid // Notifications
Expiry warnings, rejection notices
pending // Awaiting admin review
approved // Verified and active
rejected // Failed verification
expired // Past expiry date
expiring_soon // Within warning window
suspended // Auto-suspended (expired)
override // Admin temporary override