Skip to content

Latest commit

ย 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Aadhaar QR Code Reader โ€” Banner

๐Ÿ‡ฎ๐Ÿ‡ณ Aadhaar QR Code Reader

Scan the Secure QR on any Aadhaar card to instantly verify identity details โ€” 100 % offline, no server, no data leaves your device.

Deploy to GitHub Pages License: PRs Welcome


โœจ Features

Feature Details
๐Ÿ“ท Live camera scan Uses the rear camera on mobile, front on desktop
๐Ÿ–ผ๏ธ Image upload Pick any photo containing an Aadhaar QR from your gallery
๐Ÿ”’ 100 % offline All decoding happens in the browser โ€” zero network requests
๐Ÿชช Full card details Name, DOB, gender, address, mobile last-4, email (if present), issue date
๐Ÿƒ 3D card flip Front (personal) โ†” Back (address) card flip animation
๐Ÿ”— Shareable URL Result is encoded in ?data= so links can be bookmarked
๐Ÿ“ฑ Mobile-first Works on iOS Safari, Android Chrome, and desktop browsers

๐Ÿ“ธ Screenshots

Scanner Verified Result (Front) Verified Result (Back)
Scanner screen Result front Result back
Point camera at any Aadhaar QR Personal details on the front face Address & reference date on the back

๐Ÿš€ Getting Started

Option 1 โ€” GitHub Pages (live demo)

Open the live deployment in your browser โ€” no install needed:

https://PtPrashantTripathi.github.io/AadhaarQRCodeReader/

Option 2 โ€” Run locally

# 1. Clone the repository
git clone https://github.com/PtPrashantTripathi/AadhaarQRCodeReader.git
cd AadhaarQRCodeReader

# 2. Serve with any static server (the app uses ES Modules, so file:// won't work)
npx serve .
# โ€” or โ€”
python3 -m http.server 8080

# 3. Open http://localhost:8080 in your browser

Why a server? ES Module import statements require http:// or https://. Opening index.html directly via file:// will fail with a CORS error.


๐Ÿ” How to Use

Scanning with camera

  1. Open the app in your browser.
  2. Tap Start Camera โ€” grant camera permission when prompted.
  3. Point the rear camera at the Secure QR code printed on an Aadhaar card or letter (the large QR, not the small one).
  4. Hold steady โ€” the green scan line detects the code automatically.
  5. The app redirects to ?data=โ€ฆ and shows the verified card result.
  6. Tap Flip Card to toggle between personal details and the address.
  7. Tap Scan Again to return to the scanner.

Scanning from an image

  1. Tap Upload instead of Start Camera.
  2. Select any photo (gallery, screenshot, scanned document) that contains the Aadhaar Secure QR.
  3. The app analyses the image instantly and shows the result.

Using the ?data= URL

If you already have the raw QR string (base-10 decimal), append it to the URL:

https://PtPrashantTripathi.github.io/AadhaarQRCodeReader/?data=<qr-value>

The page will decode and render the card without opening the camera.


๐Ÿ—๏ธ Project Structure

AadhaarQRCodeReader/
โ”œโ”€โ”€ index.html                   # App shell
โ”œโ”€โ”€ css/
โ”‚   โ”œโ”€โ”€ base.css                 # Design tokens, layout, typography
โ”‚   โ””โ”€โ”€ components.css           # Scanner, card, buttons, animations
โ”œโ”€โ”€ script/
โ”‚   โ”œโ”€โ”€ main.js                  # App entry point, view orchestration
โ”‚   โ”œโ”€โ”€ modules/
โ”‚   โ”‚   โ”œโ”€โ”€ aadhaar.js           # Aadhaar Secure QR decoder (gzip + fields)
โ”‚   โ”‚   โ”œโ”€โ”€ camera.js            # Camera controller & file-upload QR scan
โ”‚   โ”‚   โ””โ”€โ”€ jpeg_decoder.js      # JPEG 2000 photo decode via openjpeg WASM
โ”‚   โ””โ”€โ”€ utils/
โ”‚       โ”œโ”€โ”€ bytes.js             # decimalToBytes, gunzip
โ”‚       โ”œโ”€โ”€ dom.js               # setStatus (status-bar helper)
โ”‚       โ””โ”€โ”€ format.js            # formatAadhaarNumber, extractComment
โ”œโ”€โ”€ images/                      # Icons, card backgrounds, emblems
โ”œโ”€โ”€ .github/
โ”‚   โ””โ”€โ”€ workflows/
โ”‚       โ””โ”€โ”€ pages.yml            # GitHub Pages CI/CD deployment
โ”œโ”€โ”€ .gitignore
โ””โ”€โ”€ README.md

๐Ÿ” Privacy & Security

  • No network calls โ€” the app makes zero requests after the initial page load.
  • No storage โ€” nothing is written to localStorage, sessionStorage, or cookies.
  • Client-side only โ€” all decoding (gzip, field parsing, JPEG 2000) happens in the browser using Web APIs and WebAssembly.
  • The ?data= URL parameter contains the raw QR payload โ€” treat it like the physical card (don't share publicly).

๐Ÿ› ๏ธ Tech Stack

Library Purpose Loaded from
jsQR QR code detection from pixel data jsDelivr CDN
openjpeg.js JPEG 2000 decode (Emscripten) jsDelivr CDN

No build tools, no frameworks, no transpilation โ€” vanilla ES Modules.


๐Ÿ“„ License

GNU GPL3 ยฉ Prashantt Tripathi


Made with โค๏ธ by @PtPrashantTripathi

About

๐Ÿ‡ฎ๐Ÿ‡ณ Offline Aadhaar QR Reader โ€” scan or upload any Aadhaar card, no server, no data leak.

Topics

Resources

Code of conduct

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages