npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

max-product-sdk

v1.0.8

Published

Product SDK - Multi-platform SDK for Product component

Readme

Max Product SDK

SDK đa nền tảng để tích hợp component Product vào app thứ 3.

📁 Cấu trúc

max-sdk/
├── react-native/    # React Native SDK ✅
├── flutter/         # Flutter SDK
├── native/          # Pure native SDKs
│   ├── ios/
│   └── android/
└── examples/        # Example apps

🚀 Quick Start

React Native

1. Install

npm install max-product-sdk

2. iOS Setup

Quan trọng: Sau khi install, cần rebuild app (không chỉ reload Metro):

cd ios
pod install
cd ..

# Rebuild app
npx react-native run-ios

Hoặc mở Xcode và build lại:

open ios/YourApp.xcworkspace
# Sau đó build từ Xcode (Cmd+B, rồi Cmd+R)

3. Android Setup

Quan trọng: Sau khi install, cần rebuild app (không chỉ reload Metro):

# Clean build
cd android
./gradlew clean
cd ..

# Rebuild app
npx react-native run-android

android/build.gradle:

allprojects {
    repositories {
        google()
        mavenCentral()
        // TrustVision SDK local repository
        maven {
            url "${rootDir}/../node_modules/react-native-trust-vision-SDK/android/repo"
        }
    }
}

android/settings.gradle:

include ':libs'
project(':libs').projectDir = new File('../node_modules/nfc_module/android/libs')

Kotlin:

import com.max.productsdk.ProductSDKPackage

override fun getPackages(): List<ReactPackage> {
  val packages = PackageList(this).packages
  packages.add(ProductSDKPackage())
  return packages
}

Java:

import com.max.productsdk.ProductSDKPackage;

@Override
protected List<ReactPackage> getPackages() {
  List<ReactPackage> packages = new PackageList(this).getPackages();
  packages.add(new ProductSDKPackage());
  return packages;
}

4. Usage

import { ProductSDK } from 'max-product-sdk';
 const handleProductSelect = (productType: 'credit' | 'debit' | 'lending') => {
    console.log('Product selected:', productType);
  };

  const handleNavigationRequest = (route: string) => {
    console.log('Navigation requested to:', route);
  };

  const handleMaintenanceMode = (message: string) => {
    console.log('Maintenance Mode', message);
  };

  const handleError = (error: Error) => {
    console.error('SDK Error:', error);
  };

  const handleNfcScanComplete = async (data: any) => {
    console.log('[TestSDK] handleNfcScanComplete data:', data);
  };

<ProductSDK
  apiKey="your-api-key"
  environment="prod | uat | dev"
  onEkycCaptureComplete={async () => {
    return {
   // Expected format: dd/MM/yyyy (see SDK dateUtil.ts)
   date_of_birth: 'dd/mm/yyy',
   expiry_date: 'dd/mm/yyy',
   id_number: 'dd/mm/yyy',
   issue_date: 'dd/mm/yyy',
   } as any;
  }}
  onNfcScanComplete={handleNfcScanComplete}
  onError={handleError}
  onMaintenanceMode={handleMaintenanceMode}
  onNavigationRequest={handleNavigationRequest}
  onProductSelect={handleProductSelect}
  showCreditCard={true}
  showDebitCard={true}
  showLending={true}
/>

5. Peer Dependencies

SDK yêu cầu các peer dependencies sau (host app phải cài đặt):

npm install react-native-trust-vision-SDK react-native-nfc-manager

nfc_module không có trên npm; thường dùng bản đóng gói (tgz) nội bộ. Nếu bạn có file nfc_module.tgz:

  • Copy vào project (ví dụ libs/nfc_module.tgz)
  • Thêm vào package.json:
    "nfc_module": "./libs/nfc_module.tgz"
  • Chạy npm install hoặc yarn

Lưu ý: Nếu không cài nfc_modulereact-native-nfc-manager, màn NFC sẽ báo lỗi "nfc_module hoặc react-native-nfc-manager chưa được cài đặt" khi người dùng chuyển từ eKYC sang bước đọc chip CCCD.

Flutter

dependencies:
  product_sdk:
    path: ../max-sdk/flutter
import 'package:product_sdk/product_sdk.dart';

ProductSDK(
  apiKey: 'your-api-key',
  environment: 'prod',
)

Native iOS

pod 'ProductSDK', :path => '../max-sdk/native/ios'
ProductSDK.shared.initialize(
    apiKey: "your-api-key",
    environment: "prod"
)

Native Android

implementation project(':max-sdk:native:android')
ProductSDK.getInstance().initialize(
    apiKey = "your-api-key",
    environment = "prod"
)

✅ Current Status

  • React Native: Hoàn chỉnh, sẵn sàng sử dụng
  • ⚠️ Flutter: TODO
  • ⚠️ Native iOS: TODO
  • ⚠️ Native Android: TODO

📝 License Max Bank

MIT