-
Notifications
You must be signed in to change notification settings - Fork 96
[MOSIP-44072] : Updated README.md #310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Prafulrakhade
merged 6 commits into
mosip:release-1.3.x
from
chetankh239:MOSIP-44072-release
Dec 17, 2025
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5ef8e69
[MOSIP-44072] : Updated README.md
chetankh239 526045e
[MOSIP-44072] : Updated README.md
chetankh239 53f2104
[MOSIP-44072] : Updated README.md
chetankh239 818b55c
[MOSIP-44072] : Updated README.md
chetankh239 ad372e6
Fix typo in README.md for 'Retrieves'
chetankh239 1a78f8a
Update DataShare link in README
chetankh239 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,35 +1,164 @@ | ||
| [](https://github.com/mosip/print/actions/workflows/push-trigger.yml) | ||
| [](https://sonarcloud.io/dashboard?branch=release-1.3.x&id=mosip_admin-services) | ||
| # Print Service | ||
|
|
||
| [](https://github.com/mosip/print/actions/workflows/push-trigger.yml) | ||
| [](https://sonarcloud.io/dashboard?branch=release-1.3.x&id=mosip_print) | ||
|
|
||
| ## 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 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. | ||
|
|
||
| The **Print Service** is a reference implementation in MOSIP that handles the printing of credentials such as `euin`, `reprint`, and `qrcode` [credential types](https://docs.mosip.io/1.2.0/modules/id-repository#credential-types) in PDF format. This service is designed to be customized and utilized by card printing agencies onboarding as [Credential Partners](https://docs.mosip.io/1.2.0/partners#credential-partner-cp).This reference implementation can be referred by any credential sharing request. | ||
|
|
||
| It operates in an event-driven flow: | ||
| 1. **Receive Event**: Listens for print request events from WebSub. | ||
| 2. **Fetch Template**: Retrieves the appropriate template from Masterdata. | ||
| 3. **Generate PDF**: Decrypts resident data and converts it into a PDF card using the template. | ||
| 4. **Upload**: Uploads the generated PDF to [DataShare](https://docs.mosip.io/1.2.0/id-lifecycle-management/supporting-components/datashare). | ||
| 5. **Notify**: Publishes a status event with the DataShare link back to WebSub. | ||
|
|
||
| The flow is visualized below: | ||
|
|
||
|  | ||
|
|
||
| 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. | ||
| ## Features | ||
|
|
||
| - **Template-Based Printing**: Utilizes Velocity and iText to generate PDFs based on customizable templates. | ||
| - **Secure Data Handling**: Decrypts sensitive resident data using partner private keys (`.p12`). | ||
| - **DataShare Integration**: Securely uploads generated credential documents. | ||
| - **Credential Support**: Native support for EUIN, Reprint, and QR Code credential types. | ||
|
|
||
| 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). | ||
| ## Services | ||
|
|
||
| The Print project consists of the following service: | ||
|
|
||
| 1. **[Print Service](.)** (`print`) - The core Spring Boot application responsible for processing print requests and generating the credential PDFs. | ||
|
|
||
| ## Database | ||
| NA (The service relies on Object Store/DataShare and Masterdata; it does not maintain its own primary database). | ||
|
|
||
| ## Build and run (for developers) | ||
| Refer [Build and Run](docs/build-and-run.md). | ||
|
|
||
| ## Deploy | ||
| 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). | ||
| 2. Place your `.p12` file in `../src/main/resources` folder. | ||
| 3. Set configuration as in given [here](docs/configuation.md). | ||
| 3. Set configuration as in given [here](https://github.com/mosip/mosip-config/blob/release-1.3.x/print-default.properties). | ||
| 4. Build and run as given [here](docs/build-and-run.md). | ||
|
|
||
| ## Configuration | ||
| Refer to the [configuration guide](docs/configuration.md). | ||
|
|
||
| ## Test | ||
| Automated functional tests available in [Functional Tests repo](https://github.com/mosip/mosip-functional-tests). | ||
|
|
||
| ## Local Setup | ||
|
|
||
| The project can be set up in two ways: | ||
|
|
||
| 1. [Local Setup (for Development or Contribution)](#local-setup-for-development-or-contribution) | ||
| 2. [Local Setup with Docker (Easy Setup for Demos)](#local-setup-with-docker-easy-setup-for-demos) | ||
|
|
||
| ### Prerequisites | ||
|
|
||
| Before you begin, ensure you have the following installed: | ||
|
|
||
| - **JDK**: 21 | ||
| - **Maven**: 3.9.6 (or compatible 3.x version) | ||
| - **Docker**: Latest stable version (optional for local run) | ||
|
|
||
| ### Runtime Dependencies | ||
|
|
||
| Ensure the following artifacts are available in the classpath or loader path: | ||
|
|
||
| - `kernel-auth-adapter.jar` - For IAM authentication. | ||
|
|
||
| ## Installation | ||
|
|
||
| ### Configuration | ||
| Print uses properties from **mosip-config**. | ||
| You can check the configuration here: [print-default.properties](https://github.com/mosip/mosip-config/blob/release-1.3.x/print-default.properties) | ||
| ### Local Setup (for Development or Contribution) | ||
|
|
||
| 1. Ensure the **Config Server** is running and accessible.To run config server [check here.](https://github.com/mosip/mosip-config/blob/master/README.md) | ||
|
|
||
| 2. Clone the repository: | ||
|
|
||
| ```text | ||
| git clone https://github.com/mosip/print.git | ||
| cd print | ||
| ``` | ||
|
|
||
| 3. Build the project: | ||
|
|
||
| ```text | ||
| mvn clean install -Dmaven.javadoc.skip=true -Dgpg.skip=true | ||
| ``` | ||
|
|
||
| 4. Start the application: | ||
| - Run via IDE or command line: | ||
| ```text | ||
| java -Dloader.path=<path-to-kernel-auth-adapter-jar> \ | ||
| -jar target/print-*.jar | ||
| ``` | ||
|
|
||
| ### Local Setup with Docker (Easy Setup for Demos) | ||
|
|
||
| #### Option 1: Pull from Docker Hub | ||
|
|
||
| Recommended for quick demos and testing. | ||
|
|
||
| ```text | ||
| docker pull mosipid/print-service:1.3.0 | ||
| ``` | ||
|
|
||
| Run the service: | ||
|
|
||
| ```text | ||
| docker run -d -p 8099:8099 --name print-service mosipid/print-service:1.3.0 | ||
| ``` | ||
|
|
||
| #### Option 2: Build Docker Images Locally | ||
|
|
||
| Recommended for developers. | ||
|
|
||
| 1. Build the project (as shown in Local Setup). | ||
|
|
||
| 2. Build the Docker image: | ||
|
|
||
| ```text | ||
| docker build -t print-service:local . | ||
| ``` | ||
|
|
||
| 3. Run the service: | ||
|
|
||
| ```text | ||
| docker run -d -p 8099:8099 --name print-service print-service:local | ||
| ``` | ||
|
|
||
| #### Verify Installation | ||
|
|
||
| Check that the container is running: | ||
|
|
||
| ```text | ||
| docker ps | ||
| ``` | ||
|
|
||
| The service runs on port `8099` by default. | ||
|
|
||
|
|
||
|
|
||
| ## Documentation | ||
|
|
||
| For additional details, refer to the documents listed below: | ||
|
|
||
| - **[Build and Run Guide](docs/build-and-run.md)**: Detailed instructions for building and running the service. | ||
| - **[Configuration Guide](docs/configuration.md)**: Details on configuration properties and template setup. | ||
|
|
||
| ## Contribution & Community | ||
|
|
||
| • To learn how you can contribute code to this application, [click here](https://docs.mosip.io/1.2.0/community/code-contributions). | ||
|
|
||
| • If you have questions or encounter issues, visit the [MOSIP Community](https://community.mosip.io/) for support. | ||
|
|
||
| • For any GitHub issues: [Report here](https://github.com/mosip/print/issues) | ||
|
|
||
| ## License | ||
| This project is licensed under the terms of [Mozilla Public License 2.0](LICENSE). | ||
|
|
||
| This project is licensed under the [Mozilla Public License 2.0](LICENSE). |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.