Steps to run the application
npm i
npm i -g pm2
cp sample.env .env
- Edit the
.env
file according to your configuration of keycloak and other vars accordingly.
This will run the service in background on the server. Allow ports accordingly if you want it to be accessible on internet.
pm2 start npm --name "lr-service" -- start
Service will start on PORT 5000
Student and teacher have not username and password associated with it, so they both have /register
endpoints and institutes only have /login
endpoints. Please go through the postman collection shared above.
Auth Backend Wrapper
- casa-user-data-service
Keycloak in CASA upgarded
- casa-keycloak
Login and Registration Service - BFF
- lr-service
Registry Sunbird-RC
- upsmf-registry
Mock Schema
- Mock Schema
NOTE: Hasura - CRUD and Regsitry compliant is not needed
# CASA KEYCLOAK ENV VARS
# Set CASA Keyclaok using https://github.com/UPHRH-platform/casa-keycloak
# Change http://localhost:8080 to your deployment instance
ACCESS_TOKEN_URI_CASA=http://localhost:8080/realms/master/protocol/openid-connect/token
# Create an application in CASA keycloak and provide creds in base64 format
ENCODED_CLIENTID_CLIENTSECRETS_CASA=bHItc2VydmljZTpIVmx6NFprR2hCeGgzemtuZmc0SlVyZmQ4TW04cUhveA==
INFO_URI_CASA=http://localhost:8080/realms/master/protocol/openid-connect/userinfo
# Deploy Sunbird RC - https://docs.sunbirdrc.dev/use/setup-the-backend and edit BASE URL of following vars accordingly
BASE_URI_RC=http://64.227.184.175:8081/api/v1/
# RC's keycloak URI
ACCESS_TOKEN_URI_RC=http://localhost:34199/auth/realms/sunbird-rc/protocol/openid-connect/token
# Default client ID
RC_CLIENTID=cmVnaXN0cnktZnJvbnRlbmQ=
ADMIN_ACCESS_TOKEN_URL=http://localhost:34199/auth/realms/master/protocol/openid-connect/token
RC_RESET_PASSWORD_BASE_URL=http://localhost:34199/auth/admin/realms/sunbird-rc/users/
ADMIN_USERNAME=admin
ADMIN_PASS=admin
ADMIN_USER_INFO_URL=http://localhost:34199/auth/admin/realms/sunbird-rc/users
# PRIVATE casa-user-data-service URI --> https://github.com/UPHRH-platform/casa-user-data-service PORT 3000
TUTOR_DATA_CASA_BASE_URI=http://localhost:3000/tutor/
STUDENT_DATA_CASA_BASE_URI=http://localhost:3000/student/