How harish2008-code/border-sentinel works
Border Sentinel screens travel-document images, optionally with a live photo, and returns an auditable risk assessment for analyst review. The principal flow is upload through the web interface or JSON API, pipeline orchestration of extraction, validation, forensics, biometrics and identity checks, risk scoring, persistence, and report rendering. The README also documents camera capture, watchlist administration, email confirmation, and synthetic demo-document generation. Edges follow documented pipeline wiring and indexed references; unshown internal details are omitted rather than inferred.
Main entry points: pipeline.py Screening orchestrator · views.py Web views · models.py Screening records · api.py JSON API
Components 19
Intake and review
- Web interface
screening/templates/screening - Web views
screening/views.py - JSON API
screening/api.py - Camera capture
screening/camera.py - Demo document generator
screening/synthetic.py
Screening pipeline
- Screening orchestrator
screening/pipeline.py - OCR extraction
screening/ocr_engine.py - MRZ parsing
screening/mrz.py - Document validation
screening/rules.py - Tamper forensics
screening/tamper.py - Risk scoring
screening/scoring.py - Analyst overlay
screening/annotate.py
Identity verification
- Face biometrics
screening/faces.py - Identity lookup
screening/db_verify.py - Email confirmation
screening/email_verify.py
Records and audit
- Screening records
screening/models.py
External services
- Identity MySQL
- SMTP service
Other components
- Traveller / analyst
Connections 23
- Traveller / analyst → Web interface: uploads document
README.md - Web interface → Web views: submits screening
README.md - Traveller / analyst → JSON API: submits upload
README.md - Web views → Screening orchestrator: runs screening
screening/views.py - JSON API → Screening orchestrator: runs screening
screening/api.py - Traveller / analyst → Camera capture: captures photo
README.md - Screening orchestrator → OCR extraction: extracts fields
README.md - OCR extraction → MRZ parsing: parses MRZ
screening/ocr_engine.py - Screening orchestrator → Document validation: validates fields
screening/pipeline.py - Screening orchestrator → Tamper forensics: checks tampering
README.md - Screening orchestrator → Face biometrics: compares faces
README.md - Screening orchestrator → Identity lookup: looks up identity
screening/pipeline.py - Identity lookup → Identity MySQL: queries records
README.md - Screening orchestrator → Email confirmation: starts confirmation
README.md - Email confirmation → SMTP service: sends email
README.md - Traveller / analyst → SMTP service: responds by link
README.md - Screening orchestrator → Risk scoring: combines risk
README.md - Screening orchestrator → Screening records: persists decision
README.md - Screening orchestrator → Analyst overlay: renders overlay
README.md - Web views → Screening records: reads and updates
screening/views.py - JSON API → Screening records: serves record data
screening/api.py - Screening records → Web views: provides report data
screening/views.py - Demo document generator → Traveller / analyst: generates demo corpus
README.md