diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..3a317c8e --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Modular Open Source Identity Platform + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index 1f3269ad..1db571f2 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,43 @@ -# inji-verify -Repository host the source code, documentation, and other related files for the Inji Verify project. +# Inji Verify -# Project Setup - Development +Injiverify is a web interface to verify the validity of the QR / credential using a browser from smartphone / tablet / computer. A user should be able to do primariliy 4 key actions - Scan, Validate, Fetch, Display. + +--- + +# Installations: Prerequisites: -* Node 18 - Can be installed using [nvm](https://github.com/nvm-sh/nvm). Run following command to install node +Node 18 - Can be installed using [nvm](https://github.com/nvm-sh/nvm). Run following commands to install node + +``` +$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash +$ nvm install 18 +``` +--- + +# Folder Structure: + +* **helm:** folder contains helm charts required to deploy on K8S - ```curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash``` +* **inji-verify:** contains the source code and Dockerfile - ```nvm install 18``` +--- -Run following commands to start the application +# Running the application: -```npm install``` +* Run following commands to start the application: -```npm start``` +``` +$ cd ./inji-verify +$ npm install +$ npm start +``` + +- Build and run Docker for a service: +``` +$ docker build -t : . +$ docker run -it -d -p 3000:3000 : +``` +- Open URL http://localhost:3000 diff --git a/helm/inji-verify/Chart.yaml b/helm/inji-verify/Chart.yaml index 77eed110..7ff81a3d 100644 --- a/helm/inji-verify/Chart.yaml +++ b/helm/inji-verify/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 -name: inji-verify -description: A Helm chart for MOSIP injiweb UI module +name: injiverify +description: A Helm chart for MOSIP injiverify module type: application -version: 1.0.0 +version: 0.0.1-develop appVersion: "" dependencies: - name: common diff --git a/helm/inji-verify/README.md b/helm/inji-verify/README.md index eb754b34..12e77956 100644 --- a/helm/inji-verify/README.md +++ b/helm/inji-verify/README.md @@ -1,4 +1,4 @@ -# injiweb ui +# injiverify ## Overview Refer [Commons](https://docs.mosip.io/1.2.0/modules/commons). diff --git a/helm/inji-verify/copy_cm.sh b/helm/inji-verify/copy_cm.sh index 462711fa..8e8adb54 100755 --- a/helm/inji-verify/copy_cm.sh +++ b/helm/inji-verify/copy_cm.sh @@ -4,7 +4,7 @@ function copying_cm() { COPY_UTIL=./copy_cm_func.sh - DST_NS=esignet + DST_NS=injiverify $COPY_UTIL configmap global default $DST_NS $COPY_UTIL configmap artifactory-share artifactory $DST_NS diff --git a/helm/inji-verify/delete.sh b/helm/inji-verify/delete.sh index b16ab86a..6c52f50a 100755 --- a/helm/inji-verify/delete.sh +++ b/helm/inji-verify/delete.sh @@ -6,13 +6,13 @@ if [ $# -ge 1 ] ; then export KUBECONFIG=$1 fi -function Deleting_injiverify-ui() { - NS=esignet +function Deleting_injiverify() { + NS=injiverify while true; do read -p "Are you sure you want to delete all esignet helm charts?(Y/n) " yn if [ $yn = "Y" ] then - helm -n $NS delete injiverify-ui + helm -n $NS delete injiverify break else break diff --git a/helm/inji-verify/install.sh b/helm/inji-verify/install.sh index 5f19c3e2..16b5059a 100755 --- a/helm/inji-verify/install.sh +++ b/helm/inji-verify/install.sh @@ -6,8 +6,8 @@ if [ $# -ge 1 ] ; then export KUBECONFIG=$1 fi -NS=esignet -CHART_VERSION=1.0.0 +NS=injiverify +CHART_VERSION=0.0.1-develop echo Create $NS namespace kubectl create ns $NS @@ -20,18 +20,17 @@ function installing_inji-verify() { helm repo update echo Copy configmaps - # ./copy_cm.sh + ./copy_cm.sh - ESIGNET_HOST=$(kubectl get cm global -o jsonpath={.data.mosip-esignet-host}) - INJI_HOST=$(kubectl get cm global -o jsonpath={.data.mosip-injiweb-host}) + INJI_HOST=$(kubectl get cm global -o jsonpath={.data.mosip-injiverify-host}) echo Installing INJIWEB helm -n $NS install inji-verify mosip/inji-verify \ -f values.yaml \ --set esignet_redirect_url=$ESIGNET_HOST \ - --set istio.hosts\[0\]=$INJI_HOST \ + --set istio.hosts\[0\]=$INJIVERIFY_HOST \ --version $CHART_VERSION -# kubectl -n $NS get deploy -o name | xargs -n1 -t kubectl -n $NS rollout status + kubectl -n $NS get deploy -o name | xargs -n1 -t kubectl -n $NS rollout status echo Installed inji-verify return 0 diff --git a/helm/inji-verify/restart.sh b/helm/inji-verify/restart.sh index 706a2a4c..5c1806b7 100755 --- a/helm/inji-verify/restart.sh +++ b/helm/inji-verify/restart.sh @@ -7,12 +7,11 @@ if [ $# -ge 1 ] ; then fi function Restarting_oidc-ui() { - NS=esignet - kubectl -n $NS rollout restart deploy oidc-ui + NS=injiverify kubectl -n $NS get deploy -o name | xargs -n1 -t kubectl -n $NS rollout status - echo Retarted esignet services + echo Retarted injiverify services return 0 } diff --git a/helm/inji-verify/values.yaml b/helm/inji-verify/values.yaml index af22feea..5f82061b 100755 --- a/helm/inji-verify/values.yaml +++ b/helm/inji-verify/values.yaml @@ -416,13 +416,6 @@ metrics: ## The url below is to access esignet API services. ## CAUTION: Domain name to access injiweb UI must be secure/internal/over vpn. -## Slash is important! -inji_web: - inji_web_port: '3004' - inji_web_service_host: 'mimoto.mimoto' -esignet_redirect_url: 'esignet.sandbox.xyz.net' -## injiweb UI swagger should have only internal access. Hence linked to internal gateway -## We create a gateway for esignet specific URL(s) listed under `hosts` istio: enabled: true ingressController: @@ -433,5 +426,5 @@ istio: portName: http port: 80 hosts: - - inji.sandbox.xyz.net + - injiverify.sandbox.xyz.net prefix: / diff --git a/inji-verify/package-lock.json b/inji-verify/package-lock.json index 7c35b20a..81cc7a05 100644 --- a/inji-verify/package-lock.json +++ b/inji-verify/package-lock.json @@ -10,7 +10,7 @@ "dependencies": { "@emotion/react": "^11.11.4", "@emotion/styled": "^11.11.5", - "@mosip/pixelpass": "^0.1.2", + "@mosip/pixelpass": "0.1.2", "@mui/icons-material": "^5.15.15", "@mui/material": "^5.15.14", "@mui/styled-engine": "^5.15.14", diff --git a/inji-verify/package.json b/inji-verify/package.json index 8a2fc303..f51ec044 100644 --- a/inji-verify/package.json +++ b/inji-verify/package.json @@ -5,7 +5,7 @@ "dependencies": { "@emotion/react": "^11.11.4", "@emotion/styled": "^11.11.5", - "@mosip/pixelpass": "^0.1.2", + "@mosip/pixelpass": "0.1.2", "@mui/icons-material": "^5.15.15", "@mui/material": "^5.15.14", "@mui/styled-engine": "^5.15.14",