How didar-ali-deed/identity-verification-system works
Identity Verification System accepts document and selfie evidence, runs an explainable ten-stage verification, and presents the resulting status and evidence to applicants and reviewers. The main path is browser submission → authenticated API and owned application → queued verification → staged decision and persisted evidence → applicant status or auditable admin review. The README also documents mobile capture, draft replacement, replay safeguards, and the standalone synthetic demo. Edges are limited to relationships shown in excerpts, the source index, or README; unsampled subsystems are represented at directory level where appropriate.
Main entry points: orchestrator.py Pipeline orchestrator · App.tsx Web application · idv.py Verification routes · database.py Application database
Components 33
Applicant and reviewer experience
- Web application
frontend/src/App.tsx - Document submission
frontend/src/pages/IDVSubmission.tsx - Status and evidence
frontend/src/pages/IDVStatus.tsx - Review dashboard
frontend/src/pages/AdminDashboard.tsx - Synthetic demo
frontend/src/pages/Demo.tsx
Identity API
- FastAPI entry
backend/app/main.py - Authentication routes
backend/app/api/auth.py - Authentication service
backend/app/services/auth_service.py - Verification routes
backend/app/api/idv.py - Admin review routes
backend/app/api/admin.py - Application service
backend/app/services/idv_service.py
Verification pipeline
- Verification worker
backend/app/tasks/verification.py - Document acceptance
backend/app/services/pipeline/stage_0_acceptance.py - Liveness screening
backend/app/services/pipeline/stage_1_liveness.py - OCR extraction
backend/app/services/pipeline/stage_2_extraction.py - Field normalization
backend/app/services/pipeline/stage_3_normalization.py - Fraud and watchlist
backend/app/services/pipeline/stage_4_internal_checks.py - Identity comparisons
backend/app/services/pipeline/stage_5_similarity.py - Scoring and decision
backend/app/services/pipeline/stage_6_scoring.py - Result recording
backend/app/services/pipeline/stage_9_result.py - Pipeline orchestrator
backend/app/services/pipeline/orchestrator.py - OCR engine
backend/app/services/ocr_service.py - Face verification
backend/app/services/face_service.py - Passive liveness
backend/app/services/passive_liveness.py
Evidence and persistence
- Task outbox
backend/app/services/task_outbox.py - Private file storage
backend/app/utils/storage.py - Application database
backend/app/database.py - Document and selfie files
- Pipeline evidence model
backend/app/models/pipeline_result.py
Other components
- Applicant
- Reviewer
- PostgreSQL
- Redis broker
Connections 41
- Applicant → Web application: uses
README.md - Web application → Document submission: routes to
frontend/src/App.tsx - Applicant → Document submission: submits evidence
README.md - Document submission → Verification routes: uploads
README.md - Web application → Status and evidence: routes to
frontend/src/App.tsx - Web application → Review dashboard: routes to
frontend/src/App.tsx - Reviewer → Review dashboard: reviews
README.md - Web application → Synthetic demo: routes to
frontend/src/App.tsx - FastAPI entry → Authentication routes: registers
backend/app/main.py - FastAPI entry → Verification routes: registers
backend/app/main.py - FastAPI entry → Admin review routes: registers
backend/app/main.py - Authentication routes → Authentication service: calls
backend/app/api/auth.py - Authentication service → Application database: queries users
backend/app/services/auth_service.py - Verification routes → Application service: calls
backend/app/api/idv.py - Verification routes → Private file storage: handles files
- Application service → Application database: stores applications
- Application service → Task outbox: dispatches jobs
README.md - Task outbox → Redis broker: queues tasks
README.md - Redis broker → Verification worker: dispatches task
README.md - Verification worker → Pipeline orchestrator: runs pipeline
README.md - Pipeline orchestrator → Document acceptance: runs stage
backend/app/services/pipeline/orchestrator.py - Pipeline orchestrator → Liveness screening: runs stage
backend/app/services/pipeline/orchestrator.py - Pipeline orchestrator → OCR extraction: runs stage
backend/app/services/pipeline/orchestrator.py - Pipeline orchestrator → Field normalization: runs stage
backend/app/services/pipeline/orchestrator.py - Pipeline orchestrator → Fraud and watchlist: runs stage
backend/app/services/pipeline/orchestrator.py - Pipeline orchestrator → Identity comparisons: runs stage
backend/app/services/pipeline/orchestrator.py - Pipeline orchestrator → Scoring and decision: runs stages
backend/app/services/pipeline/orchestrator.py - Pipeline orchestrator → Result recording: runs stage
backend/app/services/pipeline/orchestrator.py - Pipeline orchestrator → OCR engine: uses
backend/app/services/pipeline/orchestrator.py - OCR extraction → OCR engine: extracts text
backend/app/services/pipeline/stage_2_extraction.py - Liveness screening → Face verification: checks face
backend/app/services/pipeline/stage_1_liveness.py - Liveness screening → Passive liveness: checks frames
backend/app/services/pipeline/stage_1_liveness.py - Pipeline orchestrator → Private file storage: loads evidence
backend/app/services/pipeline/orchestrator.py - Private file storage → Document and selfie files: reads and writes
backend/app/utils/storage.py - Result recording → Pipeline evidence model: records result
- Pipeline evidence model → Application database: persists evidence
backend/app/models/pipeline_result.py - Application database → PostgreSQL: connects
backend/app/database.py - Admin review routes → Application database: reads review data
backend/app/api/admin.py - Admin review routes → Pipeline evidence model: serializes result
backend/app/api/admin.py - Status and evidence → Verification routes: reads status
- Review dashboard → Admin review routes: requests review