An mDL Verifier (Mobile Driver’s License Verifier) built using React allows secure digital identity verification by scanning and retrieving data from a mobile device. The verifier interfaces with the user's mobile driver's license (stored on their smartphone) using QR codes and Bluetooth (BLE) technology to authenticate the individual’s identity. The React-based interface ensures smooth interaction, handling camera permissions, real-time QR code scanning, and device compatibility, all while ensuring data privacy and security. This setup is ideal for scenarios requiring fast, contactless identity verification, such as airport check-ins or secure entry points.
- Prerequisites: Ensure you have Node.js v20 installed. If you don't, you can download and install it from the official Node.js website.
You can verify the installed version by running the following command in your terminal:
# node -vIf you already have Node.js installed but need to upgrade to version 20, you can use tools like nvm to manage Node.js versions:
# nvm install 20
# nvm use 20- Clone the Repository: Clone this repository to your local machine by running:
# git clone git@github.com:DTLab-LabCN/DTT-mDL-Testing.git
# cd DTT-mDL-Testing- Install Dependencies: Once inside the project folder, install all the required dependencies by running:
# npm install --forceAlternatively, you can run npm install --legacy-peer-deps. Both --force and --legacy-peer-deps flags are used to ignore or force dependency resolutions (i.e. to bypass peer dependency conflicts).
For more information, see the Note on Dependencies section.
- Start the Development Server: After the dependencies are installed, you can start the Vite development server:
# npm run devThis will start the application, and you can access it by opening your browser and visiting:
- Build for Production: To build the app for production, run the following command:
# npm run buildThe build files will be generated in the ./dist directory.
- Preview the Production Build: If you want to test the production build locally, you can preview it using Vite’s preview feature:
# npm run previewThis will serve the production build locally on a server, allowing you to test the final output by visiting:
The react-qr-reader library is no longer maintained, and due to their outdated React version, the --force flag is required when running npm install.
Consider replacing it with another library that is actively maintained or has better support for QR code scanning, such as: