The MOSIP Reference Implementation (Ref Impl) repository contains country-specific customizations and implementations that extend the core MOSIP platform. It serves as a reference for how different countries can adapt and implement MOSIP according to their unique requirements and regulations.
The mosip-ref-impl contains the following services:
- cache-provider-hazelcast : Hazelcast based cache provider Reference implementation
- cache-provider-redis : Redis based cache provider Reference implementation
- kernel : Reference implementation for core libraries
- kernel-ref-idobjectvalidator : Reference implementation for ID Object Validator
- kernel-smsserviceprovider-msg91 : Reference implementation for msg91 SMS Service Provider
- kernel-virusscanner-clamav : Reference implementation for clamv Virus Scanner
- keycloak : Reference implementation for keycloak
- pre-registration-booking-service : Reference implementation for pre-registration booking service.
- registration-processor : Reference implementation for registration processor external integration.
- registration-processor-external-integration-service : Reference implementation for external integration service.
- registration-processor-external-stage : Reference implementation for external stage.
The project can be set up in two ways:
Before you begin, ensure you have the following installed:
- JDK: 21.0.3
- Maven: 3.9.6
- Docker: Latest stable version
- PostgreSQL: 16.0
- Keycloak: Check here
Add the below dependencies to the classpath, or include it as a Maven dependency in your pom.xml.
kernel-auth-adapter.jarkernel-ref-idobjectvalidator.jar
- This module uses the following configuration files that are accessible in this mosip-config repository.
Please refer to the required released tagged version for configuration:
- Configuration-registration, Configuration-pre-registration and Configuration-Application are defined here. You need to run the config-server along with the files mentioned above.
The following properties must be configured with your environment-specific values before deployment:
Database Configuration:
mosip.registration.processor.database.hostname- Database hostname (default: postgres-postgresql.postgres)mosip.registration.processor.database.port- Database port (default: 5432)db.dbuser.password- Database user password (passed as environment variable)
IAM/Keycloak Configuration:
keycloak.internal.url- Internal Keycloak URL (passed as environment variable)keycloak.external.url- External Keycloak URL (passed as environment variable)mosip.regproc.client.secret- Registration processor client secret (passed as environment variable)
Service URLs:
mosip.kernel.authmanager.url- Auth manager service URLmosip.kernel.keymanager.url- Key manager service URLmosip.kernel.masterdata.url- Masterdata service URLmosip.kernel.notification.url- Notification service URLmosip.idrepo.identity.url- ID repository identity service URLmosip.api.internal.url- Internal API base URL
- Make sure the config server is running. For detailed instructions on setting up and running the config server, refer to the MOSIP Config Server Setup Guide.
Note: Refer to the MOSIP Config Server Setup Guide for setup, and ensure the properties mentioned above in the configuration section are taken care of. Replace the properties with your own configurations (e.g., DB credentials, IAM credentials, URL).
- Clone the repository:
git clone <repo-url>
cd <service-name>
- Build the project:
mvn clean install -Dmaven.javadoc.skip=true -Dgpg.skip=true
-
Start the application:
- Click the Run button in your IDE, or
- Run via command:
java -jar target/specific-service:<$version>.jar
-
Verify Swagger is accessible.
Recommended for users who want a quick, ready-to-use setup — testers, students, and external users.
Pull the latest pre-built images from Docker Hub using the following commands:
docker pull mosipid/pre-registration-booking-service:1.3.0
Recommended for contributors or developers who want to modify or build the services from source.
- Clone and build the project:
git clone <repo-url>
cd <service-name>
mvn clean install -Dmaven.javadoc.skip=true -Dgpg.skip=true
- Navigate to each service directory and build the Docker image:
cd <service-name>/<service-directory>
docker build -t <service-name> .
Start each service using Docker:
docker run -d -p <port>:<port> --name <service-name> <service-name>
Check that all containers are running:
docker ps
Access the services at http://localhost:<port> using the port mappings listed above.
To deploy mosip ref impl services on a Kubernetes cluster, refer to the Sandbox Deployment Guide.
API endpoints, base URL, and mock server details are available via Stoplight and Swagger documentation for below services:
- Registration Processor External Integration Service API Documentation.
- Pre-Registration Booking Service API Documentation.
For more detailed documents check below links:
• To learn how you can contribute code to this application, click here.
• If you have questions or encounter issues, visit the MOSIP Community for support.
• For any GitHub issues: Report here
This project is licensed under the Mozilla Public License 2.0.