Git Product home page Git Product logo

mosip-compliance-toolkit-ui's Introduction

Maven Package upon a push

Compliance-Toolkit Portal

This repository contains the UI code for MOSIP compliance toolkit. For an overview refer here.

Build & Deployment Guide

The code is written in Angular JS.

  • Install node.js – To build the angular code using angular cli that runs on node. We recommend Node: 14.17.3, Package Manager: npm 6.14.13

  • Install angular cli – To install angular cli for building the code into deployable artifacts. Follow the following steps to install angular cli on your system.

    • npm install -g @angular/cli (to install angular cli)
    • ng --version (to verify angular is installed in system) We recommend Angular CLI: 13.3.2
  • Check out the source code from GIT – To download the source code from git. Follow the following steps to download source code on your system.

For Production build:

  • Build the code – Follow the following steps to build the source code on your system.

    • Navigate to the mosip-compliance-toolkit-ui directory inside the cloned repository. Then run the following command in that directory
    • ng build "--prod" "--base-href" "." "--output-path=dist" (to build the code)
  • Build Docker Image – Follow the following steps to build docker image on your system.

    • docker build -t name . (to build the docker image, replace name with the name of the image you want, "." Signifies the current directory from where the docker file has to be read.
    • Example: docker build -t toolkitui .
  • Run the docker image – Follow the following steps to build docker image on your system.

    • docker run –d –p 80:80 --name container-name image-name (to run the docker image created with the previous step,-d signifies to run the container in detached mode, -p signifies the port mapping left side of the":" is the external port that will be exposed to the outside world and right side is the internal port of the container that is mapped with the external port. Replace container-name with the name of your choice for the container, replace image-name with the name of the image specified in .the previous step)
    • Example: docker run -d -p 8080:8080 --name nginx toolkitui
  • Now you can access the user interface over the internet via browser.

For Local build:

  • Build & deploy the code locally – Follow the following steps to build the source code on your system.
    • Navigate to the mosip-compliance-toolkit-ui directory inside the cloned repository. Then run the following command in that directory
    • ng serve
  • Now you can access the user interface via browser.
  • But this will give you CORS issue in accessing backend toolkit services. To get around the CORS issue, angular CLI proxy can be used.
    • Update the API services BASE_URL in config.json
    {  
      "BASE_URL": "https://localhost:4200/proxyapi/",    
      "toolkitUiUrl": "/toolkit-ui/"
      }
    
    • Create a new file named proxy.conf.json. Replace ${servicesUrl} with correct url.
    {
      "/proxyapi": {
        "target": ${servicesUrl},
        "secure": true,
        "changeOrigin": true,
        "pathRewrite": {
          "^/proxyapi": ""
        }
      }    
    }
    
    • Now start the server by typing ng serve --proxy-config proxy.conf.json
    • Open the browser, load the app with https://localhost:4200

Installing in k8s cluster using helm

Pre-requisites

  1. Set the kube config file of the Mosip cluster having dependent services.
  2. Below are the dependent services required for compliance toolkit service:
    Chart Chart version
    Clamav 2.4.1
    Keycloak 7.1.18
    Keycloak-init 12.0.1-beta
    Postgres 10.16.2
    Postgres Init 12.0.1-beta
    Minio 10.1.6
    Config-server 12.0.1-beta
    Artifactory server 12.0.1-beta
    Auditmanager service 12.0.1-beta
    Authmanager service 12.0.1-beta
    Keymanager service 12.0.1-beta
    Notifier service 12.0.1-beta
    Partner manager service 12.0.1-beta
    Complaince service 0.9.0

Install

Install kubectl and helm utilities, then run:

cd helm
./install.sh [cluster-kubeconfig-file]

Restart

cd helm
./restart.sh [cluster-kubeconfig-file]

Delete

cd helm
./delete.sh [cluster-kubeconfig-file]

mosip-compliance-toolkit-ui's People

Contributors

mayuradesh avatar nikhil1reddy avatar swethakrish4 avatar sudeep7353 avatar ckm007 avatar rakshithb1 avatar mohanraj209 avatar janardhanbs-syncbyte avatar mahesh-binayak avatar syedsalman3753 avatar prafulrakhade avatar gsasikumar avatar vsivakalyan avatar pramod444 avatar srinivas-mosip avatar vipuldhurve02 avatar

Stargazers

Aditya Poddar avatar

Watchers

 avatar  avatar  avatar Sivanand Lanka avatar

mosip-compliance-toolkit-ui's Issues

Whether deviceInfo::digitalId need to Base64 Encoded for not registered device(L1 Device)

https://community.mosip.io/t/whether-deviceinfo-digitalid-need-to-base64-encoded-for-not-registered-device-l1-device/764

image

Tasks

No tasks being tracked yet.

Tasks

No tasks being tracked yet.

Android SBI CTK Check Device Status failed: SBI1028, SBI1029.

CTK Android test SBI1028, SBI1029 failed with error "Unable to connect to device / SBI".
After checking I see that:
- sbi-testcase-android-service.ts:
+ callSBIMethodAndroid: always request SBI_METHOD_DISCOVER before other request method (SBI_METHOD_DEVICE_INFO, SBI_METHOD_RCAPTURE, SBI_METHOD_CAPTURE)
- If device status is Not Ready or Not Registered, SBI discovery response will contains error, such as:
{
"deviceStatus": "Not Ready",
"error": {
"errorCode": "106",
"errorInfo": "Device not found"
}
}
- MosipSbiCapacitorPlugin.onDiscoverResult: if discovery response contains errorCode != 0, this will return status = failure.
This will cause sbi-testcase-android-service.ts:callSBIMethodAndroid does not receive response and will end with error "Unable to connect to device / SBI".
Please help me to check and correct this test case.
Thank you.

Screenshot_20231219-144109_mosip-compliance-toolkit-uiy

CTK env value “None” String is not Allowed

image
in the MDS deviceinfo document, it says
for devices that are not registered the environment is “None”.
I set the env filed with “None” String for the not registered device, but the CTK Tested failed。

I looked into the ctk code file 【DeviceInfoNotRegisteredResponseSchema.json】
it only allow values are “Staging”, “Developer”, “Pre-Production” or “Production”
just as the image below shows

image

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.