For the complete documentation index, see llms.txt. This page is also available as Markdown.

Working with Source Code

Use the sunbird-rc-core project — the java folder contains all the registry modules plus the claims service.

Java version: JDK 11

1

Compile the registry

$ sh configure-dependencies.sh
$ cd java
$ ./mvnw clean install -DskipTests
$ cd ..

This produces a JAR in java/registry/target.

2

Configure schemas

Create a _schemas/ folder at java/registry/src/main/resources/public/ and place your schema files there. A sample student-teacher schema set is available in the registry-cli templates. See Creating Your Own Schemas to write your own.

3

Install dependencies and run

  1. cd java

  2. ./mvnw clean install

  3. Set up the database and any feature-dependent services (see Feature services below)

  4. Set the minimum required env vars: connectionInfo_uri, connectionInfo_username, connectionInfo_password, authentication_enabled — variables starting with connectionInfo_ configure the database (see Environment Variable Reference); check docker-compose.yml's registry service for examples.

  5. cd to the registry package, export the env vars, run ../mvnw spring-boot:run

4

Start the dependent services

$ curl https://raw.githubusercontent.com/Sunbird-RC/registry-cli/main/src/templates/docker-compose.yml > docker-compose.yml
$ curl https://raw.githubusercontent.com/Sunbird-RC/registry-cli/main/src/templates/config/keycloak/realm-export.json > imports/realm-export.json
$ docker-compose up kc db es cs

This starts Keycloak (kc), Postgres (db), ElasticSearch (es), and the Claims Service (cs).

5

Configure the Keycloak secret

  1. Go to http://localhost:8080/auth/admin/master/console/#/realms

  2. Log in as admin / admin

  3. Click Sunbird RC → Clients → admin-api → Credentials tab

  4. Copy the secret

Then set the frontend URL in Keycloak to whatever URL you use to generate tokens (e.g. http://localhost:8080/auth): log in to the Keycloak UI, select realm sunbird-rc, and set it under General settings → frontend URL.

6

Run the registry

$ java -jar java/registry/target/registry.jar

Feature services

Most can run via the project's docker-compose.yml for local dev. Enable or disable each with its own flag:

Service
Flag
Notes

Encryption Service

encryption_enabled=true

—

ID Gen Service

idgen_enabled=true

—

Credentials services (current)

signature_enabled=true, did_enabled=true, certificate_enabled=true

Also set signature_provider=dev.sunbirdrc.registry.service.impl.SignatureV2ServiceImpl; the other signature_v2_*/did_* envs default correctly in docker-compose.yml. certificate_enabled is what generates PDFs.

Old credentialling services

signature_enabled=true

With signature_provider=dev.sunbirdrc.registry.service.impl.SignatureV2ServiceImpl

Keycloak Service

authentication_enabled=true

Plus enableLogin in the schema; check envs starting with sunbird_sso_, sunbird_keycloak, oauth2_resource_

ElasticSearch Service

search_providerName=dev.sunbirdrc.registry.service.ElasticSearchService

Supports v6; configure with elastic_search_* envs

Claims Service

claims_enabled=true

—

File Storage Service

filestorage_enabled=true

Configure with filestorage_* envs; backed by Minio (S3-compatible cloud storage or a local Minio instance)

Kafka & Zookeeper

—

Needed for async_enabled, event_enabled, or notification_enabled/notification_async_enabled

Metrics Service

event_enabled=true

Configure with event_* envs

Notification Service

notification_enabled=true

Configure with notification_* envs

Redis Service

manager_type=DistributedDefinitionsManager

Configure with redis_* envs

Last updated