Setup Local Dev Environment (DIGIT Stack)

UI WorkSpace setup:

 Environment Requirements :

Install the Visual Studio code editor latest version

Install the node version (10.16.3) and npm version (6.9.0)

Install yarn Version(1.19.1)

Clone git repository digit-egov/frontend

Open the folder in the VS code and update the following files

Change the file forntend/web/rainmaker/packages/<citizen/empolyee>/.env

update the variable REACT_APP_DEFAULT_TENANT_ID=<state level tenantid>

Change the file forntend/web/rainmaker/packages/<citizen/empolyee>/package.json

Update “homepage” and “proxy” variable to point to the correct environment urls. please find the example below

"homepage": "https://state.egovernments.org/citizen/", 

"proxy": "https://state.egovernments.org/",



Navigate to cloned directory in terminal and enter the following commands :

cd web/rainmaker   

npm install --global lerna

npm run go

 

To compile the citizen, use the following command

npm run dev:citizen

To compile the employee, use the following command

npm run dev:empolyee

 

Backend WorkSpace setup:

  1. Tools:

  • Java

  • IDE

  • Kubectl(1.15)

  • Postman

  • Kafka(2.2.1)

Follow the steps to setup for backend development :

  Core-services

  Business-services 

  • Import the project in eclipse 

  • Run maven install and maven update 

  • Install and run the kafka(2.2.1) server 

  • Add kubectl config to connect to the Kubernetes. With this we can access the services outside the kubernetes.

  • Do the port forwarding  for dependent  services to (your environment) 

kubectl port-forward <pod name> <local port>:<service port>

kubectl port-forward pt-services-h656x 8060:8080

  • In application.properties change the port forwarded port number for dependent services. ( update the hostname of the service in the above example you access pt-service in port 8060)

 egov.pt.services.host=http://localhost:8060/



  • Run the services locally.

  • Run any dependent services locally if required.

  • Run  egov-persister service locally to interact with local database. This will save the data to local Database. 

  • Add the YAML files present in service to persister (which will have updated queries.) copy servicerootfolder/src/main/resources/<service-name>-persister.yml to  egov-persister/src/main/resources/

  • Use postman or CURL to test your APIs. Find postman collection below.



This is the collection of PGR with its workflow:

https://www.getpostman.com/collections/dab79b41f22874f1fe0d

 

This is the collection of trade license with its workflow:

https://www.getpostman.com/collections/591064d0eb79701ad1f9

 

This is the collection of property tax with its workflow:

https://www.getpostman.com/collections/55d28b8e1d7e028df7d1