VDS Check-in WebApp Developer Guide
Set up, run, and customize the VDS Check-in Demo Web Application for mDL identity verification using Tap2iD devices.
Introduction
1.1 Objective
The objective of this documentation is to guide developers in setting up a local development environment for the VDS Check-in demo web application and to guide them to customize the application as per their needs.
1.2 Target Audience
The primary audience includes Tap2iD device integrators and their developers who are involved in building mDL (mobile driver's license) compliant solutions using Tap2iD devices. It is designed for individuals and teams seeking to understand, implement, and customize the VDS demo web app in the context of identity verification using Tap2iD Verifiers.
1.3 Assumptions
It is assumed that the document readers are familiar with the following:
- Understanding of digital identification, mobile driver's licenses (mDL), and familiarity with ISO mDL 18013-5 specifications.
- Knowledge of the Tap2iD system, Verifier Device Service (VDS), and the process of verifying mDL using Tap2iD.
- Prior experience with the Tap2iD VDS Interface Control Document (ICD).
- Knowledge of software development tools such as GitHub, IDEs, Postman, etc.
Application Overview
2.1 VDS Check-in Demo Web Application
This web app is built to demonstrate the capabilities of Tap2iD reader and how to integrate customer business applications requiring ID verification. We use Tap2iD to scan and send mDL Holder's details to this web app.
- Serves as an identity verification tool for mDL holders, allowing quick and accurate confirmation of their identity.
- Supports various forms of driving license verification โ digital format (mDL) or 2D barcode (PDF417) โ ensuring flexibility.
- Seamlessly integrates with Tap2iD devices, effortlessly transferring DL details for instant access and verification.
- Users have the flexibility to customize the app and integrate it into mDL-compliant solutions.
2.2 Application Architecture
VDS Health Check
Before setting up the VDS Demo Web App, verify that VDS is running by invoking a VDS API on an API testing platform. We use Postman as the primary platform, though developers are free to use any API testing tool of their choice.
3.1 Setup Postman
Download Postman from https://www.postman.com/downloads/
3.2 Create a New API Request for GetReaderInfo API
Create a new GET request with the following URL:
https://localhost:4215/verifier-sdk/reader/info
Installation and Setup
4.1 Prerequisites
- Modern web browser โ Google Chrome, Microsoft Edge, or Mozilla Firefox
- IDE โ VS Code (recommended) or any other IDE of your choice
- Node.js & NPM โ Download from nodejs.org according to your OS
4.2 Setting Up the Project Locally
To get the web app on your local system, use one of the following two options:
Clone the Remote Repository
Open a terminal, navigate to your desired location, and run:
git clone https://github.com/CredenceID/vds-webapp.git
Download the Zip File
Visit the GitHub Repository, choose Download Zip, and extract the files to your preferred location. Make sure you download the main branch code.
4.3 Installing the Project Dependencies
The project contains separate backend and frontend folders. The backend uses Node.js and the frontend uses React.js. Follow the steps below to install all dependencies.
Open Project in IDE
Open the web app folder in VS Code or your preferred IDE.
Install Frontend Dependencies
Open the terminal in the IDE, navigate to the frontend directory, and run:
cd vds-frontend
npm install
Install Backend Dependencies
Open a new terminal, navigate to the backend directory, and run:
cd vds-backend
npm install
Build the Frontend Code
Navigate back to the terminal in the frontend folder and run:
npm run build
build folder is created after this step containing all compiled dependencies.Starting the Web App
With dependencies installed and the frontend built, start the local server:
Start the Backend Server
Navigate to the terminal where the backend folder is open and run:
node index.js
Open in Browser
Open the following URL in your browser:
http://localhost:3000
Code Overview
6.1 Backend
The backend is built using JavaScript with the Node.js runtime. The entry point is index.js, which includes:
- SQLite3 Database โ Stores Holder Document number and check-in timestamp. When a Holder checks in, the document number is searched to verify if the Holder is already checked in.
- Cron Job โ Uses
node-cronpackage. Scheduled to run every minute to clear holder demo data from the DB after 30 minutes. - Express Web Server โ Listens on port
3000for incoming requests. Frontend code is deployed on this server. - REST APIs โ Provide an interface to database operations and a bridge for the UI to interact with the backend.
6.2 Frontend
Inside the src folder, the following structure is present:
Unavailability of Tap2iD and VDS
If you don't have access to Tap2iD and VDS, you can mock the VDS APIs using Mockoon. Download from https://mockoon.com
# From the frontend directory
npm run build
# From the backend directory
node index.js
Mockoon Setup Steps
Click each step to expand the details.
Launch Mockoon after installation.
Click New Environment in Mockoon.
Set any name for your environment and configure the port along with the URL path (e.g., port 4215).
Configure the headers for the API responses in the environment settings.
Click Add Route โ HTTP Route. Set the method, endpoint path, response status, response body, and response headers. Use the VDS Interface Control Document (ICD) as a reference for request/response shapes. Repeat for all required API endpoints.
Start the Mockoon environment. Verify using Postman with a GET request to http://localhost:4215/verifier-sdk/reader/info โ it should return 200 OK with the mocked response body.
Customization of the WebApp
8.1 Customizing the Logo
Add Image to Assets
Place your image file in the following assets folder:
vds-webapp/vds-frontend/src/assets/images/
Update the Image Path
Change the src attribute of the img tag to point to your new image:
<img src="../../assets/images/your_image_name.png" />
8.2 Customizing Text, Images, and Alert Messages
Home Page
Navigate to vds-frontend/src/containers/dashboard/dashboard.jsx. Replace the text in the paragraph tag and customize the two buttons as needed.
Check-in Page
Navigate to vds-frontend/src/components/informationModal/InformationModel.jsx. Replace the text in the related span tag. To swap gifs or images, add your files to the assets/images folder and update the src attribute of the img tag.
Check-in / Message Page
Navigate to vds-frontend/src/components/informationModal/InformationModal.jsx. Different messages are set inside the getIdentityInfo() API handler function for each API response type. Update the catch block to change the error message.
Settings Page
Navigate to vds-frontend/src/containers/settings/Settings.jsx to customize input fields, alert messages, and other settings.
Contact and Support
If you have any questions, encounter issues, or need assistance with our web app, please don't hesitate to reach out to our support team.
- Email: support@credenceid.com
- Subject: Support for VDS Demo Web App