Skip to content

Commit

Permalink
Merge pull request #2 from BlinkID/staging
Browse files Browse the repository at this point in the history
  • Loading branch information
ivancuric authored Oct 28, 2023
2 parents 427c6f7 + fb9207c commit 96022a6
Show file tree
Hide file tree
Showing 156 changed files with 8,423 additions and 8,903 deletions.
4 changes: 2 additions & 2 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"capture-main",
"capture-wasm",
"capture-worker",
"capture-ui",
"@microblink/capture"
"@microblink/capture",
"example-*"
]
],
"access": "public",
Expand Down
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,macos,conan,cmake,c++,node

.turbo

# Python virtual environments
.venv

### C++ ###
Expand Down Expand Up @@ -51,14 +53,15 @@ install_manifest.txt
compile_commands.json
CTestTestfile.cmake
_deps
CMakeUserPresets.json
CMakeSettings.json

### CMake Patch ###
# External projects
*-prefix/

### Conan ###
# Conan build information
conan.lock
conanbuildinfo.*
conaninfo.txt
graph_info.json
Expand Down Expand Up @@ -275,3 +278,10 @@ dist

# Local Netlify folder
.netlify

# Python virtual environment
.venv

# vim files
Session.vim
*.sw?
34 changes: 0 additions & 34 deletions .vscode/settings.json

This file was deleted.

21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

The Capture Browser SDK gives you the ability to auto-capture high-quality images of identity documents in a user-friendly way. The SDK provides you with a rectified image of the document, ensuring a high success rate in extracting document text or verifying the document's validity.

Users are guided to avoid glare, blurred images, bad lighting conditions, fingers over the document, or too much tilt. The SDK is able to recognize if a document is single-sided (i.e., passport) or double-sided (i.e., driving license) and prompt the user to scan the back side of the document when needed.
Users are guided to avoid glare, blurred images, bad lighting conditions, fingers covering the document, or too much tilt. The SDK is able to recognize if a document is single-sided (i.e., passport) or double-sided (i.e., driving license) and prompt the user to scan the back side of the document when needed.

In the results, you can obtain a cropped, perspective-corrected image of the document, along with the original frame. These can be processed by your webapp in any way required. The SDK is lightweight and can be easily integrated into your webapp, blending seamlessly with your design.

Expand All @@ -25,7 +25,7 @@ pnpm add @microblink/capture

## Obtaining a licence

A valid license key is required to initialize scanning. You can request a free trial license key after registering on [Microblink Developer Hub](https://account.microblink.com/signin). The license is bound to the application ID of your app.
A valid license key is required to initialize scanning. You can request a free trial license key after registering on [Microblink Developer Hub](https://account.microblink.com/signin). The license is bound to the domain of your app.

## Hosting environment

Expand All @@ -39,7 +39,7 @@ Cross-Origin-Opener-Policy: same-origin

Otherwise, you will only be able to run the single-threaded version of the SDK.

In order to load the accompanying Wasm files and Web Workers, you also need to host them locally on your dev server. These files can be found inside the `node_modules/@microblink/capture/dist/resources` directory after installation.
In order to load the accompanying Wasm files and Web Workers, you also need to host them locally on your dev server. These files can be found inside the `node_modules/@microblink/capture/dist/resources` directory after installation. The `/resources` directory must be hosted without modification of the directory name or its contents.

The dev environments for the example apps have these set and you can use them as a reference.

Expand Down Expand Up @@ -159,6 +159,21 @@ All components rendered by the UI are nested under `.mb-style-scope` which provi

You can find details on the internal state of the capture process using the [`onFrameAnalysis`](/packages/capture-main/src/createCaptureSdk.ts#57) callback. This callback will provide you with an `ImageData` instance of the previously processed frame and the [`FrameAnalysisResult`](/packages/capture-wasm/src/FrameAnalysisResult.ts).

### Low-level access Direct API

This mode gives users the capability to directly interact with the `Analyzer` instance, bypassing the provided functionality in the Capture SDK such as camera and video management, user feedback, callbacks and state management.

```typescript
import { createDirectApi } from "@microblink/capture";

const directApi = await createDirectApi({
licenseKey: "YOUR_LICENCE",
});

// The user is free to use methods available on
// the `directApi` to fit their use case
```

## Troubleshooting

### Integration problems
Expand Down
4 changes: 2 additions & 2 deletions apps/example-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# example-react

## 0.0.7
## 1.1.0

### Patch Changes

- Updated dependencies
- @microblink/capture@1.0.8
- @microblink/capture@1.1.0

## 0.0.6

Expand Down
28 changes: 15 additions & 13 deletions apps/example-react/package.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
{
"name": "example-react",
"private": true,
"version": "0.0.7",
"type": "module",
"version": "1.1.0",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"clean": "rimraf .turbo types dist public/resources *.tsbuildinfo",
"dev": "vite",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
"type": "module",
"dependencies": {
"@microblink/capture": "workspace:^",
"@microblink/capture": "workspace:*",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@mb/utils": "workspace:^",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@typescript-eslint/eslint-plugin": "^6.1.0",
"@typescript-eslint/parser": "^6.1.0",
"@vitejs/plugin-react": "^4.0.3",
"eslint": "^8.45.0",
"@mb/utils": "workspace:*",
"@types/react": "^18.2.32",
"@types/react-dom": "^18.2.14",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
"@vitejs/plugin-react": "^4.1.0",
"eslint": "^8.52.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.3",
"typescript": "^5.1.6",
"vite": "^4.4.6",
"rimraf": "^5.0.5",
"typescript": "^5.2.2",
"vite": "^4.5.0",
"vite-plugin-mkcert": "^1.16.0",
"zx": "^7.2.3"
}
Expand Down
1 change: 0 additions & 1 deletion apps/example-react/public/vite.svg

This file was deleted.

6 changes: 0 additions & 6 deletions apps/example-solidjs-dist/.env

This file was deleted.

53 changes: 0 additions & 53 deletions apps/example-solidjs-dist/.eslintrc.cjs

This file was deleted.

6 changes: 0 additions & 6 deletions apps/example-solidjs-dist/.gitignore

This file was deleted.

49 changes: 0 additions & 49 deletions apps/example-solidjs-dist/CHANGELOG.md

This file was deleted.

32 changes: 0 additions & 32 deletions apps/example-solidjs-dist/README.md

This file was deleted.

20 changes: 0 additions & 20 deletions apps/example-solidjs-dist/index.html

This file was deleted.

7 changes: 0 additions & 7 deletions apps/example-solidjs-dist/lint-staged.config.cjs

This file was deleted.

8 changes: 0 additions & 8 deletions apps/example-solidjs-dist/netlify.toml

This file was deleted.

Loading

0 comments on commit 96022a6

Please sign in to comment.