Skip to content

Commit

Permalink
Merge branch 'develop' into injiver-144-verfication-screen-loading-in…
Browse files Browse the repository at this point in the history
…valid-vc
  • Loading branch information
shiva-beehyv committed Apr 19, 2024
2 parents 7d5d8e6 + 4bbebe1 commit a95392d
Show file tree
Hide file tree
Showing 11 changed files with 73 additions and 37 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -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.
42 changes: 33 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -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 <dockerImageName>:<tag> .
$ docker run -it -d -p 3000:3000 <dockerImageName>:<tag>
```

- Open URL http://localhost:3000
6 changes: 3 additions & 3 deletions helm/inji-verify/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion helm/inji-verify/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# injiweb ui
# injiverify

## Overview
Refer [Commons](https://docs.mosip.io/1.2.0/modules/commons).
Expand Down
2 changes: 1 addition & 1 deletion helm/inji-verify/copy_cm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions helm/inji-verify/delete.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 6 additions & 7 deletions helm/inji-verify/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
5 changes: 2 additions & 3 deletions helm/inji-verify/restart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
9 changes: 1 addition & 8 deletions helm/inji-verify/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -433,5 +426,5 @@ istio:
portName: http
port: 80
hosts:
- inji.sandbox.xyz.net
- injiverify.sandbox.xyz.net
prefix: /
2 changes: 1 addition & 1 deletion inji-verify/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion inji-verify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit a95392d

Please sign in to comment.