Working with Source Code
Use the sunbird-rc-core project — the java folder contains all the registry modules plus the claims service.
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.
Install dependencies and run
cd java./mvnw clean installSet up the database and any feature-dependent services (see Feature services below)
Set the minimum required env vars:
connectionInfo_uri,connectionInfo_username,connectionInfo_password,authentication_enabled— variables starting withconnectionInfo_configure the database (see Environment Variable Reference); checkdocker-compose.yml'sregistryservice for examples.cdto theregistrypackage, export the env vars, run../mvnw spring-boot:run
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 csThis starts Keycloak (kc), Postgres (db), ElasticSearch (es), and the Claims Service (cs).
Configure the Keycloak secret
Go to
http://localhost:8080/auth/admin/master/console/#/realmsLog in as
admin/adminClick Sunbird RC → Clients → admin-api → Credentials tab
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.
Update the frontend URL whenever the deploy DNS changes.
Feature services
Most can run via the project's docker-compose.yml for local dev. Enable or disable each with its own flag:
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
Troubleshooting — Prisma migration issue. Happens when Prisma migration tables aren't set and the database isn't empty.
If you can wipe the database, do so and set up the identity service first.
In production (or wherever cleanup isn't possible), baseline the database and restart the identity, credential-schema, and credential services.
Last updated