Skip to main content

01 / experience / uidai

Inside the Air-Gapped Aadhaar Pipeline.

Unique Identification Authority of India (UIDAI / Aadhaar) • Software Developer Intern (June 2026 – September 2026)

Engineering an air-gapped multilingual document parsing system, hybrid vector search engine, and high-throughput ETL data pipeline for 4.2M records without external cloud dependencies.

PythonFastAPIOpenCVTesseract OCRFAISSBM25SQLite WALOllamaWebSocketsAir-Gapped Systems
01The Engineering Reality

The Engineering Reality: Air-Gapped Constraints

The Aadhaar ecosystem operates under stringent air-gapped security guidelines. There are no external cloud calls, no managed vector database clusters, and no commercial API keys. Every binary, neural network weight, and database engine must execute locally inside an isolated network perimeter.
02The OCR Problem

The OCR Problem: 50MB Scanned PDFs Across 12 Languages

Incoming documents arrived as heavy multi-page scans with varying DPI, coffee-cup ring stains, and skewed orientations. To extract usable text across 12 distinct Indic scripts (including Devanagari, Bengali, Tamil, Telugu, and Gurmukhi), we built an OpenCV preprocessing pipeline: - Adaptive thresholding and morphological deskewing. - Connected-component noise removal to clean speckled backgrounds. - Custom Tesseract OCR tiling that splits heavy scans into manageable bounding boxes, preventing memory blow-ups on 50MB files.
04High-Throughput SQLite WAL ETL Pipeline

High-Throughput SQLite WAL ETL Pipeline

Operators frequently uploaded 100,000-row tracking workbooks. Initial attempts to parse these synchronously blocked the event loop. We re-engineered the ingest with: - FastAPI background worker tasks streaming live progress updates over WebSockets. - Direct streaming with openpyxl in read-only mode to avoid loading whole sheets into RAM. - SQLite configured with WAL mode (Write-Ahead Logging), synchronous=NORMAL, and 5,000-row batch transactions. Ingestion time dropped from over 4 minutes to 5–15 seconds.
05Security & Access Control

Security & Access Control

For 1,000+ operators, we implemented scoped JWT authentication with bcrypt password hashing and row-level SQLite query guards, ensuring regional operators could only query records within their assigned administrative boundaries.
06Postmortem

Lessons from the trenches

  • –Edge and on-premise AI requires defensive programming against memory leaks. Always test with production-sized 50MB PDFs, not clean 1-page sample files.
  • –SQLite WAL with chunked batching is capable of enterprise-scale ingestion on commodity hardware.
  • –Hybrid search (dense vector + sparse keyword) is mandatory for document systems with real numbers and codes.
Next

Keep exploring