Civic identity verification for Libya
# 3ain (عين)
**Civic identity verification for Libya — face recognition and license plate recognition in one platform.**
## Overview
Libya's civic infrastructure lacks accessible digitized identity verification. Citizens interact with government offices that rely on manual checks — holding up an ID card, comparing a photo, reading a plate number by hand. The gap between physical identity documents and digital systems creates friction at every checkpoint, registration desk, and traffic stop.
3ain bridges that gap with computer vision.
## Problem
Two verification needs dominate Libyan civic life:
1. **Who is this person?** — manual photo-on-ID comparison fails at scale, has no audit trail, and is trivially defeated by a printed photo
2. **What vehicle is this?** — plate numbers are handwritten into ledgers, cross-referencing against registration databases requires phone calls or trips to government offices
Both problems share the same root: no real-time, camera-first system that can take a photo and return a verified identity in seconds.
## Solution
Three components, one platform:
- **`apps/web`** — facial recognition identity verification. Captures a face photo via device camera, runs DeepFace analysis (age, gender, race, emotion), matches against a citizen database using ArcFace embeddings, and returns verified identity. Arabic UI with full RTL layout.
- **`apps/vehicle`** — license plate recognition. Captures a vehicle photo, detects the car via YOLO object detection, crops and isolates the license plate, runs OCR to extract the plate number, and cross-references against registration data. Arabic UI.
- **`backend`** — FastAPI server powering the facial recognition pipeline. Accepts base64 images, runs DeepFace analysis + face matching against a local database, returns structured identity results.
## Impact
Both apps are **deployed on Vercel** and operational:
- **Identity verification**: deployed at 3ain-sigma.vercel.app
- **Vehicle recognition**: dep …