Skip to content

Commit

Permalink
Merge pull request #240 from GOKULRAJ136/doc-21
Browse files Browse the repository at this point in the history
MOSIP-37256 : Updated readme for developer guide java21
  • Loading branch information
dhanendra06 authored Nov 11, 2024
2 parents ae54fd7 + c66ca26 commit 3bfcffc
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 23 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,33 @@
# Print Service

## Overview
A reference implementation to print `euin`, `reprint`, `qrcode` [credential types](https://docs.mosip.io/1.2.0/modules/id-repository#credential-types) in PDF format. This service is intended to be custimized and used by a card printing agency who need to onboard onto MOSIP as [Credential Partner](https://docs.mosip.io/1.2.0/partners#credential-partner-cp) before deploying the service.
A reference implementation to print `euin`, `reprint`, `qrcode` [credential types](https://docs.mosip.io/1.2.0/modules/id-repository#credential-types) in PDF format. This service is intended to be customized and used by a card printing agency who need to onboard onto MOSIP as [Credential Partner](https://docs.mosip.io/1.2.0/partners#credential-partner-cp) before deploying the service.

![](docs/print-service.png)

1. Receives events from WebSub.
2. Fetches templates from Masterdata.
3. After creating PDF card print service upload the same to [Datashare](https://docs.mosip.io/1.2.0/modules/data-share).
4. Publishes event to WebSub with updated status and Datashare link.
3. After creating PDF card print service upload the same to [DataShare](https://docs.mosip.io/1.2.0/modules/data-share).
4. Publishes event to WebSub with updated status and DataShare link.

The card data in JSON format is publised as WebSub event. The print service consumes the data from event, decrypts using partner private key and converts into PDF using a predefined [template](docs/configuration.md#template).
The card data in JSON format is published as WebSub event. The print service consumes the data from event, decrypts using partner private key and converts into PDF using a predefined [template](docs/configuration.md#template).

## Build and run (for developers)
Refer [Build and Run](docs/build-and-run.md).

## Deploy
The deploy print service in production follow the given steps:
To deploy print service in production follow the given steps:

1. Onboard your organisation as [Credential Partner](https://docs.mosip.io/1.2.0/partners).
1. Place your `.p12` file in `../src/main/resources` folder.
1. Set configuration as in given [here](docs/configuation.md).
1. Build and run as given [here](docs/build-and-run.md).
2. Place your `.p12` file in `../src/main/resources` folder.
3. Set configuration as in given [here](docs/configuation.md).
4. Build and run as given [here](docs/build-and-run.md).

## Configuration
Refer to the [configuration guide](docs/configuration.md).

## Test
Automated functaionl tests available in [Functional Tests repo](https://github.com/mosip/mosip-functional-tests).
Automated functional tests available in [Functional Tests repo](https://github.com/mosip/mosip-functional-tests).

## License
This project is licensed under the terms of [Mozilla Public License 2.0](LICENSE).
8 changes: 4 additions & 4 deletions docs/build-and-run.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
Following tools required to run the print service locally.

1. _Ngrok_ to expose local port to remote to communicate with websub
1. Java 11.
1. [Config Server](https://docs.mosip.io/1.2.0/modules/module-configuration) running in respective environment.
2. The project requires JDK 21.0.3 and mvn version - 3.9.6.
3. [Config Server](https://docs.mosip.io/1.2.0/modules/module-configuration) running in respective environment.

## Build
1. To build jars:
```
$ cd print
$ mvn clean install
```
1. To skip JUnit tests and Java Docs:
2. To skip JUnit tests and Java Docs:
```
$ mvn install -DskipTests=true -Dmaven.javadoc.skip=true
```
1. To build Docker for a service:
3. To build Docker for a service:
```
$ cd <service folder>
$ docker build -f Dockerfile
Expand Down
20 changes: 10 additions & 10 deletions docs/configuration.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Print Service Configuration Guide

## Overview
The guide here lists down some of the important properties that may be customised for a given installation. Note that the listing here is not exhaustive, but a checklist to review properties that are likely to be different from default. If you would like to see all the properites, then refer to the files listed below.
The guide here lists down some of the important properties that may be customised for a given installation. Note that the listing here is not exhaustive, but a checklist to review properties that are likely to be different from default. If you would like to see all the properties, then refer to the files listed below.

## Configuration
Print service uses the following configuration files that are accessible in this [repository](https://github.com/mosip/mosip-config/tree/master).
Please refer to the required released tagged version for configuration.
1. [Configuration-Application](https://github.com/mosip/mosip-config/blob/master/application-default.properties)
2. [Configuration-Print](https://github.com/mosip/mosip-config/blob/master/print-default.properties)
3. [Configuration-RegProcPrintTextFile](https://github.com/mosip/mosip-config/blob/master/registration-processor-print-text-file.json)
4. [Configuration-IdMapping](https://github.com/mosip/mosip-config/blob/master/identity-mapping.json)

## Configuration files
Print service uses the following configuration files:
```
application-default.properties
print-default.properties
registration-processor-print-text-file.json
identity-mapping.json
```
Refer [Module Configuration](https://docs.mosip.io/1.2.0/modules/module-configuration) for location of these files.

## Template
Expand All @@ -34,7 +34,7 @@ print-WebSub-resubscription-delay-millisecs = // resubscription delay time.
mosip.event.secret = //secret key
```

## Datashare
## DataShare
```
mosip.datashare.partner.id = /your partner id from partner portal
mosip.datashare.policy.id = /your policy id from partner portal
Expand Down

0 comments on commit 3bfcffc

Please sign in to comment.