Skip to content

ChaudaryHammad/PassSense

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PassSense

Passport MRZ scanner and personal vault. Upload a passport photo, crop the Machine Readable Zone in the browser, extract structured fields, save them to your account, and export PDFs.

Live demo: pass-sense.vercel.app


Stack

Layer Tech
Frontend React, Tailwind CSS, Framer Motion, Tesseract.js, Cropper.js
Backend Node.js, Express, Prisma, JWT cookies, Nodemailer
Database PostgreSQL (Supabase)

OCR runs in the browser. Only the fields you choose to save are sent to the API.


Features

  • Account signup, sign-in, password reset
  • Email OTP verification before saving scans / opening the library
  • Client-side MRZ scan flow (upload → crop → extract → review)
  • Passport library with search, filters, edit, delete
  • Bulk and single-passport PDF export
  • Public marketing pages (home, guide, privacy, terms); library requires a verified account

Project structure

PassSense/
├── backend/          # Express API + Prisma
│   ├── config/       # Env loader (config/.env)
│   ├── controller/
│   ├── prisma/
│   └── ...
├── frontend/         # React app
├── images/           # README screenshots
└── README.md

Prerequisites

  • Node.js 18+
  • npm
  • A Postgres database (e.g. Supabase) with connection strings

Setup

1. Backend

cd backend
npm install
cp config/.env.example config/.env
cp .env.example .env

Edit both env files with your secrets and database URLs (see below). Then:

npm run db:generate
npm run db:push
npm run dev

API defaults to http://localhost:5000.

2. Frontend

cd frontend
npm install
cp .env.example .env
npm start

App runs at http://localhost:3000.


Environment variables

Backend — backend/config/.env

Loaded by the Express app in development:

PORT=5000
NODE_ENV=DEVELOPMENT
Client_URL=http://localhost:3000

JWT_SECRET=change-me-to-a-long-random-string
JWT_EXPIRES_IN=7d

DATABASE_URL=postgresql://USER:PASSWORD@HOST:6543/postgres?pgbouncer=true
DIRECT_URL=postgresql://USER:PASSWORD@HOST:5432/postgres

SMTP_HOST=smtp.gmail.com
SMTP_PORT=465
SMTP_EMAIL=
SMTP_PASSWORD=
FROM_NAME=PassSense
FROM_EMAIL=

Backend — backend/.env

Used by the Prisma CLI (db:push, generate). Keep DATABASE_URL / DIRECT_URL aligned with config/.env.

Frontend — frontend/.env

REACT_APP_API_URL=http://localhost:5000

Copy from the *.env.example files. Never commit real .env files.


Scripts

Backend

Command Description
npm run dev Start API with nodemon
npm start Start API
npm run db:generate Generate Prisma client
npm run db:push Push schema to the database

Frontend

Command Description
npm start Dev server
npm run build Production build

Screenshots

Home

Home

Guide

Guide

Scan

Scan

Library

Library


Contributing

Issues and pull requests are welcome. Open an issue to discuss larger changes first.


License

MIT — see LICENSE.

Contact

hammad.node@gmail.com

About

PassSense is an advanced web application designed to simplify and streamline passport management. With state-of-the-art technology, it detects, scans, and parses the Machine Readable Zone (MRZ) of passports, providing accurate and efficient data extraction.

Topics

Resources

License

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors