Git Product home page Git Product logo

caf_sdk's Introduction

CAF - SDKs

CAF Platform provides reliable SDKs that can be integrated into projects/applications for document reading and other resources, ideal for integration flows. In this project I built an application using these SDKs to help you perform this integration.

This application used the Flutter tool and presents characteristics such as

These features need to be changed in files like build.gradle and info.plist

  • Document Detector
  • Passive Face Liveness
  • Face Authenticator

⚙️ How to configure

To integrate your project with these tools, you must have an account on the caf platform. After an account is created, make sure to add the imports in the build.gradle and in the Podfile for IOS, you also need to grant the camera permission in the info.plist file, calm down 😅, it's all here:

In the build.gradle file at the app folder level add

android {
...

buildFeatures {
    dataBinding = true
}

dataBinding.enabled = true

aaptOptions {
    noCompress "tflite"
}

...
}

Still in the build.gradle file at the app folder level within dependencies add the resource you will use in your project and the camera implementations


dependencies {
    ...
    implementation "androidx.camera:camera-view:1.2.0-alpha02"
    implementation 'com.combateafraude.sdk:document-detector:6.37.0' // -> DocumentDetector
    implementation 'com.combateafraude.sdk:passive-face-liveness:5.25.11' // -> PassiveFaceLivenes
    implementation 'com.combateafraude.sdk:face-authenticator:5.8.10' // -> FaceAuthenticator

    implementation 'com.google.android.material:material:1.2.1'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
    ...
}


For IOS, inside the folder ios/runner/info.plist add

  ...
  
  <key>NSCameraUsageDescription</key>
  <string>To read the documents</string>

  // Required only for the document upload flow
  <key>NSPhotoLibraryUsageDescription</key>
  <string>To select images</string>
  

Still on ios add in the Podfile file

source 'https://github.com/combateafraude/iOS.git'
source 'https://cdn.cocoapods.org/' # or 'https://github.com/CocoaPods/Specs' if the CDN is down

Once that's done, just add the project to pubspec.yaml

...

dependencies:
  flutter:
    sdk: flutter
    
  document_detector:
    git:
      url: https://github.com/combateafraude/Flutter.git
      ref: document-detector-v5.26.0-rc01

  passive_face_liveness:
    git:
      url: https://github.com/combateafraude/Flutter.git
      ref: passive-face-liveness-v4.30.0

  face_authenticator:
    git:
      url: https://github.com/combateafraude/Flutter.git
      ref: face-authenticator-v3.12.0
      
...

That's it, your project is set up, just use it in your app, you can base it on the code developed in this repository.

📱 Demo of the APP of this repository

Document Detector
Passive Face Liveness
Face Authenticator

It is worth mentioning that, in order to communicate with the CAF API, it is necessary to have an access token, which in the project of this repository can be added here:

Since it's a simple project created inside a .dart file, I suggest you add it to an .env file or another file where the token is not versioned.

For visual customization or other settings, follow the official documentation https://docs.combateafraude.com/ 😉.

💻 Developer

Kauê Sena
Kauê Alves Sena - Mobile Developer 💙

Thanks for your attention.

caf_sdk's People

Contributors

kauesena01 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.