@thenovaweb/druid-ogold-rn-sdk 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +106 -22
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,57 +1,141 @@
1
1
  ### `druid-ogold-rn-sdk`
2
2
 
3
- Druid is a react native package that enables clients to conduct KYC aginst their customers for easy onboarding and well-informed decision making.
3
+ Druid is a React Native package that enables clients to conduct **KYC** against their customers for easy onboarding and well-informed decision making.
4
4
 
5
- The simplified process flow makes it a smooth experience to the end-users (customers).
5
+ The simplified process flow makes it a smooth experience for end-users (customers).
6
+
7
+ ---
6
8
 
7
9
  ### Existing Features
8
10
 
9
11
  The version `0.0.x` has the following feature support:
10
12
 
11
- | Feature | Description |
12
- | ----------------------- | ----------------------------------------------------------------------- |
13
- | Face Liveness Detection | Detects spoof, deepfake and malicious attempt providing instant result. |
14
- | AI-Based OCR | Allows automated form filling with OCR |
15
- | ID Verification | Compares the image in the ID vs the live face |
13
+ | Feature | Description |
14
+ | ----------------------- | --------------------------------------------------------------------------- |
15
+ | Face Liveness Detection | Detects spoof, deepfake, and malicious attempts, providing instant results. |
16
+ | AI-Based OCR | Allows automated form filling with OCR |
17
+ | ID Verification | Compares the image in the ID vs the live face |
16
18
 
17
19
  #### Upcoming Features:
18
20
 
19
- `v 0.1.x`
21
+ `v0.1.x`
20
22
 
21
23
  | Feature | Description |
22
24
  | ----------------- | ------------------------------------------------------------------------------ |
23
25
  | Document ID Check | Checks if the uploaded document is a valid document (Passport, EmiratesID...). |
24
26
 
27
+ ---
28
+
25
29
  ### Usage
26
30
 
27
- In any react native component or screen, attach the following piece of code. This activates the widget. The widget however has secrets as a pre-requisite.
31
+ In any React Native component or screen, attach the following piece of code. This activates the widget. The widget requires secrets as a pre-requisite.
28
32
 
29
33
  ```ts
30
- import Widget from "druid-ogold-rn-sdk";
34
+ import Widget from '@thenovaweb/druid-ogold-rn-sdk';
35
+ import { View, StyleSheet } from 'react-native';
31
36
 
32
37
  return (
33
- <View style={styles.widgetContainer}>
34
- <Widget
35
- phone="987654321"
36
- email="email@email.com"
37
- clientUuid="xxx-xxx-xxx"
38
- clientSecret="xxx-xxx-xxx"
39
- />
40
- </View>
38
+ <View style={styles.widgetContainer}>
39
+ <Widget
40
+ phone="987654321"
41
+ email="email@email.com"
42
+ clientUuid="xxx-xxx-xxx"
43
+ clientSecret="xxx-xxx-xxx"
44
+ />
45
+ </View>
41
46
  );
42
47
 
43
48
  const styles = StyleSheet.create({
44
49
  widgetContainer: {
45
- height: "100%", //setting container height is important when using a view wrapper
50
+ height: "100%", // Setting container height is important when using a view wrapper
46
51
  },
47
52
  });
48
53
  ```
49
54
 
50
- The widget acts as an entrypoint to the workflow. It packs great capabilities and shows the status with relevant description for each step of the onboarding flow.
55
+ The widget acts as an entry point to the workflow. It packs great capabilities and shows the status with relevant descriptions for each step of the onboarding flow.
56
+
57
+ ---
58
+
59
+ ### Required Babel Configuration
60
+
61
+ To ensure **Reanimated 3** and other worklet-based features work correctly with this SDK, add the following `babel.config.js` to your project:
51
62
 
52
- ### Usage Demo
63
+ ```js
64
+ module.exports = function (api) {
65
+ api.cache(true); // Cache the config for faster builds
66
+
67
+ return {
68
+ presets: ["babel-preset-expo"], // Required for Expo + React Native
69
+ plugins: [
70
+ ['react-native-worklets-core/plugin'], // Required for worklets
71
+ ['react-native-reanimated/plugin', { processNestedWorklets: true }], // Required for Reanimated 3, must be last
72
+ ],
73
+ };
74
+ };
75
+ ```
76
+
77
+ > ⚠️ Notes:
78
+ >
79
+ > * The `react-native-reanimated/plugin` **must always be last** in the plugins array.
80
+ > * This configuration is **minimal and required**; optional plugins (like `react-native-paper`) can be added in `env` blocks if needed.
81
+
82
+ ---
83
+
84
+ ### Required Host App Dependencies
85
+
86
+ The host app must install the following native and Expo packages with these versions:
87
+
88
+ | Package | Version |
89
+ | ---------------------------------------- | -------- |
90
+ | @react-native-community/datetimepicker | ^8.4.1 |
91
+ | react-native-paper | ^5.14.5 |
92
+ | @react-native-vector-icons/feather | ^12.3.0 |
93
+ | react-native-reanimated | \~3.17.4 |
94
+ | react-native-safe-area-context | \~5.4.0 |
95
+ | react-native-screens | \~4.11.1 |
96
+ | react-native-vision-camera | \~4.7.2 |
97
+ | react-native-vision-camera-face-detector | ^1.8.9 |
98
+ | expo-image-picker | \~16.1.4 |
99
+ | expo-file-system | ^19.0.14 |
100
+ | expo-blur | \~14.1.4 |
101
+ | expo-linear-gradient | \~14.1.5 |
102
+ | expo-asset | \~11.1.7 |
103
+
104
+ > Install command example:
105
+ >
106
+ > ```bash
107
+ > npm install @react-native-community/datetimepicker@^8.4.1 \
108
+ > react-native-paper@^5.14.5 \
109
+ > @react-native-vector-icons/feather@^12.3.0 \
110
+ > react-native-reanimated@~3.17.4 \
111
+ > react-native-safe-area-context@~5.4.0 \
112
+ > react-native-screens@~4.11.1 \
113
+ > react-native-vision-camera@~4.7.2 \
114
+ > react-native-vision-camera-face-detector@^1.8.9 \
115
+ > expo-image-picker@~16.1.4 \
116
+ > expo-file-system@^19.0.14 \
117
+ > expo-blur@~14.1.4 \
118
+ > expo-linear-gradient@~14.1.5 \
119
+ > expo-asset@~11.1.7
120
+ > ```
121
+ >
122
+ > After installation, rebuild the app (`expo run:android` / `expo run:ios`) to ensure native modules are linked correctly.
123
+
124
+ ---
125
+
126
+ ### Android Configuration
127
+
128
+ Ensure your `android/app/build.gradle` has the following setting:
129
+
130
+ ```gradle
131
+ android {
132
+ defaultConfig {
133
+ minSdkVersion 26 // Required for VisionCamera and Reanimated 3
134
+ }
135
+ }
136
+ ```
53
137
 
54
- A demo application showcasing the use of the above package has been documented in this [github repository](https://github.com/thenovaweb/druid-ogold-sample-app).
138
+ ---
55
139
 
56
140
  ### Documentation
57
141
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thenovaweb/druid-ogold-rn-sdk",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "A react native package for regulatory compliance.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",