Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
24 changes: 20 additions & 4 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,25 @@
"commit": false,
"fixed": [
[
"@microblink/blinkid*"
"@microblink/blinkid",
"@microblink/blinkid-core",
"@microblink/blinkid-ux-manager",
"@microblink/blinkid-wasm",
"@microblink/blinkid-worker"
],
[
"@microblink/blinkcard*"
"@microblink/blinkid-verify",
"@microblink/blinkid-verify-core",
"@microblink/blinkid-verify-ux-manager",
"@microblink/blinkid-verify-wasm",
"@microblink/blinkid-verify-worker"
],
[
"@microblink/blinkcard",
"@microblink/blinkcard-core",
"@microblink/blinkcard-ux-manager",
"@microblink/blinkcard-wasm",
"@microblink/blinkcard-worker"
]
],
"access": "public",
Expand All @@ -16,6 +31,7 @@
"ignore": [
"@microblink/*-example",
"@microblink/*-qa-app",
"@microblink/*-test"
]
"@microblink/*-test",
"github-release"
]
}
11 changes: 9 additions & 2 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org/'
node-version: "24"
registry-url: "https://registry.npmjs.org/"

- name: Setup pnpm
uses: pnpm/action-setup@v4
Expand Down Expand Up @@ -84,6 +84,13 @@ jobs:
"@microblink/blinkcard"
)
;;
"@microblink/blinkid-verify")
PACKAGES=(
"@microblink/blinkid-verify-core"
"@microblink/blinkid-verify-ux-manager"
"@microblink/blinkid-verify"
)
;;
*)
echo "skip_publish=true" >> "$GITHUB_OUTPUT"
echo "skip_reason=Release name does not contain a supported package name before the last @." >> "$GITHUB_OUTPUT"
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ Have questions, feedback, or running into issues? We're here to help! Contact us
| [@microblink/blinkid](https://github.com/microblink/web-sdks/tree/main/packages/blinkid) | [![npm](https://img.shields.io/npm/v/@microblink/blinkid.svg)](https://www.npmjs.com/package/@microblink/blinkid) | [CHANGELOG](https://github.com/microblink/web-sdks/blob/main/packages/blinkid/CHANGELOG.md) |
| [@microblink/blinkid-core](https://github.com/microblink/web-sdks/tree/main/packages/blinkid-core) | [![npm](https://img.shields.io/npm/v/@microblink/blinkid-core.svg)](https://www.npmjs.com/package/@microblink/blinkid-core) | [CHANGELOG](https://github.com/microblink/web-sdks/blob/main/packages/blinkid-core/CHANGELOG.md) |
| [@microblink/blinkid-ux-manager](https://github.com/microblink/web-sdks/tree/main/packages/blinkid-ux-manager) | [![npm](https://img.shields.io/npm/v/@microblink/blinkid-ux-manager.svg)](https://www.npmjs.com/package/@microblink/blinkid-ux-manager) | [CHANGELOG](https://github.com/microblink/web-sdks/blob/main/packages/blinkid-ux-manager/CHANGELOG.md) |
| [@microblink/blinkid-verify](https://github.com/microblink/web-sdks/tree/main/packages/blinkid-verify) | [![npm](https://img.shields.io/npm/v/@microblink/blinkid-verify.svg)](https://www.npmjs.com/package/@microblink/blinkid-verify) | [CHANGELOG](https://github.com/microblink/web-sdks/blob/main/packages/blinkid-verify/CHANGELOG.md) |
| [@microblink/blinkid-verify-core](https://github.com/microblink/web-sdks/tree/main/packages/blinkid-verify-core) | [![npm](https://img.shields.io/npm/v/@microblink/blinkid-verify-core.svg)](https://www.npmjs.com/package/@microblink/blinkid-verify-core) | [CHANGELOG](https://github.com/microblink/web-sdks/blob/main/packages/blinkid-verify-core/CHANGELOG.md) |
| [@microblink/blinkid-verify-ux-manager](https://github.com/microblink/web-sdks/tree/main/packages/blinkid-verify-ux-manager) | [![npm](https://img.shields.io/npm/v/@microblink/blinkid-verify-ux-manager.svg)](https://www.npmjs.com/package/@microblink/blinkid-verify-ux-manager) | [CHANGELOG](https://github.com/microblink/web-sdks/blob/main/packages/blinkid-verify-ux-manager/CHANGELOG.md) |
| [@microblink/blinkcard](https://github.com/microblink/web-sdks/tree/main/packages/blinkcard) | [![npm](https://img.shields.io/npm/v/@microblink/blinkcard.svg)](https://www.npmjs.com/package/@microblink/blinkcard) | [CHANGELOG](https://github.com/microblink/web-sdks/blob/main/packages/blinkcard/CHANGELOG.md) |
| [@microblink/blinkcard-core](https://github.com/microblink/web-sdks/tree/main/packages/blinkcard-core) | [![npm](https://img.shields.io/npm/v/@microblink/blinkcard-core.svg)](https://www.npmjs.com/package/@microblink/blinkcard-core) | [CHANGELOG](https://github.com/microblink/web-sdks/blob/main/packages/blinkcard-core/CHANGELOG.md) |
| [@microblink/blinkcard-ux-manager](https://github.com/microblink/web-sdks/tree/main/packages/blinkcard-ux-manager) | [![npm](https://img.shields.io/npm/v/@microblink/blinkcard-ux-manager.svg)](https://www.npmjs.com/package/@microblink/blinkcard-ux-manager) | [CHANGELOG](https://github.com/microblink/web-sdks/blob/main/packages/blinkcard-ux-manager/CHANGELOG.md) |
Expand Down
13 changes: 9 additions & 4 deletions apps/examples/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# BlinkID and BlinkCard Example Applications
# BlinkID, BlinkCard, and BlinkID Verify Example Applications

This directory contains example applications demonstrating the capabilities of the BlinkID and BlinkCard SDKs.
This directory contains example applications demonstrating the capabilities of the BlinkID, BlinkCard, and BlinkID Verify SDKs.

## Available Examples

Expand All @@ -23,6 +23,11 @@ This directory contains example applications demonstrating the capabilities of t
- [Camera Manager](./camera-manager/): An example of how to use the camera manager.
- [Camera Selection](./camera-selection/): An example of how to use the camera selection feature.

### BlinkID Verify

- [BlinkID Verify Simple](./blinkid-verify-simple/): A simple example of how to use the BlinkID Verify SDK.
- [BlinkID Verify Advanced Setup](./blinkid-verify-advanced-setup/): Demonstrates advanced setup and customization of the BlinkID Verify SDK.

## Getting Started

To run any of the example applications, follow these steps:
Expand All @@ -45,11 +50,11 @@ pnpm build:packages

### 3. Set up the License Key

BlinkID and BlinkCard example applications require a license key to run. You can obtain a free trial license key by registering on the [Microblink Developer Hub](https://developer.microblink.com/license/new).
BlinkID, BlinkCard, and BlinkID Verify example applications require a license key to run. You can obtain a free trial license key by registering on the [Microblink Developer Hub](https://developer.microblink.com/license/new).

After obtaining the license key, create a `.env.local` file in the root of the specific example application you want to run (e.g., `apps/examples/blinkid-simple/.env.local`) and add the following line:

```
```env
VITE_LICENCE_KEY=your-license-key
```

Expand Down
7 changes: 7 additions & 0 deletions apps/examples/blinkid-verify-advanced-setup/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# For development, create a .env.local or a .env.production using this template
# Never put your licence key in this file as it will be commited

# https://vitejs.dev/guide/env-and-mode.html#env-files


VITE_LICENCE_KEY=PLACE_YOUR_LICENCE_KEY_HERE
53 changes: 53 additions & 0 deletions apps/examples/blinkid-verify-advanced-setup/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
const { defineConfig } = require("eslint-define-config");

module.exports = defineConfig({
root: true,

parserOptions: {
ecmaVersion: "2022",
sourceType: "module",
},

overrides: [
{
files: ["src/**/*.{ts,tsx}"],
plugins: ["@typescript-eslint", "solid"],
parser: "@typescript-eslint/parser",
// have to duplicate in override...
rules: {
"@typescript-eslint/no-unused-vars": 0,
// the following two are causing errors in vscode. See:
// https://typescript-eslint.io/linting/troubleshooting/#changes-to-one-file-are-not-reflected-when-linting-other-files-in-my-ide
"@typescript-eslint/no-unsafe-assignment": 0,
"@typescript-eslint/no-unsafe-member-access": 0,
// only use in tsx
"@typescript-eslint/no-non-null-assertion": 0,
"@typescript-eslint/consistent-type-definitions": 0,
"prefer-const": 0,
},
parserOptions: {
tsconfigRootDir: __dirname,
project: ["./tsconfig.json"],
},
extends: [
"eslint:recommended",
"plugin:solid/typescript",
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
"prettier",
],
},
{
files: ["**/*.{js,mjs,cjs}"],
env: {
node: true,
browser: true,
es2021: true,
},
extends: ["eslint:recommended"],
rules: {
"no-unused-vars": 0,
},
},
],
});
7 changes: 7 additions & 0 deletions apps/examples/blinkid-verify-advanced-setup/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
dist
public
types
certs
*.local
.env.production
33 changes: 33 additions & 0 deletions apps/examples/blinkid-verify-advanced-setup/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# BlinkID Verify Advanced Setup Example

This example application demonstrates an advanced setup of the BlinkID Verify SDK, showcasing the integration of various components such as `@microblink/blinkid-verify-core`, `@microblink/blinkid-verify-ux-manager`, and `@microblink/camera-manager`.

## Functionality

The application performs the following actions:

1. **Initializes the BlinkID Verify Core**: It starts by loading the WebAssembly (WASM) module and initializing the scanning engine with a license key.

2. **Creates a Scanning Session**: A new scanning session is created with specific settings.

3. **Manages the Camera**: It utilizes the `CameraManager` to handle the camera stream.

4. **Manages the User Experience**: The `BlinkIdVerifyUxManager` is used to orchestrate the user experience, managing the interaction between the camera and the scanning session.

5. **Renders the UI**: The application creates and mounts the camera and feedback UI components to the DOM, rendered as a portal outside the root element. It provides an option to show or hide an onboarding guide for the user.

6. **Handles Results**: Upon successful scanning, the application displays the captured front, back, and barcode frame images. It also includes an optional debug overlay that shows live feedback stabilizer scores as a bar chart, the current UX state key, and the processing status.

7. **Cleanup**: When the UI is dismounted, the application terminates the BlinkID Verify Core instance to free up resources.

## Key Features Demonstrated

- **Modular Integration**: Shows how to import and use different modules of the BlinkID Verify SDK (`blinkid-verify-core`, `blinkid-verify-ux-manager`, `camera-manager`) independently.
- **Manual Control**: Demonstrates how to manually control the initialization, scanning process, and UI components.
- **Custom UI**: Provides an example of how to integrate the SDK's UI components into a custom application layout.
- **Event Handling**: Shows how to subscribe to events from the `CameraManager` and `BlinkIdVerifyUxManager` to create a responsive user experience.
- **Result Handling**: Illustrates how to receive and display scanning results, including captured document frame images.

## How to Run

For detailed instructions on how to install dependencies and run this example, please refer to the [main README file](./../README.md).
20 changes: 20 additions & 0 deletions apps/examples/blinkid-verify-advanced-setup/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<link rel="shortcut icon" type="image/ico" href="/src/assets/favicon.ico" />
<meta
http-equiv="Content-Security-Policy"
content="worker-src 'self' blob:"
/>
<title>BlinkID Verify Advanced Setup Example</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>

<script src="/src/index.tsx" type="module"></script>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
"*.{js,jsx,ts,tsx}": [() => "eslint --max-warnings=0"],
"*.{ts,tsx}": [
() => "tsc-files --skipLibCheck --emitDeclarationOnly false --noEmit",
],
"*.{js,jsx,ts,tsx,css,md}": ["prettier --write"],
};
46 changes: 46 additions & 0 deletions apps/examples/blinkid-verify-advanced-setup/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"name": "example-blinkid-verify-advanced-setup",
"description": "An example of advanced BlinkID Verify SDK setup",
"private": true,
"scripts": {
"build": "vite build",
"build:js-dev": "vite build --mode development",
"clean": "rimraf dist public .turbo types tsconfig.tsbuildinfo",
"dev": "vite --host",
"lint": "concurrently pnpm:lint:types pnpm:lint:eslint",
"lint:eslint": "eslint ./src --max-warnings 0",
"lint:types": "tsc --emitDeclarationOnly false --noEmit",
"preview": "vite preview",
"watch": "vite build --watch --mode development"
},
"type": "module",
"dependencies": {
"@microblink/blinkid-verify-core": "workspace:^",
"@microblink/blinkid-verify-ux-manager": "workspace:^",
"@microblink/camera-manager": "workspace:^",
"@microblink/feedback-stabilizer": "workspace:^",
"solid-js": "^1.9.11",
"yy-fps": "^2.0.1"
},
"devDependencies": {
"@microblink/tsconfig": "workspace:*",
"@microblink/repo-utils": "workspace:*",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"concurrently": "^9.1.2",
"eslint": "^8.57.0",
"eslint-config-prettier": "10.1.8",
"eslint-define-config": "^1.24.1",
"eslint-plugin-solid": "0.14.5",
"mkcert-cli": "^1.5.0",
"prettier": "^3.8.1",
"rimraf": "^6.0.1",
"tsc-files": "^1.1.4",
"typescript": "5.8.3",
"vite": "^6.2.1",
"vite-plugin-mkcert": "^1.17.9",
"vite-plugin-qrcode": "0.3.0",
"vite-plugin-solid": "^2.11.10",
"zx": "^8.8.5"
},
"license": "MIT"
}
Loading
Loading