Skip to content

Document Reader SDK Architecture

Welcome to our in-depth exploration of the Document Reader SDK architecture. Whether you're working on a mobile, web, or desktop application, understanding the inner workings of our SDK will empower you to harness its capabilities to the fullest.

Mobile SDK

The API framework provides the external interface for controlling the process and getting the result. It depends on the Common framework that is an interface for working with the camera and other modules that are used in other Regula SDKs.

The Core framework provides the recognition functionality where all the processing happens. This is the internal framework, it is used by the API framework only and is not accessible for developers. However, it should be referenced in the project.

Resources contain the documents' data. They are mandatory to have if you use the Core type that supports document type recognition.

All processing is performed completely offline, no data leaves your mobile device. There is no need to have the Web Service running.

We provide solutions for both Native and Hybrid apps:

As NFC is required to perform RFID chip processing, it's available only on mobile devices using the Document Reader SDK for Mobile. Browsers don't support it yet.

Web Components

Web Components let you add document verification to your website. Web Components capture a document from the device camera or process an uploaded image, crop the image by the document boundaries, recognize the Machine Readable Zone (MRZ) and barcodes.

The Web Components package contains UI Web Components and Document Reader SDK.

UI Web Components are intended to recognize identity documents with built-in user interface;

Document Reader SDK is intended to recognize identity documents and allows creating your own user interface.

During document processing, these components interract with the Document Reader Service, which in turn communicates with WebAssembly (WASM).

WebAssembly (WASM) provides the recognition functionality where all the processing happens.

As Web Components don't support Document Type and Visual Zone recognition, once the processing is completed, you can send an image taken by Web Components to Web Service for further processing.

Web Service

Block diagram of the Document Reader Web Service data recording to the Storage

The Web Service operates via an HTTP/S protocol. It receives a request and invokes the Core library that processes this request. When the Core library returns the results, they are sent back by the Web Service.

The Document Reader Web Service is distributed as:

To use the Web Service, you need to send an image and processing parameters via API. Here is the OpenAPI specification.

To simplify the integration and further maintenance, we supply API clients for popular programming languages. There are four API clients:

  • JavaScript client for the browser and node.js based on axios
  • Java client compatible with jvm and Android
  • Python 3.5+ client
  • C# client for .NET & .NET Core

There is a possibility to collect data to the storage after the processing ends.

How to connect Storage

Complete Server-Side Verification

Complete Server-Side Verification is an additional layer of protection against fraud. While it's true that all authenticity checks can be successfully completed on smartphones and edge devices, Regula Mobile SDK might not suffice. There's a potential risk of verification results being intercepted and modified by fraudsters directly on the same device.

In the "zero trust to mobile" approach, we introduce Complete Server-Side Verification. While the RFID chip reading is performed on the mobile via NFC, the Regula Web Service becomes engaged in generating session keys and challenges, which are subsequently saved to Storage and Database. Documents' data, devices' metadata, transaction information are also saved in Storage and Database. During the reprocessing, the Regula Web Service fetches the data from Storage and Database. Once the reprocessing is completed, you can then determine whether you should trust the mobile results or not.

How to activate Complete Server-Side Verification.

Integration with Face SDK

Integration with Face SDK adds an automatic face match and search by a portrait taken from the document (Visual Zone and RFID-chip) or a live owner photo. If it's configured in the settings, face match and search are started once the document processing is completed.

How to activate Integration with Face SDK on Mobile.

How to activate Integration with Face SDK on Web.

Next Steps