Skip to content

sehgal-vip/FieldAgentVerify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Turno Collection Agent Verification System

A QR code-based verification system that allows customers to verify the identity of Turno collection agents at their door.

Overview

Customers scan a QR code on the agent's ID card → Opens a mobile-friendly verification page showing agent details with a "Verified Agent" badge.

Features

  • Instant Verification — Scan QR → see agent details in <2 seconds
  • Trust Indicators — Verified badge, validity date, Turno branding
  • Mobile-First — Works on any smartphone browser
  • Bilingual — English/Hindi language toggle
  • Secure URLs — Agent IDs encrypted with AES-256
  • QR Generator — Internal tool for single & bulk QR code generation

Project Structure

FieldAgentVerify/
├── index.html              # Verification page (customer-facing)
├── 404.html                # Error page for invalid/inactive agents
├── css/
│   └── styles.css          # Main stylesheet
├── js/
│   ├── crypto.js           # AES encryption/decryption utilities
│   ├── api.js              # API integration (placeholder)
│   ├── verify.js           # Verification page logic
│   └── translations.js     # Hindi/English translations
├── tools/
│   └── qr-generator.html   # Internal QR code generator tool
├── assets/
│   └── (logos, images)
└── README.md

Setup

1. Clone/Download the project

cd FieldAgentVerify

2. Configure the encryption key

Edit js/crypto.js and replace the placeholder key:

const SECRET_KEY = 'your-32-character-secret-key-here';

⚠️ Important: Use the same key in both the QR generator and verification page.

3. Configure API endpoint

Edit js/api.js and update the API endpoint:

const API_BASE_URL = 'https://your-api-endpoint.com';

4. Deploy

Upload all files to your web server. The verification page should be accessible at:

https://turno.club/agent/{encrypted_agent_id}

Usage

Customer Verification Flow

  1. Customer scans QR code on agent's ID card
  2. Browser opens turno.club/agent/{encrypted_id}
  3. Page decrypts the ID and fetches agent data from API
  4. Displays agent details with verified badge (or 404 if invalid)

QR Code Generator (Internal Tool)

Access: tools/qr-generator.html

Single Generation

  1. Enter employee ID (e.g., TRN-COL-001)
  2. Click "Generate QR Code"
  3. Download the QR code image

Bulk Generation

  1. Prepare a CSV file with employee IDs (one per line or comma-separated)
  2. Upload the CSV file
  3. Click "Generate All"
  4. Download individual QR codes or all as ZIP

API Integration

The system expects an API endpoint that returns agent data in this format:

Request

GET /api/agents/{employee_id}

Response (Success)

{
  "success": true,
  "data": {
    "name": "Rajesh Kumar",
    "employeeId": "TRN-COL-001",
    "designation": "Senior Collection Agent",
    "zone": "Koramangala, Bangalore",
    "contact": "+91 98XXX XXX45",
    "photoUrl": "https://example.com/photos/rajesh.jpg",
    "validSince": "2025-01-01",
    "isActive": true
  }
}

Response (Not Found)

{
  "success": false,
  "error": "Agent not found"
}

URL Format

Verification URL

https://turno.club/agent/{encrypted_employee_id}

Example:

  • Employee ID: TRN-COL-001
  • Encrypted: U2FsdGVkX1... (AES-256 encrypted, Base64 encoded)
  • Full URL: https://turno.club/agent/U2FsdGVkX1...

Security

  • AES-256 Encryption — Employee IDs are encrypted before embedding in QR codes
  • No Direct ID Exposure — Customers cannot guess agent IDs
  • Server-Side Validation — API validates agent existence and active status
  • Masked Contact — Phone numbers partially hidden for privacy

Customization

Branding

  • Update logo in assets/ folder
  • Modify colors in css/styles.css (CSS variables at top)

Translations

  • Edit js/translations.js to modify Hindi/English text

Customer Care Number

  • Update in js/translations.js:
supportNumber: '+91 1800-XXX-XXXX'

Browser Support

  • Chrome (Android/iOS) ✓
  • Safari (iOS) ✓
  • Firefox ✓
  • Samsung Internet ✓
  • Any modern browser with camera access

Error Handling

Scenario User Sees
Invalid/expired QR 404 page with support contact
Agent deactivated 404 page with support contact
Network error Retry message with support contact
Corrupted QR data 404 page with support contact

License

Internal use only - Turno Pvt. Ltd.

About

QR code-based verification system for Turno collection agents

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors