# Overview

## **What is Sunbird ED, and what does it solve for?**

Sunbird ED is a software leveraged to enable learning, capacity building, professional development, and content distribution solutions. These are applicable in multiple domains such as Education, Agriculture, Healthcare, and anywhere learning is a primary need.

Here are a few examples of solutions that can be enabled through Sunbird ED:

1. Targeted training or self-driven learning through courses, where users can be issued a digitally verifiable proof/credential of their learning.
2. Providing reference materials for self-directed learning by users. E.g. How-to videos for farmers and health workers.

## **What does Sunbird ED provide?**

Sunbird ED allows you to configure and instantiate a ready-to-use platform along with three applications enabling specific solutions according to your needs and context.

Three applications - a mobile app, a desktop app, and a web portal allow user engagement on different types of devices.

## **Adopters of Sunbird ED**

1. **DIKSHA** - Digital Infrastructure for Knowledge Sharing by NCERT, MOE
2. **Lex** by Infosys

## **Key Capabilities**

![Key Capabilities of Sunbird ED](/files/E2GoLW8HvHwQnMc88LEA)

**A short video about SunbirdED and its functional capabilities**

{% file src="/files/csx3TuU0d10xWlQKVDBf" %}

### **Learning Apps**

Consume content on any device using a mobile app, web portal, or Desktop app in online and offline modes.

### **Asset sourcing**

Manage contributions, crowdsource and curate digital assets using an asset-sourcing portal.

### **Organised Collections**:

Arrange the content into collections like playlists, courses, textbooks, episodes, etc.

Enable discovery and meaningful tagging by defining and setting up your own asset taxonomies and categorisation. Link assets to QR codes to enable access to digital assets from physical material by a simple QR scan.

### **Discovery - Digital & Phygital**:

Discovery of Content using Digital and Phygital means using reference apps like Mobile, Web, and Desktop. Recommend content using the personalised preferences of the user. Enable Users to discover content using phygital methods like simple QR scanners.

### **User Engagement:**

User account creation, login, and user profile with learning passbook. User engagement using Groups, Discussion forums, Events, Notifications, and Chatbot.

### **Rich & Diverse Content:**

Enable experience with a wide variety of content such as simulations, explanations, e-books, games, virtual labs, and AR/VR experiences using multiple formats - HTML, videos, h5p, pdf, audio, and ePub. Content Editors and Players embeddable in user applications

### **Versatile Question Bank:**

Set up and use a question bank for various use cases such as practice, assessment, quizzes, worksheets, surveys, observations, and others. Allow users to access questions using Question Set Player, which can be enabled using the pluggable Question Set Editor.

### **Observability**

Capture user engagement-centric metrics and analytics using telemetry and data pipeline. Observe user behavior, monitor progress, and drive improvements in user experience through actionable data-driven dashboards. Process more than two billion+ events in a day.

### **Launch Course**

Create and manage course batches for user enrolment. Enable the capability to review user progress, assessment, or quiz performance.

### **Verifiable Credentials**

Enable and manage rewards for the users using multiple ways such as rule-based certificate issuance, badges, ranking, etc.

### **Multi-channel Chatbot**

Enable users to engage using pre-defined or free-flowing conversations. Leverage this for various use cases such as Q\&A, surveys, quizzes, assessments, etc.

### **Targeted Programs**

Enable targeted time-bound programs with defined digital assets to be consumed. It also enables projects with defined tasks, helping users structure their execution.


# Capabilities

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-type="content-ref"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><mark style="color:blue;"><strong>Learning Apps</strong></mark></td><td>Mobile, Web and Desktop apps</td><td></td><td><a href="/files/4CxnUUgXty80kFhrOyNO">/files/4CxnUUgXty80kFhrOyNO</a></td><td><a href="https://ed.sunbird.org/v/release-7.0.0-draft/learn/functional-capabilities/learning-apps">https://ed.sunbird.org/v/release-7.0.0-draft/learn/functional-capabilities/learning-apps</a></td><td><a href="/pages/VQYZ4Z2xE9z5NckonDuy">/pages/VQYZ4Z2xE9z5NckonDuy</a></td></tr><tr><td><mark style="color:blue;"><strong>Asset Sourcing</strong></mark></td><td>Learn to source, crowdsource and curate digital assets</td><td></td><td><a href="/files/RRaPnCGKYQoLBY9u6RAA">/files/RRaPnCGKYQoLBY9u6RAA</a></td><td><a href="https://ed.sunbird.org/v/release-7.0.0-draft/learn/functional-capabilities/asset-sourcing">https://ed.sunbird.org/v/release-7.0.0-draft/learn/functional-capabilities/asset-sourcing</a></td><td><a href="/pages/Hj5NsZK6CSugNHH1ZSk8">/pages/Hj5NsZK6CSugNHH1ZSk8</a></td></tr><tr><td><mark style="color:blue;"><strong>Organised Collections</strong></mark></td><td>Arrange the content to enable meaningful tagging and discovery</td><td></td><td><a href="/files/R1VGT4A9Sh6w4gquCUr5">/files/R1VGT4A9Sh6w4gquCUr5</a></td><td><a href="https://ed.sunbird.org/v/release-7.0.0-draft/learn/functional-capabilities/organised-collections">https://ed.sunbird.org/v/release-7.0.0-draft/learn/functional-capabilities/organised-collections</a></td><td><a href="/pages/fnKG3LiWj46TITwXiKHS">/pages/fnKG3LiWj46TITwXiKHS</a></td></tr><tr><td><mark style="color:blue;"><strong>Discover Content - Digital &#x26; Phygital</strong></mark></td><td>Discover content using reference apps and QR scanner</td><td></td><td><a href="/files/j39gzLYZFGbFDD225XW1">/files/j39gzLYZFGbFDD225XW1</a></td><td><a href="https://ed.sunbird.org/v/release-7.0.0-draft/learn/functional-capabilities/discover-content-digital-and-phygital">https://ed.sunbird.org/v/release-7.0.0-draft/learn/functional-capabilities/discover-content-digital-and-phygital</a></td><td><a href="/pages/HbhCLMJhOwGKYQ5NhyG0">/pages/HbhCLMJhOwGKYQ5NhyG0</a></td></tr><tr><td><mark style="color:blue;"><strong>User Engagement</strong></mark></td><td>Engage users using Groups, Discussion forums or chatbots</td><td></td><td><a href="/files/PxpDa5XnGLH1akYMohBW">/files/PxpDa5XnGLH1akYMohBW</a></td><td><a href="https://ed.sunbird.org/v/release-7.0.0-draft/learn/functional-capabilities/user-engagement">https://ed.sunbird.org/v/release-7.0.0-draft/learn/functional-capabilities/user-engagement</a></td><td><a href="/pages/oeIuXxERlIrcEn6d5peC">/pages/oeIuXxERlIrcEn6d5peC</a></td></tr><tr><td><mark style="color:blue;"><strong>Rich and Diverse Content</strong></mark></td><td>Support multiple formats with embeddable content editors and players</td><td></td><td><a href="/files/gmXO215pEADOwVBcSjbH">/files/gmXO215pEADOwVBcSjbH</a></td><td><a href="https://ed.sunbird.org/v/release-7.0.0-draft/learn/functional-capabilities/rich-and-diverse-content">https://ed.sunbird.org/v/release-7.0.0-draft/learn/functional-capabilities/rich-and-diverse-content</a></td><td><a href="/pages/yn7HZmPhOtWpRwfI2VcC">/pages/yn7HZmPhOtWpRwfI2VcC</a></td></tr><tr><td><mark style="color:blue;"><strong>Versatile Question Bank</strong></mark></td><td>Use for various use cases :  practice, assessments, quizzes, etc</td><td></td><td><a href="/files/gQvGLpMPl6SdfaraA46n">/files/gQvGLpMPl6SdfaraA46n</a></td><td><a href="https://ed.sunbird.org/v/release-7.0.0-draft/learn/functional-capabilities/versatile-question-bank">https://ed.sunbird.org/v/release-7.0.0-draft/learn/functional-capabilities/versatile-question-bank</a></td><td><a href="/pages/lLE7mpk2uKhUg7NCbKPE">/pages/lLE7mpk2uKhUg7NCbKPE</a></td></tr><tr><td><mark style="color:blue;"><strong>Observability</strong></mark></td><td>Learn to capture and observe user behaviour to improve user experience</td><td></td><td><a href="/files/8HYmJf5pgKXz4ydyuvad">/files/8HYmJf5pgKXz4ydyuvad</a></td><td><a href="https://ed.sunbird.org/v/release-7.0.0-draft/learn/functional-capabilities/observability">https://ed.sunbird.org/v/release-7.0.0-draft/learn/functional-capabilities/observability</a></td><td><a href="/pages/c6stIOSvFjXE6p8mwxa1">/pages/c6stIOSvFjXE6p8mwxa1</a></td></tr><tr><td><mark style="color:blue;"><strong>Launch Course</strong></mark></td><td>Learn to create and manage course batches for user engagement</td><td></td><td><a href="/files/zWEKTabvOJCFGhnA2Nej">/files/zWEKTabvOJCFGhnA2Nej</a></td><td><a href="https://ed.sunbird.org/v/release-7.0.0-draft/learn/functional-capabilities/launch-course">https://ed.sunbird.org/v/release-7.0.0-draft/learn/functional-capabilities/launch-course</a></td><td><a href="/pages/YY9CKSzeDyN6JpfslEmH">/pages/YY9CKSzeDyN6JpfslEmH</a></td></tr><tr><td><mark style="color:blue;"><strong>Verifiable Credentials</strong></mark></td><td>Learn to enable and manage rewards for the users</td><td></td><td><a href="/files/I49L0oeJtVblFzpipJ3h">/files/I49L0oeJtVblFzpipJ3h</a></td><td><a href="https://ed.sunbird.org/v/release-7.0.0-draft/learn/functional-capabilities/verifiable-credentials">https://ed.sunbird.org/v/release-7.0.0-draft/learn/functional-capabilities/verifiable-credentials</a></td><td><a href="/pages/NovOvloH42bf3bIEDDVf">/pages/NovOvloH42bf3bIEDDVf</a></td></tr><tr><td><mark style="color:blue;"><strong>Multi-Channel Chatbot</strong></mark></td><td>Engage users using pre-defined and free-flowing conversations</td><td></td><td><a href="/files/PoHMgXBmWDSwy3tYET4L">/files/PoHMgXBmWDSwy3tYET4L</a></td><td><a href="https://ed.sunbird.org/v/release-7.0.0-draft/learn/functional-capabilities/multi-channel-chatbot">https://ed.sunbird.org/v/release-7.0.0-draft/learn/functional-capabilities/multi-channel-chatbot</a></td><td><a href="/pages/zL4VfguBVNfFUuHVfNaH">/pages/zL4VfguBVNfFUuHVfNaH</a></td></tr><tr><td><mark style="color:blue;"><strong>Targeted Programs</strong></mark></td><td>Enable time-bound programs to help users structure their tasks</td><td></td><td><a href="/files/TDPxOtdjT8yDibwtdtf0">/files/TDPxOtdjT8yDibwtdtf0</a></td><td><a href="https://ed.sunbird.org/v/release-7.0.0-draft/learn/functional-capabilities/targeted-programs">https://ed.sunbird.org/v/release-7.0.0-draft/learn/functional-capabilities/targeted-programs</a></td><td><a href="/pages/4Ma1q70p2ODrr0haKhnu">/pages/4Ma1q70p2ODrr0haKhnu</a></td></tr><tr><td><mark style="color:blue;"><strong>Manage Learn</strong></mark></td><td>Project, Observation and Surveys</td><td></td><td></td><td><a href="https://ed.sunbird.org/v/release-7.0.0-draft/learn/functional-capabilities/manage-learn">https://ed.sunbird.org/v/release-7.0.0-draft/learn/functional-capabilities/manage-learn</a></td><td><a href="/pages/XAOmE0vuY558GoBAKgfY">/pages/XAOmE0vuY558GoBAKgfY</a></td></tr><tr><td><mark style="color:blue;"><strong>Product and Developer's Guide</strong></mark></td><td></td><td></td><td></td><td><a href="https://ed.sunbird.org/v/release-7.0.0-draft/learn/functional-capabilities/product-and-developers-guide">https://ed.sunbird.org/v/release-7.0.0-draft/learn/functional-capabilities/product-and-developers-guide</a></td><td></td></tr></tbody></table>


# Learning Apps

Enable learning for anyone, on any device, anywhere

### <mark style="color:orange;">What are Learning Apps?</mark>

Learning Apps are front-end applications, i.e., mobile app, web app and desktop app created to deliver educational content, provide interactive learning experiences, and engage users in various learning tasks.&#x20;

Learning apps can be accessed through different devices, such as mobile phones, tablets, or computers.

![](/files/9VfoOZSbmIvL4dwelBE6)

#### <mark style="color:blue;">Mobile App</mark>

* Sunbird Mobile App is a reference application which is primarily used for consumption in both online and offline modes. Users can access, play and share a variety of learning content on the app, such as textbooks, PDFs, and videos.
* Mobile app supports both Android(6+) and iOS(9+) and has in-app upgrades with notifications enabled.

#### <mark style="color:blue;">Web App</mark>

* Sunbird Web App is a reference learning application which is browser-based and is used for both creation and consumption of learning content.&#x20;
* Web app runs on the latest browsers on desktops, mobile phones, and tablets. It is compatible with Chrome 47+, Safari 13+, and Firefox.

#### <mark style="color:blue;">Desktop App</mark>

* Sunbird Desktop app is a reference learning application which is primarily used for offline consumption. This application is used at places where the Internet connectivity is unavailable or limited.&#x20;
* Desktop app runs on Windows, Linux and MacOS.

### <mark style="color:orange;">Why do you need learning apps?</mark>

Here are a few key reasons why learning apps are needed:

1. **Accessible Learning**: Learning apps provide convenient access to educational resources anytime and anywhere. Users can learn at their own pace, whether at home, school, or on the go.
2. **Personalized Learning**: They provide adaptive content, targeted assessments, and customized recommendations, ensuring effective learning outcomes.
3. **Interactive and Engaging**: Learning apps often incorporate gamification elements, interactive features, and multimedia content that make learning more enjoyable and engaging. This enhances learner motivation and retention of information.
4. **Diverse Learning Content**: Learning apps can provide a wide range of learning materials, including text, video, audio, interactive quizzes, simulations, and more.&#x20;
5. **Continuous Learning**: Learning apps support lifelong learning by offering ongoing access to new information, updates, and the latest educational resources.&#x20;

Overall, learning apps facilitate flexible, personalized, and engaging learning experiences that empower individuals to acquire knowledge and skills effectively in the digital age.

### <mark style="color:orange;">Where can you use learning apps?</mark>

Learning apps can be applied in any setting where there is a need for effective and engaging learning experiences such as:

* schools
* universities
* professional training programs
* self-learning environments

### <mark style="color:orange;">How to configure?</mark>

The above capabilities of Learning apps are derived from components of Sunbird ED. You can find details by clicking on the link [here](/learn/functional-capabilities/product-and-developers-guide/learning-apps)


# Asset Sourcing

### <mark style="color:orange;">What is Asset Sourcing?</mark>

Asset sourcing is the process of managing contributions, crowdsourcing, and curating digital assets using an asset sourcing portal. It involves creating an asset taxonomy, identifying framework categories, associating assets with multiple types, reviewing, publishing assets, and more.

### <mark style="color:orange;">Why do you need to source assets?</mark>

Asset sourcing is needed for a meaningful discovery of assets. It allows assets to be crowdsourced, tagged to relevant frameworks, and contributed using an asset sourcing web app, which facilitates the creation, review, publication, and curation of assets for consumption.

### <mark style="color:orange;">How can you use asset sourcing?</mark>

Here's how you can use asset sourcing. You can:

1. **Create a Sourcing Project**: As an organization admin, create a project to source assets. Define the purpose of the project, select the sourcing type (from anyone, selected contributors, or within your organization), and set nomination and contribution deadlines.
2. **Seek Contributions**: Once the project is created, contributors can enroll and nominate themselves to contribute assets.
3. **Review and Curate**: Review the nominations and contributions received from contributors. You can choose to have a two-level review process (contributing organization admin and sourcing organization admin) or skip it.
4. **Publish Assets**: After reviewing and curating the assets, publish them for consumption by your users.
5. **Monitor Usage**: Keep track of the usage and feedback of the published assets to identify areas for improvement.

### <mark style="color:orange;">How to configure?</mark>

Asset Sourcing can be used by leveraging the features provided by the Sourcing Web App, Contribution Service, and Contribution Registry components of Sunbird CoKreat. The coKreat platform provides tools and services to support the engagement, collection, curation, publishing, monitoring, and rewarding of contributions throughout the asset sourcing process.

You can find details by clicking on the link [here](/learn/functional-capabilities/product-and-developers-guide/asset-sourcing)


# Organised Collections

### <mark style="color:orange;">What are Organised Collections?</mark>

Organised collections are a feature in Sunbird ED that allow creators to group and organize assets in a structured manner for easy discovery and consumption by users. Collections can be categorized into different types such as:

* Courses
* Textbooks
* Playlists
* Episodes
* Web series
* TV Classes

There are two types of collections:

1. **Trackable Collection**: These collections enable tracking of user consumption behavior and metadata. Examples include courses, TV shows, training materials, and collections with assessments.
2. **Non-Trackable Collection**: These collections do not track user consumption data. Examples include textbooks and playlists.

Collections are grouped under "Primary Categories" metadata, which helps users discover and consume content more easily.

### <mark style="color:orange;">Why do you need to organise collections?</mark>

Organising assets into a collection makes the asset easily discoverable for the platform users. Collections can also be attached with certain behavioural, discoverable metadata.

Organizing collections is important for several reasons:

1. **Discoverability**: By organizing collections, you make it easier for users to find and access the content they need. Collections act as a structured way to categorize and group related assets, making it more efficient for users to discover and navigate through the content.
2. **Contextualization**: Organized collections provide context and relevance to the content. By linking assets within a collection, you create a logical flow and structure, allowing users to understand the relationships between different pieces of content.
3. **Personalization**: By tagging and categorizing collections, you can target specific frameworks or user preferences, ensuring that the right content reaches the right users based on their individual needs and preferences.
4. **Tracking and Progress**: This feature facilitates personalized learning journeys and provides insights into user behavior and engagement.

### <mark style="color:orange;">How can you use Organised Collections?</mark>

Organised Collections in Sunbird provide the capability to group assets together into collections, making them easily discoverable for platform users.&#x20;

Here's how you can use Organised Collections:

1. **Categorize Assets**: You can create various categories of collections based on your solution or domain needs. For example, you can create collections like courses, textbooks, playlists, etc.
2. **Hierarchy Organization**: Organize your assets in a multi-level hierarchy by creating folders and grouping assets under them. Each level of the hierarchy can have one or more folders.
3. **Metadata Tagging**: Tag metadata at the collection level, folder level, and asset level to ensure efficient organization and discoverability. Metadata attributes can be configured based on your requirements.
4. **Trackable vs Non-Trackable Collections**: Decide whether a collection should be trackable or non-trackable. Trackable collections enable tracking user consumption data, while non-trackable collections exclude this data.
5. **Collection Editor**: Use the Collection Editor tool, an Angular Typescript-based editor, to create and edit collections. This tool allows you to create multiple assets and organize them as structured collections.

By utilizing Organised Collections, you can effectively manage and present your assets in a structured manner, enhancing the discoverability and consumption experience for users.

### <mark style="color:orange;">How to configure?</mark>

The above capabilities of Organized collections are derived from components of Sunbird Knowlg.&#x20;

You can find details by clicking on the link [here](/learn/functional-capabilities/product-and-developers-guide/organised-collections)


# Discover Content - Digital & Phygital

### <mark style="color:orange;">What are Digital and Phygital Content Discovery?</mark>

Content discovery refers to the process of finding and exploring digital content that is relevant and of interest to a user.

### <mark style="color:orange;">Why do you need this feature?</mark>

Content discovery helps users find interesting and relevant content among the options available. This process improves user engagement by showing them content they're interested in, leading to a better experience.

### <mark style="color:orange;">How can you use Content Discovery?</mark>

Currently, Content Discovery can be facilitated through the following means:

1. Digital
2. Phygital

#### **Digital**&#x20;

To enable asset discovery through digital means, the platform provides the content to be tagged with different metadata as follows:

1. Audience Type&#x20;
2. Framework Categories
3. Topic
4. Primary Category
5. Additional Category
6. Program or Custom Tags

<details>

<summary>Details</summary>

1. **Audience Type**

It is possible to associate the content with specific personas by tagging the personas with content.&#x20;

Content such as Student Material to Student Persona, Training to Teacher Persona, etc.

2. **Framework Categories**

For an effective discovery of content, every content is associated with multiple framework categories.&#x20;

Examples:

For School Education: Board, Medium, Grade, and Subject

For Professional Training: Department, Domain, and Subject

3. **Topic**&#x20;

For ease of discovery, creators can leverage topics to uniquely identify the content.

4. **Primary Category**

Most of the content has some real-world application for the user, which is represented as "Primary Category".&#x20;

Examples: TextBooks, TV Classes, Courses, Play Lists, Learning Episodes, etc.

5. **Additional Category**&#x20;

Sometimes content might be shared across more than one category. In order to facilitate such requests platform enables the creator to tag multiple additional categories.&#x20;

Examples: Learning Content, Workbooks, Explanation Content, etc.

6. **Program or Custom Tags**

Content might have to be discovered as part of a program or campaign. The platform enables creators to tag the content with program-specific tags.&#x20;

Example: "AI\_COURSE", "INDEPENDENCE\_\_DAY\_\_QUIZ", etc.

</details>

#### **Phygital**

To bridge the digital world with the physical world to provide a unique interactive experience for the user. Sunbird ED allows the users to attach the content to simple QR codes. QR codes of these contents are part of the dial code infrastructure API. Sunbird ED facilitates a straightforward and efficient method for discovering content through printed materials, campaigns, and other needs.

### <mark style="color:orange;">How to configure?</mark>

The above capabilities of Discover content are derived from components of Sunbird Knowlg. You can find details by clicking on the link [here](/learn/functional-capabilities/product-and-developers-guide/discover-content-digital-and-phygital).


# User Engagement

### <mark style="color:orange;">What does User Engagement mean?</mark>

Sunbird ED enhances user engagement with a simplified onboarding process, offering various sign-in methods. It focuses on creating a rich and diverse learning experience for users.

### <mark style="color:orange;">Why do you need to engage users on the platform?</mark>

Engaging users on platforms like Sunbird ED creates a dynamic online learning environment. It boosts user retention, enhances learning outcomes, and fosters a sense of community. It allows for a personalized experience through customizable user profiles and location settings. This approach encourages continued interaction with the platform's resources, aiming for a seamless and inclusive digital learning environment.

### <mark style="color:orange;">How can you engage users on the platform?</mark>

Sunbird ED, as a platform, supports various aspects of user engagement. Sunbird ED enables users to create and manage their accounts using open-source identity and access management solutions such as Keycloak.

Following are the important aspects that allow users to better engage with the platform.

#### **User Profile**:

Users can register/sign in using multiple channels:

1. Standard Login in Sunbird ED
2. SSO Login
3. Login with Google
4. Login with Apple (Available only in iOS)

Users getting onto the platform can be registered using any of the above channels. It enables the user to onboard onto the platform with some basic information about the user preferences, etc. All the information regarding the user preferences, role, and other credentials gets stored as part of user profiles. The user will have the capability to manage his preferences.

#### **User Location**

User location is required for report generation and segmentation purposes. The user's information on State and district has to be mandatorily accepted by the user. *Please note platform does not intend to ask for the user's precise location information. The option of location is mandated at the platform level.*&#x20;

{% hint style="info" %}
"Maxmind" APIs have used a source of information to detect the location of the user (State and District) and prefill the information for the user.
{% endhint %}

#### **Notifications**

Notification can be used to alert, update, announcements, etc. User Profiles can be leveraged to:

* send an in-app notification to drive the user to complete his/her tasks
* respond to specific requests on the platform

#### **Groups**

Groups as a feature will enable users to create a virtual cohort for the users. Allow the users to collaborate on learning content. It enables users to share a collection across the cohort. Reports & dashboards can also be generated for the specific cohort.

#### **Discussion Forums**

Discussion Forums are one of the channels for engaging users with respect to content. It allows multiple users to engage in learning discussions and clarifications on the content. Creates a virtual collaboration among users on a specific area of interest

### <mark style="color:orange;">How to configure?</mark>

The above capabilities of User engagement are derived from components of Sunbird Lern. You can find details by clicking on the link [here](/learn/functional-capabilities/product-and-developers-guide/user-engagement)


# Rich and diverse content

### <mark style="color:orange;">What are the rich and diverse contents in Sunbird?</mark>

Sunbird ED allows you to consume various content, enabling rich learning experiences.

Users can access content in multiple formats using content players.

![](/files/nQDoNDeff0LkSGbOQouD)

#### Rich and Diverse Content Formats in Sunbird ED

Here is an overview of the types of content accessible via Sunbird ED learning applications:

* **PDF (Portable Document Format)**\
  PDFs are versatile, supporting text, images, interactive elements like links and forms, audio, and video. They are commonly used for distributing educational materials such as textbooks, readings, and comics.
* **EPUB (Electronic Publication)**\
  The EPUB format is ideal for textual content like class books and comics featuring text, images, stylesheets, and metadata. It provides a reflowable content layout, adjusting to different screen sizes for optimal reading.
* **Audio**\
  Audio content includes digital audio formats such as TV classes and podcasts. These can come with subtitles and metadata, enriching the auditory.
* **Video**

  Videos are integral to Sunbird ED's multimedia learning approach, featuring engaging explanation videos, instructional TV classes, and more. With both audiovisual components and additional features like subtitles and metadata, videos offer a rich, immersive learning experience.
* **HTML**

  HTML (HyperText Markup Language) forms the backbone of web content in Sunbird ED, allowing for a rich display of interactive and 3D content. It is utilized to format text and incorporate multimedia elements like images and videos into web pages, enhancing the educational material's interactivity and accessibility.
* **H5P**

  H5P (HTML5 Package) enables the creation and sharing of a variety of interactive content types within Sunbird ED, including videos, presentations, quizzes, and interactive activities. It stands out by empowering educators and content creators to develop highly engaging and educational materials with ease.
* **ECML**

  ECML (EkStep Content Markup Language) is a specialized markup language designed for creating interactive content such as quizzes, simulations, and questions. By offering creators increased flexibility and configurability, ECML supports the development of dynamic, interactive learning experiences on Sunbird ED platforms.

### <mark style="color:orange;">How to Configure?</mark>

The above capabilities of Rich and Diverse Content are derived from components of Sunbird Knowlg.&#x20;

You can find details by clicking on the link [here](/learn/functional-capabilities/product-and-developers-guide/rich-and-diverse-content).


# Versatile Question Bank

### <mark style="color:orange;">What is a Question Bank?</mark>

Question Bank is a collection of questions that the creator can create for repeated use by users. Users can discover the questions on the learning apps and consume them using the question set player. **Question set player** has the following capabilities:

1. Supports online and offline consumption
2. Embeddable across learning apps

### <mark style="color:orange;">How to Create a Question Bank?</mark>

Questions can be created using the **question set editor,** which has the following capabilities:

1. Multiple question set categories to choose from and organised into different categories such as:
   * **Quiz:** Test the knowledge of participating users using time-bound standalone quizzes and their scores' analysis
   * **Practice Test:** Allows users to practice questions on important topics inside courses
   * **Surveys:** Allows users to take surveys for the creator
   * **Assessments:** Enable assessments inside courses for users to get a good understanding of topics and provide rewards using scores as well
2. Different types of Questions can be utilised for the categories above:
   * **Multiple choice questions**: The Multiple Choice Question (MCQ) allows users to select one or more correct answer(s) from a number of potential answers. There are various layout template options for this question type.
   * **Subjective questions** - Allows users to enter text in response to questions given by the creator.
   * **Fill in the blanks**: Allows users to type their responses into empty response boxes that have been inserted by the creator (To be developed)
   * **Match the following**: Allows users to match questions to the correct responses to pair associated items (To be developed)
   * **Math questions**: Math questions are backed by MathJax, which understands mathematical syntax and rules. Create open-ended math questions that have equations, expressions, etc.
   * **Chemistry Questions**: Powered by LATEX, LATEX is used worldwide for scientific documents, books, and many other forms of publishing.
3. Configurable behaviors
   * **Scoring** - Creators can provide different scores to different questions or can also choose the questions to be auto-scored
   * **Single or Multiple sections** - The Creator can choose to enable sections
   * **Instructions** - Provide users with instructions before the Question set. The Creator can also give instructions before each section as well.
   * **Shuffle questions** - Choose to auto-shuffle questions to each user
   * **Duration** - Set the time for a particular question
   * **Layout** - Choose different layouts for questions to be displayed in
     * Horizontal
     * Vertical
     * Grid
     * 2-Column
     * 3-Column

### <mark style="color:orange;">How can this feature be used?</mark>

#### Use Cases of Question Banks and Telemetry

**Question Banks**

1. **Academic Assessment**: Utilize in academic settings for standardized testing, mid-terms, finals, or entrance exams to gauge student understanding and proficiency.
2. **Corporate Training & Assessment**: Design pre-employment assessments or ongoing skill evaluations for employees to ensure they meet job requirements.
3. **Licensing & Certification**: Use for the administration of professional certification and licensing exams across various professions.
4. **Online Courses and MOOCs**: Embed in Massive Open Online Courses (MOOCs) and e-learning platforms for module quizzes, end-of-course exams, and self-assessment tools.
5. **Survey Research**: Create and distribute surveys for academic research, market research, or customer feedback.

**Telemetry**

1. **Learning Analytics**: Gain insights into how students interact with educational content, identify common misconceptions, and adjust teaching methods accordingly.
2. **User Engagement Analysis**: Measure engagement levels across different modules or platforms to improve user interface and learning experience.
3. **Content Performance**: Analyze which questions or topics are well-understood and which need revisiting or additional resources, guiding content improvement.
4. **Adaptive Learning Pathways**: Utilize data to personalize learning experiences, enabling platforms to suggest more relevant content based on user performance and behavior.
5. **Predictive Analysis**: Use historical data to predict future trends such as exam outcomes or course completion rates, assisting in early intervention strategies.

**Integrated Use Cases**

1. **Targeted Intervention**: Combine question bank results with telemetry data to identify areas where students struggle, allowing for targeted educational interventions.
2. **Skill Gap Analysis**: Employ within companies to determine skill gaps among employees, guiding training programs and personal development plans.
3. **Curriculum Development**: Inform curriculum designers by showing what students have mastered and where gaps persist, leading to informed course adjustments.
4. **Policy Making in Education**: Influence educational policy by providing data-driven insights into student performance at a granular level, facilitating systemic educational improvements.
5. **Feedback Loop for Continuous Improvement**: Create a feedback loop for content creators, educators, and platform developers to continuously improve learning materials and platforms based on actual user data and performance.

Question set player emits **telemetry data** (i.e. signals) for each action performed by the user. This makes a rich data pool available, which can be aggregated to get all types of insights. It is through these insights that various actors can make informed decisions. Data Dashboards are available on the consumption interfaces to show progress at the individual or institutional level.&#x20;

For example, imagine a set of tests held at engineering colleges to help identify the concepts where most students are weak. The aggregated data across geography, made available to the right stakeholders at the right time, helps arrive at timely interventions and long-term plans (like maybe the base of this concept isn’t understood well during high school, and the intervention is to be done then).

### <mark style="color:orange;">How to Configure?</mark>

The above capabilities of Question Bank are derived from components of Sunbird InQuiry. You can find details by clicking on the link below.

{% hint style="info" %}
Further details on [Versatile Question Bank](/learn/functional-capabilities/product-and-developers-guide/versatile-question-bank)
{% endhint %}

**Note**: The complete capabilities of inQuiry still need to be integrated within ED. You'll need to validate the workflows if you use inQuiry BB for your instance.


# Observability

### <mark style="color:orange;">What is Observability?</mark>

Observability is a critical concept in modern digital ecosystems, enabling organizations to monitor and understand the internal state of their systems based on external outputs.&#x20;

Sunbird ED provides observability by acknowledging users' actions in the form of consumption reports, course progress exhausts, and multiple Dashboards. This is enabled by 'Telemetry'.

Observability in Sunbird ED refers to the capability of tracking and understanding user actions and behaviors within the platform. It is achieved through the use of Telemetry, which automatically records and measures statistical data from user interactions. Telemetry collects information about who performed an action, what action was performed, on what object, where the action occurred, and using which tool. This data is then used to analyze user navigation, behavior, and usage patterns, providing insights for decision-making and research outcomes. Sunbird ED's observability features include consumption reports, course progress tracking, and multiple dashboards.

#### <mark style="color:orange;">Telemetry</mark>

Telemetry plays a fundamental role in the observability of systems like Sunbird ED by meticulously capturing and relaying data on user interactions and behaviors back to organizations for analysis. This automated data collection mechanism encompasses recording details of user actions, such as who performed it, the nature of the action, and the context within which it was performed. Through telemetry, Sunbird ED can generate detailed consumption reports, track course progress, and offer comprehensive dashboards, thereby enhancing decision-making and improving user experience. In broader applications, telemetry extends its utility to various fields including space exploration, healthcare, and environmental monitoring, demonstrating its versatility and critical importance in both digital and physical environments.

In today’s connected world, Telemetry is a term used for technologies that automatically record and measure statistical data from real-world use and forward it to IT systems in a remote location for further analysis and study. Telemetry is used in a myriad of industries from tracking spacecraft, medical monitoring, tracking wildlife, and so on.

‘Events’ are broad, human-readable actions that can be tracked as a string. Events are used to categorize telemetry data. They are the basic unit for analytics and help identify user navigation or flow.

The concept of telemetry events is to identify:

**Who** did **what**, **on** **what**, and **where**, **using** **what**, **in relation** to what?

Every event has the following sections and corresponding fields to capture the data:

| Section        | Description              | Attributes                |
| -------------- | ------------------------ | ------------------------- |
| About          | About the event          | ets mid                   |
| Who            | About the actor          | uid                       |
| did            | Verb or action           | eid                       |
| on what        | Action on what object?   | content\_id content\_ver  |
| and where      | Context of the action    | env did sid channel pdata |
| using what     | Using which tool?        | ?                         |
| In relation to | Related to which action? | cdata                     |

### <mark style="color:orange;">Why do we need Telemetry?</mark> <a href="#why-we-need-telemetry" id="why-we-need-telemetry"></a>

* **Continuous Improvement**: Sunbird ED relies on telemetry to continuously improve its educational services, ensuring content and features meet user needs and enhance learning outcomes.
* **User Behavior Insights**: Gathers data on how educators and learners interact with the platform, which features are most used, and how content is consumed, helping tailor the educational experience.
* **Product Development**: Informs the development of new features and services by highlighting user demands and identifying gaps in the current offerings.
* **Security and Compliance**: Enables monitoring for potential security threats and ensures compliance with educational standards and regulations.
* **Performance Monitoring**: Helps in identifying and resolving issues with the platform’s performance, ensuring a smooth and efficient user experience.
* **Informed Decision Making**: Provides a data-driven basis for decision making, from content curation to UI/UX design, significantly influencing the platform's evolution.
* **Customization and Personalization**: Aids in creating a more personalized learning experience by understanding individual and collective learning patterns and preferences.

The objective of telemetry is to assist in product, application, or service development, modification, or security. It works as a framework. Telemetry enables automatic collection of data from real-world, real-time use.

Typically, there are four levels of telemetry:

* Security
* Basic
* Enhanced
* Full

The level of data collected is a discrete decision of an organization or business. Analysis of this data offers insights into product and user behaviour and usage patterns, driving business decisions and research outcomes. You can program your telemetry analytics to suit your requirements.

Sunbird’s telemetry service has Full level telemetry.

### <mark style="color:orange;">How to Configure?</mark>

The above capabilities of Observability are derived from components of Sunbird Lern. You can find details by clicking on the link [here](/learn/functional-capabilities/observability)


# Launch Course

### <mark style="color:orange;">What is a Course?</mark>

"Course" is a "plan of study", usually leading to an exam or assessment.  Though Course, from a platform standpoint, is nothing but collections.&#x20;

### <mark style="color:orange;">Why do you need a Course?</mark>

It helps users to get the latest information on the subject and facilitates the user by evaluating his learning using assessments. There is a special recognition for courses as it has very extensive use cases of training, and learning.

A few important aspects of Courses are:

**Batch:**

A batch is a time frame under which users can be enabled to consume certain content. In order to facilitate the user's consumption of courses. The platform enables the creator of the course to create multiple batches to access the course. Every batch has startDate and endDate for which batch users can be permitted to consume courses. Platform strictly enforces the rule of batches for courses to be consumed by the users. All the reports generated are based on users of a particular batch.

**Assessments** :

A user's learning capability can be measured based on assessments (nothing but question sets). The user's performance in the assessment and its related metadata is persisted to generate multiple reports and dashboards. User's performance in the assessment can be rewarded using certificates etc.

**Course Progress**

User's learning with the course is aided by dynamic course progress computation. There are several business rules that can be enforced by the creator for criteria of completion. Enables the user to understand the progress of his course learning. Score reports, Assessment Attempts, and other related information are readily available on the platform.

**Reports**

User's progress and scores are computed as "Content State" API and the data is used to generate multiple aggregates such as course consumption reports of batch, content, location, etc.

### <mark style="color:orange;">How to Configure?</mark>

The above capabilities of Launch Courses are derived from components of Sunbird Knowlg.&#x20;

You can find details by clicking on the link [here](/learn/functional-capabilities/product-and-developers-guide/launch-courses)


# Verifiable Credentials

### <mark style="color:orange;">What are Verifiable Credentials?</mark>

Verifiable credentials are digital certificates that can be used to assert user information securely and privately. They are derived from components of Sunbird RC and have QR codes that can be used to verify user information further. These credentials are designed to provide the same benefits as physical credentials, such as driver's licenses and university degrees, but in a digital format.

### Why Do You Need a Verifiable Credential?

Verifiable credentials are necessary for several reasons:

1. **Secure and Private Information**: They ensure user information is stored and transmitted securely and privately, without compromising the user's identity.
2. **Machine-Verifiable**: Verifiable credentials can be machine-verifiable, making it easier to establish trust at a distance.
3. **Long-Term Claims**: They support longer-term claims, which can persist and be valid over longer periods, ensuring that the information remains valid even after the initial issuance

Verifiable Credentials represent a significant leap forward in digital identity verification, enabling users to secure and share proof of their qualifications, memberships, and competencies through a digitally verifiable format. Unlike traditional documents, these credentials are issued as digital certificates, often incorporating QR codes for easy verification. This modern approach not only streamlines the process of credential verification for the holder but also enhances security, reduces the potential for fraud, and offers a more efficient mechanism for organizations and institutions to confirm the authenticity of an individual’s claims. With platforms like SunbirdED facilitating the issuance, management, and sharing of these digital certificates, users gain unprecedented control over their digital identities, seamlessly proving their qualifications and achievements in a digital age.

SunbirdED enables the user to earn digitally verifiable credentials in the form of Certificates. These certificates have QR codes that can be used to further verify user information. Sunbird ED allows the user to maintain their own digital passbook with all the credentials. Users can continue to hold these credentials against their profiles and also download them for offline usage as well.

This digital empowerment simplifies the process of proving qualifications for individuals, eliminating the need for physical document verification and reducing the risk of fraud. Moreover, verifiable credentials can be stored and managed in digital wallets or platforms like SunbirdED, providing users with control over their digital identities and the sharing of their credentials. For example, a professional could share their digital certificate of membership to a recognized industry body with prospective employers, or an individual could prove their attendance at a specialized training workshop with a scanned QR code, right from their smartphone. This innovation not only streamlines verification for the credential holder but also offers a seamless way for employers, educational institutions, and service providers to confirm the authenticity of claims made by an individual.

![Digital Certificate](/files/IeoOVLnMOIchW8sl4QZh)

The above capabilities of Verifiable Credentials are derived from components of Sunbird RC. You can find details by clicking on the link [here](/learn/functional-capabilities/product-and-developers-guide/verifiable-credentials)


# Multi-Channel Chatbot

### <mark style="color:orange;">What is a Chatbot?</mark>

A chatbot is a software that can help users by automating conversations and interacting with them through messaging platforms.

### <mark style="color:orange;">Why do you need a Chatbot?</mark>

Chatbots can be utilised for:

1. **Discovery:** The creator can enable the discovery of content, programs, apps, etc., for its users.
2. **Query resolution:** User's queries related to anything for which a help section is required can be resolved.
3. **Updates and Announcements:** The creator can put personalised updates and announcements for its users to consume.
4. **Contextual engagement:** The creator can significantly improve the user interaction on your platform by implementing contextual chatbot popups. These popups can be strategically activated in key scenarios such as when a user tends to leave a page or requires further explanations about the content presented.

### <mark style="color:orange;">How can you use a Chatbot?</mark>

Users can interact with the chatbot in two ways:

1. **Structured pre-defined steps:** The creator can define the steps, flows, UI, and actions that a user can access. The user must choose specific paths to reach what they seek.
2. **Free-flowing conversation:** In this, the creator can define an answer to a list of probable questions. Using machine learning, the system will further make more such combinations of questions to which a particular answer can be applied. This is more like a real conversation with users, but here also, the boundary is what answers have been already defined by the creator.

### <mark style="color:orange;">How to Configure?</mark>

The above capabilities of the Multi-Channel Chatbot are derived from components of Sunbird UCI. You can find details by clicking on the link [here](/learn/functional-capabilities/product-and-developers-guide/multi-channel-chatbot).


# Targeted Programs

The above capabilities of Targeted Programs are derived from components of Sunbird. You can find details by clicking on the link [here](/learn/functional-capabilities/product-and-developers-guide/targeted-programs)


# Manage Learn


# Overview

Manage Learn is a vertical within the Sunbird project that focuses on implementing project, observation, and survey capabilities. This capability currently is enabled using multiple building blocks such as Sunbird Obsrv, Sunbird RC, Sunbird Lern, Sunbird Ed, and Sunbird Knowlg. Below are the solutions offered through Manage Learn vertical.

* [Programs](/learn/functional-capabilities/manage-learn/what-is-a-program)
* [Project](/learn/functional-capabilities/manage-learn/what-is-a-project)

{% embed url="<https://drive.google.com/file/d/18qp-4ZhYNNbaay5zZEcezB0CbA7XPmZC/view?ts=64dc66c8>" %}

* [Survey](/learn/functional-capabilities/manage-learn/what-is-a-survey)
* [Observation with Rubric](/learn/functional-capabilities/manage-learn/what-is-observation)
* [Observation without Rubric](/learn/functional-capabilities/manage-learn/what-is-observation)
* [Observation led Improvement project](/learn/functional-capabilities/manage-learn/what-is-observation)

{% embed url="<https://drive.google.com/file/d/1MXPefXTzkZ40BZnBIqmbE4uSDx0DbojD/view?ts=64dc66db>" %}


# What is an entity?

Entities refer to any different types of records within the location master e.g. states, districts, blocks, schools, and clusters. In the context of Manage Learn these resources are marked to be relevant for users belonging to various entities.

\\


# What is a Program?

A Program enables organizations to define, run and track a set of related activities to achieve a specific set of goals, with precise tracking of progress and completion. A Program is time-bound with a defined start and end for completion. A Program can be targeted to multiple sets of target users. A Program consists of different activities such as - taking a set of surveys, doing a set of improvement projects, taking a set of observations, etc. Each activity within a Program can have its own set of target users and a defined schedule.

### Different stakeholders

#### Program Designer

As a Program Designer, you can access reports like Task Detail report for resources, Status Report for projects, and Question Report for surveys and observations (with and without rubrics). While using these reports, you can apply filters based on program, resource, district, organization, start date, and end date for better analysis and planning. However, some reports may be password protected to ensure data confidentiality and privacy.

#### Program Manager

As a Program Manager, you have access to reports such as Task Detail report for resources, Status Report for projects, and Question Report for surveys and observations (with and without rubrics), allowing you to utilize various filters like program, resource, district, organization, start date, and end date for data analysis and decision-making. Some reports may be password protected for added security.

#### State Report Admin

Users who are State administrators and report viewers can view and generate aggregated Observation reports published for their tenant. These are aggregated reports of all the programs rolled out in a state with Observations. Each State has access to its own usage reports.

Administrators can view the reports as graphs or in a tabular format. These reports can, be viewed and downloaded. Reports are updated on a daily basis and gives cumulative data as of date.


# What is a Project?

The improvement project empowers leaders to outline and monitor a series of tasks, guiding users toward achieving specific improvement objectives. These projects are accessible to users with roles such as Teachers, HT (Head Teacher), and Officials in their profiles. The project is broken down into actionable micro-tasks, and relevant learning resources are incorporated into these tasks. Content creators on the platform have the authority to create and manage such improvement projects.

{% embed url="<https://drive.google.com/file/d/18qp-4ZhYNNbaay5zZEcezB0CbA7XPmZC/view?ts=64dc66c8>" %}

{% embed url="<https://docs.google.com/presentation/d/1DR0qlzKYcs8avhWBaa99LD1W-xMnARw06m8YceufomQ/edit#slide=id.g137c5b9b04b_0_191>" %}
Project
{% endembed %}


# What is Observation?

Observations consist of questionnaires tailored for specific entities like school blocks or clusters. Users with roles such as Teachers, HT and officials can record observations whenever needed and access them accordingly. On Manage Learn, Content Creators have the capability to create three types of observations.

{% embed url="<https://drive.google.com/file/d/1MXPefXTzkZ40BZnBIqmbE4uSDx0DbojD/view?ts=64dc66db>" %}

{% embed url="<https://docs.google.com/presentation/d/1nOswAk7_b5DpqfKP5MvN_rH2UersACecECzzoHzu0Vk/edit#slide=id.p>" %}

### Observation with rubrics

Creators have the flexibility to define particular domains, criteria, and scores for each Observation. Based on the scores users get on taking up an Observation, they are shown the level (L1, L2, L3) their school is at concerning the Observation that was conducted. Any logged-in user can use the Observations.

### Observation without rubrics

The questionnaire is straightforward and does not include any domains.

### Observation led Improvement project <a href="#observation-let-imporvment" id="observation-let-imporvment"></a>

These are Observations with rubrics with Improvement Projects mapped to each level. Users get suggestions for starting an Improvement Project based on the level they are at after completing the Observation.


# What is a Survey?

Surveys on the Managed Learn are designed to gather valuable opinions and feedback from users without being associated with any specific entity. Participants can only take the survey once, using it as a platform to provide feedback, share information, or contribute ideas related to events, activities, or processes. Creators have the flexibility to define a time limit for the surveys, after which access to the form is restricted. However, data submitted by users before the expiration remains accessible for review and analysis, ensuring valuable insights are retained for decision-making and improvement purposes.

{% embed url="<https://drive.google.com/file/d/1MXPefXTzkZ40BZnBIqmbE4uSDx0DbojD/view?ts=64dc66db>" %}

{% embed url="<https://docs.google.com/presentation/d/1JVJ5SYgjxghQezsc22DOCbVVeQ6qKREIE8k9tkhc3Ak/edit#slide=id.p>" %}

\\


# What is Observation as a task inside a Project?

In an improvement project, observations can be included as tasks. To successfully complete the improvement project, users must fulfill the observation task in addition to other assigned tasks. The completion of observations, along with the fulfillment of other tasks, is essential to achieving the project's overall objectives and ensuring a comprehensive approach to the improvement process.

\\


# Product and Developer's Guide


# Learning apps

Sunbird ED has three apps (Mobile app, Web app and Desktop app) and these reference apps allow adopters to unlock various use cases in discovery of content, credentialize and engage users through a set of configurable workflows. Few common features as follows-

1. Enable discovery of content via
   1. QR codes
   2. Categories
   3. Personas
   4. Frameworks
   5. Deeplinks
2. Enable personalization of content
3. Access content in online and offline mode
4. Engage users using
   1. Groups
   2. Discussion forums
   3. Chatbot
   4. Notifications
   5. Events (To be developed)
5. Access to different type of contents such as
   1. PDF/Epub
   2. Video/Audio
   3. Games
   4. AR/VR experiences
   5. Virtual/simulation labs
   6. Practice questions
   7. Assessments
   8. Quizzes
   9. Surveys
6. Allow users to access courses/training modules
7. Allow users to access digital passbook i.e. a digital footprint of content consumption
8. Access reports, dashboards of course/training progress of users

Apart from the above listed features, find few more key features/highlights for each of the components (apps) of Sunbird ED below -

**Sunbird Reference mobile app** -

Sunbird ED provides a reference android mobile application and IOS application.

Some key highlights are -

1. In App Upgrades, Notifications enabled.
2. Minimum Support Version of Android is 5.1.
3. Minimum Support Version of IOS is 9.

Some Interesting stats on Mobile App for one of the adopter (DIKSHA)

1. **1 million+** Daily Active User Count
2. **8 million+** Monthly Active User Count
3. Consistent **App rating** of 4.3+ for two consecutive years in play store

**Sunbird Reference Portal** -

Sunbird provides a reference app for the web portal, which runs on the latest browsers on desktops, mobile phones and tablets. Some key highlights are-

1. Support for content administrative capabilities
2. Enable Instructor capability development
3. Enabling credentials and batch management for courses/training module
4. Compatible with Chrome, Safari and Firefox

**Sunbird Reference Desktop app** -

Sunbird provides a reference desktop application (for window, linux and macOS). Some key highlights are -

1. Leverage underutilized infrastructure
2. Distribution & consumption of content in Offline mode
3. Enable Instructor capability development

\\


# Workflows

The three reference apps have the the same workflows. This is enabled by using common components & architecture. Key workflows are as follows:

![](/files/A83vR3Pi1DODOgGU5vQx)

1. **Onboarding of users**. There are three options available for this:
   1. Guest user onboarding
   2. Logged in user onboarding
   3. Multiple users in same device
2. **Discovery of content** by
   1. Browsing menus & filtering as per users preference
   2. QR Scan (phygital experience)
   3. Conversational discovery (using Chatbot)
   4. Free text search
3. **Play content**
   1. Built-in content players
   2. Consume content online & offline
   3. Capture data
4. **Track progress and Earn credentials**
   1. Verifiable e-credentials
   2. Report cards
5. **Interacting / Collaborating**
   1. Discussion forums
   2. Groups
   3. Notifications

###


# Onboarding of Users

1. ***Guest user onboarding***

![Onboarding steps for a guest user:: Language, user roles, board/medium/class and location](/files/fARZHiluwzkfAIldisp9)

Allowing users to access content w/o forcing them to log in lowers friction for users. Sunbird ED has a set of guest onboarding steps that can be configured. For example, for a schooling use case, you may need to capture board, medium, and grade in order to provide relevant content suggestions. But for a university use case, you may need to capture the degree, medium, and semester. The configuration can also be by the persona. For eg, a teacher may declare their board, medium, class, and subject, whereas a student may have to only declare their board, medium, and class only as they study all subjects. It can also be configured based on the combination of persona + location. The Learning app has these 4 onboarding steps, but they can be changed, and reordered as well via configurations.

***2. Logged in user onboarding***

![Onboarding steps for a logged-in user: Registration. Social login. Third party system login.](/files/CieY1GK4hfHhPDoHX3UC)

You can allow users to log in. It can be set up as an optional or mandatory step - via a Sunbird login (through a registered mobile number or email ID), social login (while Gmail integration comes out of the box, it can be easily extended to other types of social logins) or any 3rd party authentication mechanisms (let's say you have your own user auth tool, Sunbird exposes SSO APIs so that users can be verified via this tool and use the same credentials). Further, content preferences, location, or anything more can be captured as part of the login process.

***3. Multiple users on the same device***

![](/files/vQerOL6O9Yf2jgYuZPF9)

In a country like India, devices are often shared. For example, there may be one phone in a household which needs to be shared between two children at home. Or there may be an NGO that is going out to the field to work with some teachers, but they only have one or two tablets with them\_**.**\_ Hence, this capability allows multiple users to create “managed users or profiles” on the same device, so that they can switch between profiles. Each profile contains the learning history & preferences of the user so they can pick up from where they last left off.


# Discovery of Content

Allowing users to discover content based on their preferences

1. **Browsing menus & filtering as per users' preference**

![](/files/MwYuBUc3jikPpWwj9YRA)

This is where the generalisation+ personalisation really kicks in. You can configure all types of browsing and navigation experiences on Sunbird Ed. The most familiar paradigm to users is domain or framework\*\*-\*\*based discovery. For example

1. A student in a school setup tends to look for content that is from their board and pertains to their class or subject.
2. A district official is typically looking for projects/tasks that need to be acted upon by his jurisdiction (i.e. they look for content that is for their state, district, and purpose).

Based on the persona and preferences of the user, these browsing experiences can be configured.

An adopter can set up skill-based navigation, users can choose a skill or a goal and find content relevant to that goal. One can also set up “What can I learn” section based on what users already know, it makes suggestions on what else you can learn. There is also the dynamic “weighted” search & filtering capability using which learners can search based on keywords and the most relevant results based on their preferences, geographic location, etc. are returned.

**2. QR Scan (phygital experience)**

![](/files/Sra0AqBYqjzxdoJpwClB)

All digital assets on Sunbird ED are QR-codable, to lower the barrier of access. The code can be placed anywhere on a physical item like a book or a poster or even a toy or a piece of equipment - so that learners can scan it to immediately access digital content. That way, it is instant, contextual, and anchors on the familiar.

**3. Conversational discovery (using Chatbot)**

![Discovery using chatbot](/files/euWT2D9IGQcAnylbUASj)

With chatbots making their presence felt in every industry to assist users with what they need, the learning landscape is no less.

The chatbot can be configured to have its own navigation experiences, like guided navigation or queries in free text. For example, an adult learner trying to learn spoken Hindi can ask the chatbot for courses on Hindi to get a filtered set of results. The Chabot can be integrated with any of the consumer channels, including external platforms like WhatsApp.

This is one mode that really excites us is asking questions is the most fundamental way of learning, and imagine getting just-in-time answers to your questions via digital interactive content.

**4. Free text search**

![](/files/cAg0c86mLMeVKe2QOowF)

You can allow users to discover and search for content and make them personalised. Discover enables users to get inspired and take action before searching. You can enable users to discover content for other boards, audiences, categories, etc.

Search enables users to look for content across the whole app with a click of a button.


# Play content

1. Built-in content players

![PDF player](/files/J01RZgNRPx0qeDK9OfhQ) ![Video player](/files/hyjaVxPuJlZnlwTPnibZ)

There is a range of players such as PDF, Video, HTML, H5P, ECML, and QUML players that enables users to consume content. To make the user experience richer each of these players has features such as volume, jump to pages, video quality, etc.

1. Consume content online & offline

![Offline consumption](/files/kwMdacmA4wXrW5VwzCRd)

This is one of the most powerful capabilities of Sunbird ED. This could be groundbreaking in areas that have limited to no internet. How do we make sure that every child or adult in those areas which are mostly disconnected, still gets access to the same learning opportunities? Sunbird ED provides the capabilities to download and play content offline. In addition, it also allows physical distribution of content for pure offline scenarios (completely isolated areas)

Usage data can also be synced or exported to SD card which gives valuable insights into the content usage and learning needs.


# Track progress and Earn credentials

1. Verifiable e-credentials

![](/files/IeoOVLnMOIchW8sl4QZh)

When a learner puts in the effort to learn, makes progress, and achieves certain learning outcomes then these become skills that stick with them for years to come. Thus rewarding the learner for their effort and recording this “proof” of learning becomes valuable in the overall learning journey.

The first step in doing that is the ability to issue digital, verifiable credentials (certificates/badges) based on participation or merit in a learning journey These eCredentials stay tied to the user’s profile, can be downloaded at any time, and printed like an actual certificate, and is irrefutable as scanning the QR code on top of the certificate proves the authenticity of it. eCredentials can be tied to criteria - for example, it can be issued to the first 10 who complete an activity, or to learners who score more than 80% in the final assessment of a course. We’ve seen examples of adopters using digital eCredentials as an incentive mechanism to get better completion rates on courses - coupling the verifiable certificates with incentives in the physical world (like prize money or other opportunities)

* Report cards

![](/files/QlFjKrCWYg9jHX42yoTe)

Having access to a digital learning “passbook” of sorts with all the learners skills and achievements is paramount when learners try to find further opportunities like we as kids used to do with our physical files of certificates. eCredentials can be assigned to users for accomplishing something in their physical world, and the digital learning passbook acts as a log of the skills, capabilities, and achievements of the learner


# Interacting / Collaborating

**Groups**

Learning is always more effective when it involves interaction or collaboration. Sunbird ED houses the capability to create groups that can be used to create classrooms, study circles, etc. where groups of users can learn together (either being guided by a mentor or by themselves). They can take courses together, discuss topics, ask doubts, upload homework assignments, and even be notified about key pieces of information. Imagine a corporate training scenario, a manager can create a group with all her direct reports so that she can watch over their training requirements. She can even add an expert on the topic to the group as a mentor so that her reports can discuss areas where they are stuck.

In recent times, we’ve all been going through, the need for asynchronous learning experiences, which are guided by a mentor/teacher have become the need of the hour. Because of the diversity of the country, not everyone has access to a device or the internet at the same time - and this construct of a group ensures that learners don’t get left out.

**Discussion forums**

Discussion forums allow users to ask their queries related to the specific context. The community will help/suggest solving the user's queries. Based on the most likes on the responses, users can take the suggestions shared by the community. Imagine a Q\&A website like github where users can ask their queries and the community contributes.

**Notifications**

Notifications are a way to alert users about updates, announcements, etc. Notifications can be in form of SMS, email, FCM, or in-app notifications. Sunbird ED enables creators to invoke or configure in-app notifications for their use cases. The SMS/email notifications can be sent synchronously or asynchronously as well.


# Asset Sourcing

The **Asset Sourcing** capability is enabled by the following components of ***Sunbird CoKreat***

**Sourcing Web App**

Sourcing Web App is an application that allows creators to source assets from in-house or through contributions from outside. A few key features of Sourcing Web App are:

1. Allows contribution and curation at scale with a large set of contributors
2. Provide recognition and data about contribution to contributors

For more information about **Sourcing Web App** please click [here](https://sunbird.gitbook.io/sunbird-cokreat-1/learn/capabilities/product-and-developer-guide/asset-sourcing/different-types-of-sourcing)

**Contribution Service**

The Contribution Service is a microservice that provides API to enable organizations to digitally plan, coordinate, and manage crowdsourcing of assets for defined projects. These services are leveraged by the Sourcing Web App to:

1. Create and manage projects to get the crowdsourcing of assets
2. Provide the ability to nominate and manage nominations made to the project
3. Provide the ability to add, update, read user and project preferences

For more information about **Contribution Service** please click [here](https://sunbird.gitbook.io/sunbird-cokreat-1/learn/capabilities/product-and-developer-guide/asset-sourcing/contribution-service)

**Contribution Registry**

Contribution registry stores information about the individual contributors, organizations, and the roles of various users in the organization. It also stores the metadata of the project scope.

For more information about **Contribution Registry** please click [here](https://sunbird.gitbook.io/sunbird-cokreat-1/learn/capabilities/product-and-developer-guide/asset-sourcing/contribution-registry)

{% hint style="info" %}
Powered By [release-6.0.0](https://sunbird.gitbook.io/sunbird-cokreat-1/)
{% endhint %}


# Organised Collections

Organising assets into a collection makes the asset easily discoverable for the platform users. Collections can also be attached with certain behavioural, discoverable metadata.\
\
**Behavioural Metadata**:\
Any Collection can be made trackable/non-trackable collection by the creator. Non Trackable collection would enable normal consumption for the user. Trackable collection would facilitate the user with content state and progress information. Every action of the user within the content is recorded as content progress and the platform persists the metadata of the usage for further workflows.\
\
**Discoverable Metadata:**\
Any Collection can be part of two frameworks:\
a) Organisational Framework: Any Collection source is considered an organisational framework by default. This information is used to display the details along with the content for the users of the platform.\
Ex: A Book by NCERT can have Board as NCERT, English Medium, and 9th Grade as Organising framework information.

b) Target Framework: Target Framework enables the creator to target its content to users who may belong to some other content preference framework. It is possible to enable multiple target frameworks as part of content creation.\
Ex: A Book by NCERT can be targeted to users who might belong to CBSE and Tamil Nadu State Board.

The **Organised Collections** capability is enabled by the following components of **Sunbird Knowlg**

1. Collection Service

The Collection Management API allows you to manage collection over the sunbird platform. Apis perform operations related to all the *Collection* on the Sunbird Platform.

For more information about **Collection Service** please click [here](https://knowlg.sunbird.org/learn/product-and-developer-guide/content-service/content-service-1)

1. Collection Editor

Collection Editor is an angular Typescript-based editor which facilitates the user with the creation of multiple assets and organising them as structured collections.

For more information about **Collection Editor** please click [here](https://knowlg.sunbird.org/learn/product-and-developer-guide/editors/collection-editor-v2)

{% hint style="info" %}
Powered By [Sunbird Knowlg](https://knowlg.sunbird.org/)
{% endhint %}


# Discover Content - Digital & Phygital

The **Discover Content** capability is enabled by the following components of Sunbird Knowlg

Asset Discovery is enabled using Multiple Features in SunbirdED.

**Dynamic Tabs** enables are the related content are listed as part of discovery. Each of these tabs can be dynamically configured to show multiple contents under common asset category. Each of these tabs can also be configured to show filters which are specific to content. All the configuration of Tabs are available as part of Form Configuration.

**Search** is another powerful mode of discovery based on keyword. System enables any metadata attribute to be used as "Filter". Search capability also enables the user to search based on dialcode as well.

**Banners** are used to discover the content under a specific program. Search Criteria for the Banner can be configured and pushed to production in real time to both mobile and web users.

**QR Code** also enables user to discover the content using simple scanner in Phygital way.

1. Asset Category Service

For more information about **Asset Category Service** please click here

1. Asset Search Service

For more information about **Asset Search Service** please click [here](https://knowlg.sunbird.org/learn/product-and-developer-guide/assets-search-service)

1. Dial Service

For more information about **Dial Service** please click here

{% hint style="info" %}
Powered By [Sunbird Knowlg](https://knowlg.sunbird.org/)
{% endhint %}


# User Engagement

The **User Engagement** capability is enabled by the following components of Sunbird Lern

**User & Org Service** - This service provides a set of APIs to enable

1. User account creation and management, user login as well as platform administration capabilities
2. creation of batches of users to take courses on the platform

For more information about **User & Org Service** please click [here](https://lern.sunbird.org/use/developer-guide/user-and-org-service)

**Group service and UX Tool** - This UX tool enables creators to enable groups on Sunbird ED and the service provides a set of APIs to

1. Allow Users to Collaborate on a Common Set of Activities using Groups.

For more information about **Group service and UX Tool** please click here

**Discussion Forum service and UX Tool -** This UX tool enables creators to enable Discussion Forum on Sunbird ED and the service provides a set of APIs to

1. Allow Users to Discuss and Collaborate on Content.

For more information about **Discussion Forum service and UX Tool** please click here

**Notification Service** - This service provides a set of APIs to creators to

1. Engage Users by sending email, sms, in-app, and Mobile based Push notifications

For more information about **Notification Service** please click [here](https://lern.sunbird.org/use/developer-guide/notification-service)

{% hint style="info" %}
Powered by [Sunbird Lern](https://lern.sunbird.org/)
{% endhint %}


# Rich and Diverse Content

The **Rich and Diverse** **Content** capability is enabled by the following components of Sunbird Knowlg-

1. **Content players**

Content players are Javascript-enabled components used to help the users to access content on the application. These components are used to analyse the progress, and interactions of the user on the content using Telemetry. Every Content Player is enabled to raise the following events:\
a) Start Event: Every Content Play in the player is acknowledged by "START" event to represent the initiation of content on the player\
b) End Event: End Event of Content Player confirms the completion of Content along with metadata.\
c) Summary Event: Raised for once before the "END" event can act as metadata that captures the user behaviour on the content.\
d) HeartBeat Event - Raised almost every 5 seconds to let the system know on last known status.\
\
These event data are critically computed for the specific business logic of the application. For e.g.\
a) User with at least 20% progress in the Video can be set as a precondition for content consumption to be acknowledged.\
b) User reaching the last page can be a precondition for content consumption to be acknowledged.\
\
For more information about **Content player** please click [here](https://knowlg.sunbird.org/learn/product-and-developer-guide/player)

**2. Content service**

Content service is a set of microservices to manage the lowest consumable entity in the system. SunbirdED leverages the content search Services extensively to enable the personalisation of content to the user.\
Ex: A student's learning experience can be personalised by providing more learning resources like explanation content videos, Question paper PDF, puzzles, and games based on his level of competence.\
Sunbird ED has the capability to capture, record, and assess candidate's learning outcomes based on these assets.

For more information about **Content services** please click [here](https://knowlg.sunbird.org/learn/product-and-developer-guide/content-service)

{% hint style="info" %}
Powered by [Sunbird Knowlg](https://knowlg.sunbird.org/)
{% endhint %}


# Versatile Question Bank

The[Versatile Question Bank](/learn/functional-capabilities/versatile-question-bank) capability is powered by three components of ***Sunbird Inquiry:***

1. **Question and Question set services**

Question and Question set service is a micro-service which provides APIs to manage the lifecycle and workflows of creation and consumption of question & question set objects. These services are leveraged by the learning app to:

1. Add questions sets as assessments to courses
2. Generate ECAR file that enables consumption of question sets

For more information about **Question and Question set services** please click [here](https://inquiry.sunbird.org/learn/product-and-developer-guide/question-and-question-set-service).

**2. Question set editor**

Question set editor is used to create a question set, configure its behavior, and add/create questions in the question set. This editor is leveraged by the learning apps in:

1. Creation of different types of templates such as Quizzes, Assessments, surveys, practice sets etc.
2. Creation of different type of questions like MCQs, subjective questions etc.
3. Stitching questions together and add configurable features like sections, instructions, scores, layout, shuffle questions etc.

For more information about **Question set editor** please click [here](https://inquiry.sunbird.org/learn/product-and-developer-guide/question-and-question-set-editor).

**3. Question set player**

Question set player renders questions & question sets and emits usage data. This player is embedded in the Learning apps. It is used to:

1. Enable online and offline consumption of questions and question sets.
2. Embed to all learning apps of Sunbird ED

For more information about **Question set player** please click [here](https://inquiry.sunbird.org/learn/product-and-developer-guide/question-set-player).

{% hint style="info" %}
Powered by [Sunbird inQuiry](https://inquiry.sunbird.org/)
{% endhint %}


# Observability

The **Observability** capability is enabled by the following components of **Sunbird Observ**-

\
**Telemetry Service -** Telemetry Service is a microservice that is capable of processing one or more events received from clients. Developed in NodeJS, telemetry service has processed more than 2 billion events per day.

### What is Telemetry? <a href="#what-is-telemetry" id="what-is-telemetry"></a>

The word ‘Telemetry’ is derived from its Greek etymological roots, tele - remote and metron - measure.

Telemetry V3 Event Structure

All events follow a common data structure, though the event data structure (“edata”) differs for each event. The complete data structure is as follows:

```
{
 // About the event
 "eid": , // Required. TODO: Shall we rename it to "verb" ?? 
 "ets": , // Required. Epoch timestamp of event (time in milli-seconds. For ex: 1442816723)
 "ver": , // Required. Version of the event data structure, currently "3.0"
 "mid": , // Required. Unique message ID. Used for deduplication, replay and update indexes
 
 // Who did the event
 "actor": { // Required. Actor of the event.
   "id": , // Required. Id of the actor. For ex: uid incase of an user
   "type":  // Required. User, System etc.
 },
 
 // Context of the event
 "context": { // Required. Context in which the event has occured.
   "channel": , // Required. Channel which has produced the event
   "pdata": { // Optional. Producer of the event
     "id": , // Required. unique id assigned to that component
     "pid": , // Optional. In case the component is distributed, then which instance of that component
     "ver":  // Optional. version number of the build
   },
   "env": , // Required. Unique environment where the event has occured.
   "sid": , // Optional. session id of the requestor stamped by portal
   "did": , // Optional. uuid of the device, created during app installation
   "cdata": [{ // Optional. correlation data
     "type":"", // Required. Used to indicate action that is being correlated
     "id": "" // Required. The correlation ID value
   }],
   "rollup": { // Optional. Context rollups
     "l1": "",
     "l2": "",
     "l3": "",
     "l4": ""
   }
 },
 // What is the target of the event
 "object": { // Optional. Object which is the subject of the event.
   "id": , // Required. Id of the object. For ex: content id incase of content
   "type": , // Required. Type of the object. For ex: "Content", "Community", "User" etc.
   "ver": , // Optional. version of the object
   "rollup": { // Optional. Rollups to be computed of the object. Only 4 levels are allowed.
   	"l1": "",
     "l2": "",
     "l3": "",
     "l4": ""
   }
 },
 
 // What is the event data
 "edata": {} // Required.
 
 // Tags
 "tags": [] // Optional. Encrypted dimension tags passed by respective channels
}
```

**Note:**

* All events have the same structure with only differences in edata structures.
* All events have unique event codes i.e., (IDs).
* All events are as per platform schema

For more information about **Telemetry services** please click [here](https://obsrv.sunbird.org/previous-versions/sb-5.0-version/learn/product-and-developer-guide/telemetry-service)

**Telemetry Spec**

* [Start](http://docs.sunbird.org/latest/developer-docs/telemetry/eventdetails/#start) - This method initializes the capture of telemetric data associated with the start of user's action
* [Impression](http://docs.sunbird.org/latest/developer-docs/telemetry/eventdetails/#impression) - This method is used to capture telemetry for user visits to a specific page.
* [Interact](http://docs.sunbird.org/latest/developer-docs/telemetry/eventdetails/#interact) - This method is used to capture user interactions on a page. For example, search, click, preview, move, resize, configure
* [Assess ](http://docs.sunbird.org/latest/developer-docs/telemetry/eventdetails/#access)- This method is used to capture user assessments that happen while playing content.
* [Response](http://docs.sunbird.org/latest/developer-docs/telemetry/eventdetails/#response) - This method is used to capture user responses. For example; response to a poll, calendar event, or a question.
* [Interrupt](http://docs.sunbird.org/latest/developer-docs/telemetry/eventdetails/#interrupt) - This method is used to capture interrupts triggered during user activity. For example; mobile app sent to the background, call on the mobile, etc.
* [Feedback](http://docs.sunbird.org/latest/developer-docs/telemetry/eventdetails/#feedback) - This method is used to capture user feedback
* [Share](http://docs.sunbird.org/latest/developer-docs/telemetry/eventdetails/#share) - This method is used to capture everything associated with sharing. For example; Share content, telemetry data, link, file, etc.
* [Audit](http://docs.sunbird.org/latest/developer-docs/telemetry/eventdetails/#audit) - This method is used to log telemetry when an object is changed. This includes life-cycle changes as well
* [Error](http://docs.sunbird.org/latest/developer-docs/telemetry/eventdetails/#error) - This method is used to capture when users face an error
* [Heartbeat](http://docs.sunbird.org/latest/developer-docs/telemetry/eventdetails/#heartbeat) - This method is used to log telemetry for heartbeat events to denote that the process is running
* [Log](http://docs.sunbird.org/latest/developer-docs/telemetry/eventdetails/#log) - This method is used to capture generic logging of events. For example; capturing logs for API calls, service calls, app updates, etc.
* [Search](http://docs.sunbird.org/latest/developer-docs/telemetry/eventdetails/#search) - This method is used to capture the search state i.e. when a search is triggered for content, item, assets, etc.
* [Metrics](http://docs.sunbird.org/latest/developer-docs/telemetry/eventdetails/#metrics) - This method is used to log telemetry for service business metrics
* [Summary](http://docs.sunbird.org/latest/developer-docs/telemetry/eventdetails/#summary) - This method is used to log telemetry summary event
* [Exdata](http://docs.sunbird.org/latest/developer-docs/telemetry/eventdetails/#exdata) - This method is used as a generic wrapper event to capture encrypted or serialized data
* [End](http://docs.sunbird.org/latest/developer-docs/telemetry/eventdetails/#end) - This method is used to capture closure after all the activities are completed

For more information about **Telemetry Spec** please click [here](https://telemetry.sunbird.org/learn/understand)

**Data Service -**

For more information about **Data services** please click [here](https://obsrv.sunbird.org/previous-versions/sb-5.0-version/learn/product-and-developer-guide/data-service)

**Data Pipeline**

For more information about **Data Pipeline** please click [here](https://obsrv.sunbird.org/previous-versions/sb-5.0-version/learn/product-and-developer-guide/data-pipeline)

**Report Service**

For more information about **Report services** please click [here](https://obsrv.sunbird.org/previous-versions/sb-5.0-version/learn/product-and-developer-guide/report-service)

**Report Configurator**

For more information about **Report Configurator** please click [here](https://obsrv.sunbird.org/previous-versions/sb-5.0-version/learn/product-and-developer-guide/report-configurator)

{% hint style="info" %}
Powered By [Sunbird Obsrv](https://obsrv.sunbird.org/)
{% endhint %}


# Launch Courses

Launch Courses cover major aspects of the following functional needs:

**Batch Management**: Create Batches with specified start/end dates to create a virtual cohort of users to consume the content. Batch enables the creator/mentor of the course to access the reports in a similar manner.

**Content State/Course Progress**: Every content consumption of the user is used to calculate the progress of the course. This is facilitated by Content State Read/Update API. The same information is carried into course reports, exhausts, etc.

**Digital Learning Passbook**: Once the user has completed the course, all the history of user's performance on the course, certificate received are persisted as part of "Digital LEARNING passbook". This Information will exist with the user along with his profile information.

{% hint style="info" %}
Powered by [Sunbird Lern](https://lern.sunbird.org/)
{% endhint %}


# Verifiable Credentials

The **Verifiable Credentials** capability is powered by Sunbird RC

Sunbird ED enables the creator of content *to* attach the certificates for the user course completion\*\*.\*\* There can be two types of certificates attached to any trackable collection:\
*a)* **Completion Certificate**: This Certificate is provided to the user upon the completion of the course. The only Criteria for issuance of this certificate is to complete the course consumption.

\
*b)* **Merit Certificate**: A Merit Certificates can be configured by the creator for issuance when the user meets certain scoring criteria. It is possible that both types of certificates can be configured on a course. For e.g. Creator can set 70% & above score as merit certificate criteria.\
\
All the certificates issuance can be digitally verifiable using QR code printed on the certificates.

{% hint style="info" %}
*Powered By* [Sunbird RC (Registry & Credential)](https://docs.sunbirdrc.dev/)
{% endhint %}


# Multi-Channel Chatbot

The **Multi-Channel Chatbot** capability is enabled by the following component of **Sunbird UCI**

1. **Chatbot UX tool -** Chatbot UX tool renders predefined and free-flowing conversations and emits usage data. This chatbot is embedded in the Learning apps. It is used to:
   1. Enable consumption of pre-defined and free-flowing conversations
   2. Embed to webapp (portal) of Sunbird ED
2. **Chatbot services** - Chat services is a micro-service that provides APIs to manage the lifecycle and workflows of creation and consumption of conversations on chatbots. These services are leveraged by the learning app to enable chatbot with -
   1. Add pre-defined and free-flowing conversations
   2. Enabled customized chatbot for different platforms such as learning apps, WhatsApp, etc.
3. **Chatbot admin tool** - Chatbot admin tool is used to create/add conversations, configure its behavior. This editor is leveraged by the learning apps for chatbot in:
   1. Creation of different types of predefined steps, actions, and workflows
   2. Creation of different types of free-flowing sets of questions with their respective answers

{% hint style="info" %}
Powered by [Sunbird UCI](https://uci.sunbird.org/)
{% endhint %}


# Targeted Programs

The **Targeted Programs** capability is enabled by the following components of Sunbird


# Manage Learn

Manage Learn is a vertical within the Sunbird project that focuses on implementing project, observation, and survey capabilities. This capability currently is enabled using multiple building blocks such as Sunbird Obsrv, Sunbird RC, Sunbird Lern, Sunbird Ed, and Sunbird Knowlg. Below are the solutions offered through Manage Learn vertical.

* Programs
* Project
* Survey
* Observation with Rubric
* Observation without Rubric
* Observation led Improvement project


# Overview

Manage Learn is a vertical within the Sunbird project that focuses on implementing project, observation, and survey capabilities. This capability currently is enabled using multiple building blocks such as Sunbird Obsrv, Sunbird RC, Sunbird Lern, Sunbird Ed, and Sunbird Knowlg. Below are the solutions offered through Manage Learn vertical.

* [Programs](/learn/functional-capabilities/manage-learn/what-is-a-program)
* [Project](/learn/functional-capabilities/manage-learn/what-is-a-project)

{% embed url="<https://drive.google.com/file/d/18qp-4ZhYNNbaay5zZEcezB0CbA7XPmZC/view?ts=64dc66c8>" %}

* [Survey](/learn/functional-capabilities/manage-learn/what-is-a-survey)
* [Observation with Rubric](/learn/functional-capabilities/manage-learn/what-is-observation)
* [Observation without Rubric](/learn/functional-capabilities/manage-learn/what-is-observation)
* [Observation led Improvement project](/learn/functional-capabilities/manage-learn/what-is-observation)

{% embed url="<https://drive.google.com/file/d/1MXPefXTzkZ40BZnBIqmbE4uSDx0DbojD/view?ts=64dc66db>" %}


# Component Diagram

<figure><img src="/files/Y0Yeu8o4vK1eO31cS3nQ" alt=""><figcaption></figcaption></figure>

The component depicted above offers a comprehensive view of the entire Manage Learn, showcasing its vital components and the significant roles they play in the construction and functioning of Manage Learn.

### [ML Core service](/use/source-code/manage-learn/ml-core-service)

ML Core service plays a vital role in crafting programs and solutions within the Manage Learn environment. It acts as the bridge connecting Manage Learn with the cloud service, enabling the retrieval of preSignedUrls and downloadableUrls.

### [ML Project Service](/use/source-code/manage-learn/ml-project-service)

ML Project Service empowers the micro-improvement capability within the Manage Learn Building block. This integral service engages with other micro services within Manage Learn and uses [Learner Service](https://lern.sunbird.org/learn/readme) and [Sunbird RC ](https://docs.sunbirdrc.dev/learn/readme)to produce certificates upon a successful compilation of improvement projects.

### [ML Survey Services](/use/source-code/manage-learn/ml-survey-service)

ML Survey Services facilitate the integration of survey and observation capabilities into Manage Learn. This service allows users to actively participate in surveys and observations.

### [ML Reports Services](/use/source-code/manage-learn/ml-report-service)

The ML Reports Service is designed to create reports, charts, and graphs to support analytical insights.

### [ML Analytics Service](/use/source-code/manage-learn/ml-anaylatics-service)

The ML Analytics Service is constructed upon a framework that incorporates Kafka, MongoDB, Druid, and cloud storage. the ML-Analytics service collects data from MongoDB or Kafka, performs data transformation, and then transfers the refined data to either Cloud Storage or Kafka. This data is then made available in Druid for further analysis needs.

### Observ Data Product

On Demand Druid Exhaust Job is a generic data-product used to generate CSV reports. By passing the druid query config, we can use its capability to generate reports dynamically for any columns included in the druid datasource.

### [Learn Data Pipeline (Flink Jobs)](https://lern.sunbird.org/learn/product-and-developer-guide/data-pipeline-flink-jobs)

Program User Info Job

`program-user-info` is used to record the user's information when the user submits the program. Whenever a program is submitted, this job receives an event with the user's information as JSON data and then it parses and stores it as respective key-value pairs in Cassandra.

### [Learn Data Products](https://lern.sunbird.org/learn/product-and-developer-guide/data-products)

Program Exhaust\
Program user personal info exhaust is data-product that generates CSV file containing user details. Each record represents user details who has joined the [program](/learn/functional-capabilities/manage-learn/what-is-a-program). This service uses flattened data from Cassandra which is created by a Flink job called Program User Info. This data-product is configurable for L2, L3 and L4 [data security levels](https://docs.google.com/document/d/1pLvKSiPYzFm-XNl9zA5KAIU1MM5CC0tC/edit#heading=h.gjdgxs).\\

Upon the compilation of user resources, the ML Core, ML Project, and ML Surveys services will initiate the transfer of data to Kafka. This data will subsequently be archived within Druid, serving as a repository for future utilization. Eventually, the Reports Services will harness this stored data to generate reports.

### MongoDB

MongoDB is a [document database](https://www.mongodb.com/document-databases) used to build highly available and scalable internet applications. With its [flexible schema](https://www.mongodb.com/scale/mongodb-schema-design) approach, it’s popular with development teams using agile methodologies.

### Kafka

Kafka is used to build real-time streaming data pipelines. A data pipeline reliably processes and moves data from one system to another, and a streaming application is an application that consumes streams of data.

### Druid

Apache Druid is a real-time analytics database designed for large data sets. Most often, Druid powers use cases where real-time ingestion, fast query performance, and high uptime.

### Cloud Storage

Cloud Storage is utilized for safeguarding evidence and documents.

\
\\


# ML Core Service

Introducing ML Core Service a key component within the Manage Learn, tasked with the creation of programs and resources within the Managed Learn ecosystem.

### [ML Core Services](/use/source-code/manage-learn/ml-core-service)


# ML Project Service

Introducing ML Project Service a key component within the Manage Learn, tasked with the creation of projects within the Managed Learn ecosystem.

### [ML Project Service](/use/source-code/manage-learn/ml-project-service)


# ML Survey Service

Introducing ML Survey Service a key component within the Manage Learn, tasked with the creation of observations and surveys within the Managed Learn ecosystem.

### [ML Survey Services](/use/source-code/manage-learn/ml-survey-service)


# ML Report Service

Introducing ML Reports Service a key component within the Manage Learn, tasked with the creation of reports on resources and programs within the Managed Learn ecosystem.

### [ML Report Service](/use/source-code/manage-learn/ml-report-service)


# ML Analytics Service

Presenting the ML Analytics Service, a pivotal element within Managed Learn, responsible for gathering, transforming, and reshaping data to enable advanced analysis within the Managed Learn ecosystem.

## [ML Analytics service](/use/source-code/manage-learn/ml-anaylatics-service)

{% content-ref url="/pages/Epn7v8YAn6rpK77lkUML" %}
[ML Analytics Service](/use/source-code/manage-learn/ml-anaylatics-service)
{% endcontent-ref %}


# Tech Overview


# Design Principles

## Thinking Microservice Architecture

Sunbird is built with microservices thinking; it is not a pre-packaged learning management solution. Instead, it is a set of core microservices that have been unbundled from the functionality or the solution inside to provide critical core functionality related to learning, registries, content, attestations, data, etc.

Sunbird contains “microservices” as Lego blocks that can be used by a builder of a platform or solution to compose many solutions rapidly and even rewire them, depending on the context, diversity and needs, rather than rewriting the full technology stack.

#### Unbundling for Diversity

As an architect or a developer downloading Sunbird, there are hundreds of APIs, which are microservices exposed via APIs available for use; these are generalised and micro. Sunbird has unbundled hundreds of microservices in terms of content attestation, data, etc.

An architect or a developer looking at solutions can leverage Sunbird microservices to reimagine solutions to suit their needs and decide what to do with them. It would be possible to compose solutions that are different from those seen in the reference implementation of Sunbird. One can imagine a wide range of use cases as the microservices can be used in many ways.

**Content Microservice** - This includes APIs for content creation or a collection creation, and the concept of the collection is abstracted enough to be able to use it in different contexts, not just k-12 education. The Collection API or collection microservice can be used to create a textbook or a collection of courses. In this case, the concept of a course is nothing but an abstract version of a collection.

This approach opens up the possibility of imagining diverse solutions and large-scale innovation.

#### Loose Coupling for Evolution

Sunbird microservices are not necessarily dependent on each other; one can choose and use any microservice to serve varied needs.

**Registry Microservice** - The Registry microservice can be used for various purposes. It can be used to build a registry of schools, a registry of contributors, or any other registry. This can be done without using anything from the Sunbird content microservice, collections, or other microservices. This decoupling is an integral part of the Sunbird Architecture and composition story because it is built in a decoupled manner. Your ability to reuse parts of it or full of it in any form or fashion gives you combinatorial capability that gives you a lot of possibilities in terms of reimagining solutions to suit different needs and contexts.

#### Observability through Emit vs Extract

Sunbird microservices are built such that every microservice captures every action and interaction on the platform and naturally emits anonymized confidentiality-protecting, privacy-protecting data stream automatically, and accumulated through the Sunbird telemetry infrastructure so that data extraction is avoided.

Extraction is what is done when telemetry is not built natively into the microservice architecture. The only way to get data out of the system is by extracting it from various components and parts of the system. This exercise is time-consuming and inefficient, and most importantly, if the extraction design is not well done, there will be severe privacy and confidentiality implications and unanticipated consequences.

Data and Telemetry microservices: Data and telemetry as a microservice is essential to a platform's building, development and growth. Telemetry is the ability to remotely observe large systems and also the ability of actors in a system to observe smaller actions.

For instance, in the education system, it would be the ability to observe what is happening at a school, a district, and a state level through a set of telemetry feeds coming through the digital platform. The actors at each level - school leaders, education officers, and state administrators- need visibility and often have to extract data to understand what is happening in their network.

Emit vs Extract is an important construct that, even as extenders of Sunbird, developers and architects must ensure that the telemetry and emitting architecture is implemented as part of the microservice, not just as an API.

#### Video on Architecture Principles of Designing Population Scale Digital Infrastructure

To understand the architectural principles of designing population-scale digital infrastructure, listen to Dr Pramod Varma, CTO of EkStep Foundation.

{% embed url="<https://youtu.be/1S-599usfjc>" %}


# Technical Architecture Diagram

### System view diagram

![SunbirdED Architecture](https://imgr.whimsical.com/object/VY5wnTJohcY5Y39oifY7FH)

### **Component view diagram**

[Architecture - Component Diagram](/use/source-code/sunbird-ed-architecture)

#### Video on the Sunbird ED Technical Architecture - Part 1

Watch the video to understand the Sunbird's Tech Architecture and Infrastructure.

{% embed url="<https://youtu.be/fypu3gU2XN8?si=SWIfVMAHUHsMPgmE&t=695>" %}

\ <br>


# Tech Stack

<figure><img src="/files/tRCRcSxw6OyLWomKQuqM" alt=""><figcaption></figcaption></figure>


# Adopters

Sunbird ED has been leveraged to develop the following solutions:

<table><thead><tr><th width="214.94138736231332"></th><th></th></tr></thead><tbody><tr><td><img src="/files/3XsFy2sQ8w8y0S5MQBcL" alt="" data-size="original"></td><td><a href="https://diksha.gov.in/">DIKSHA</a> by NCERT: Digital Infrastructure for Knowledge Sharing (DIKSHA) is India's national school education platform and has been adopted by all 36 states and UTs across India, thus impacting nearly every student and teacher in the country. It is one of the largest education platforms in the world.<br></td></tr><tr><td><img src="/files/P6pu9yzFO9Njml0hBtcn" alt=""></td><td>Lex by Infosys: Lex is a platform that can be used by organisations to deliver professional development to its workforce. It is a cloud-first and mobile-first solution designed to be accessible anytime, anywhere and on any device.</td></tr></tbody></table>


# DIKSHA

Check out DIKSHA's website here: https\://diksha.gov.in/ or download DIKSHA's mobile app from the Google Playstore

Digital Infrastructure for Knowledge Sharing (DIKSHA) is a national platform for school education, an initiative of the National Council for Education Research and Training (NCERT), Ministry of Education. It was launched in 2017 and has been adopted by all 36 states and UTs of India.

Each state/UT leverages the DIKSHA platform in its own way, as it has the freedom and choice to use the varied capabilities and solutions of the platform to design and run programs for their teachers and learners. DIKSHA policies and tools make it possible for the education ecosystem (educationists, experts, organisations, institutions - government, autonomous institutions, non-govt and private organisations) to participate, contribute and leverage a common platform to achieve learning goals at scale for the country.

![One Diksha multiple central and state programmes image depicts the building blocks that form the DIKSHA Infrastructure. These blocks are Teacher & Leadership Training, Lesson Plans & Teachers Tools, Explanation Content, Practice and Homework, Question Banks & Exam Prep, Assessments, Quiz.](https://diksha.gov.in/assets/diksha-mission/One_DIKSHA_multiple_Central_and_State_programmes.jpg)

Learners and teachers across India access DIKSHA. The platform has 30+ languages and hosts NCERT content and boards like CBSE and SCERTs. The platform is specially developed to support inclusive learning for underserved and differently-abled learners.\
\
In the context of COVID-19-related disruption of schooling, DIKSHA makes it possible for all states/UTs to enable learning/education at home through innovative state programs, hence leapfrogging the use of technology for the benefit of teachers and learners across India.

**DIKSHA current usage (as of 27th Dec 2021)**

1. Learning sessions(activities) taken by learners - 4 billion and counting...
2. Total usage minutes - 51 billion and counting...
3. Daily Active Users - 700k
4. Monthly Active users - 8 million

To experience DIKSHA, check out DIKSHA's website here - <https://diksha.gov.in/> or download DIKSHA's mobile app from Google's Play store.


# Roadmap

~~The link to the ED roadmap is here:~~

[~~https://project-sunbird.atlassian.net/wiki/spaces/SUN/pages/3259596873/ED+Roadmap~~](https://project-sunbird.atlassian.net/wiki/spaces/SUN/pages/3259596873/ED+Roadmap)


# Plan for 2025-2026

Sunbird roadmap planned for 2025-2026

The following is the Roadmap plan for Sunbird over the next one year.

There will be three releases, one new Version, as well as hotfixes/ patches as necessary.

The Sunbird community is encouraged to contribute views and suggestions in the finalization of this roadmap, so that all necessary inputs can be considered before the plan is frozen.&#x20;

Please send in your comments regarding the Sunbird 2025-2026 roadmap via the [Discussion Forum thread.  ](https://github.com/orgs/Sunbird-Ed/discussions/760)

**JAN 2025 :** SB Release 7.5

Highlights: Sunbird ED with Easy Installer  (single click install)

**APRIL 2025 :** SB Release 7.6

Highlights: Reference mobile app - android version upgrade, KeyCloak upgrade to ver 21, Security fixes to address critical vulnerabilities

<mark style="color:blue;">**SEPT 2025 : SB Version 8.0**</mark>&#x20;

Highlights :  Improve configurability, Reduce SI customization effort required, Support for new Assessment types, Cross-BB compatibility (Sunbird stack to work with Obsrv 2.0 and RC 2.0)

**DEC 2025 :** SB Release 8.1

Highlights : Incorporate new tech such as AI capabilities into Sunbird for features such as content discovery and recommendations, chat bot functionalities etc.

&#x20;

\ <br>

\ <br>

\
\
\ <br>


# Releases and Dates

Sunbird Releases and planned dates

**RELEASE 7.5.1** :: 10th MARCH 2025&#x20;

* Image Consolidation - All images to be pulled from sunbird ACR instead of personal ones
* Superset for visualization and reporting to be included as part of Easy Installer for Sunbird ED.
* Report Services Configuration Fixes
* Flink jobs configuration fixes
* Domain in postman collection will use the global domain name instead of having to change manually for each installation
* Report service upgraded to 5.x instead of 4.x which supports all cloud providers
* Resources configuration updates, to prevent jobs from running out of memory
* Generalize the cassandra and postgres configurations to work with the global values
* Missing bundles in downloadable artifacts are added, to support smooth installation.
* Fixes to support publishing content on GCP
* Velero  for cluster backups

**RELEASE 7.6** :: 20 MARCH 2025

* ~~Keycloak upgrade to 21~~ (to be taken up in a later releast)
* Mobile App:
  * Android version upgrade to 34
  * Angular updated to 19
  * Plugins Migration to Capacitor as a replacement for Cordova within Ionic
  * Workflow fixes
    * Google Login
    * Offline Access and share
    * Course Consumption with certification
  * Bug fixes


# Getting Started - Setup

### 🚀 Overview

From 7.5 release, Sunbird-ED has moved from a hybrid deployment model to a fully Kubernetes-native architecture. Previously, deployments were managed using Jenkins, Ansible, and Helm, with services split between Kubernetes and traditional VMs. Components like Neo4j, Cassandra, Redis, Postgres, Elasticsearch, Keycloak, Druid, Kafka, and Spark ran on VMs, requiring additional orchestration and configuration.<br>

With the new [Sunbird-ED Installer](https://github.com/project-sunbird/sunbird-ed-installer):

* ✅ All services run natively on Kubernetes.
* ✅ Easier deployment across multiple cloud providers.
* ✅ All building blocks are bundled and modular.
* ✅ Simplified installation and maintenance experience.

This makes it easier to spin up, manage, and scale Sunbird-ED environments.


# Pre-requisites

## **Infra Requirements**

* Kubernetes Cluster with 3 worker nodes each of 16 Core 64 GB RAM
* Fully Qualified Domain Name (FQDN)&#x20;
* SSL Certificate - A FullChain, consisting of the private key and Certificate+CA\_Bundle
* Object Storage with CORS enabled
  * CORS Policy:<br>

    ```json
    [
      {
        "origin": ["<domain-name>"],
        "method": ["GET", "HEAD", "OPTIONS", "PUT", "POST"],
        "responseHeader": ["Content-Type", "Authorization", "x-goog-resumable", "x-amz-acl", "x-ms-blob-type"],
        "maxAgeSeconds": 3600
      }
    ]
    ```
* Google OAuth Credentials

> **Steps to create:** <https://developers.google.com/workspace/guides/create-credentials#oauth-client-id>

* Google V3 ReCaptcha Credentials

> **Steps to create:** Login to <https://www.google.com/recaptcha/admin> and create one for the domain

* Maxmind city database (free or paid)
* Email service provider
* MSG91 sms service provider API Token (optional)

> **Note:** This is required to get OTPs to registered email addresses when a user registers or resets

* YouTube API Token (optional)

> **Note:** This is required to upload video content directly using the YouTube URL

* Slack account and slack bot with API Token for monitoring alerts(optional)

## Required CLI Tools

1. [jq](https://jqlang.github.io/jq/download/)
2. [yq](https://github.com/mikefarah/yq#install) (for YAML processing)
3. [rclone](https://rclone.org/)
4. [Terraform](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli)
5. [Terragrunt](https://terragrunt.gruntwork.io/docs/getting-started/install/)
6. Linux / MacOS / GitBash (Windows)
7. Python 3
8. PyJWT Python Package (install via pip)
9. [kubectl](https://kubernetes.io/docs/tasks/tools/)
10. [helm](https://helm.sh/docs/intro/quickstart/#install-helm)
11. [Postman CLI](https://learning.postman.com/docs/getting-started/installation/installation-and-updates/)
12. Git

## Clone the installation scripts repository

```bash
git clone https://github.com/project-sunbird/sunbird-ed-installer.git
```

## Cloud Specific Tools

Based on the cloud provider, install the respective tools

{% tabs %}
{% tab title="Azure" %}

### **Required tools and permissions**

1. [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli)
2. Ensure that the user or service principal running the Terraform script has the necessary privileges as [listed here](https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/resources/application#api-permissions)

> NOTE: We will overwrite the following files. Please take a backup of your existing files in the following locations
>
> * `~/.config/rclone/rclone.conf`

### Authentication

Post installation of the CLI tool and providing necessary permissions, use the following command to login to Azure via CLI.

```
az login --tenant <AZURE_TENANT_ID>
```

Note: Make sure you replace the AZURE\_TENANT\_ID with the tenant id from Azure Console.

### **Infra Setup**

Post login, update the `terraform/azure/<env>/global-values.yaml` with the variables as per your environment

```
  building_block: "" # building block name
  env: "" 
  environment: "" # use lowercase alphanumeric string between 1-9 characters
  domain: ""
  subscription_id: ""
  sunbird_cloud_storage_provider: azure 
  sunbird_google_captcha_site_key: 
  google_captcha_private_key: 
  sunbird_google_oauth_clientId: 
  sunbird_google_oauth_clientSecret: 
  mail_server_from_email: ""
  mail_server_password: ""
  mail_server_host: smtp.sendgrid.net
  mail_server_port: "587"
  mail_server_username: apikey
  sunbird_msg_91_auth: ""
  sunbird_msg_sender: ""
  youtube_apikey: ""
  proxy_private_key: |
   <private_key_generated_when_setting_up_ssl>
  proxy_certificate: |
   <certificate_generated_when_setting_up_ssl>
```

{% endtab %}

{% tab title="Google Cloud" %}
Create a project on google cloud and export it as a variable. Please see [Creating and Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) for reference and enable the Kubernetes Engine API for the project, as it is required to create and manage Kubernetes clusters within Google Cloud  You can enable the API by following the guide [Enable the Kubernetes Engine API](https://console.cloud.google.com/apis/library/container.googleapis.com).

```
export GOOGLE_PROJECT_ID=<your_project_id>
```

**Required tools and permissions**

1. [<mark style="color:blue;">Google Cloud CLI</mark>](https://cloud.google.com/sdk/docs/install)
2. Ensure that the user or service account running the Terraform script has the necessary privileges as [listed here](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#authentication).

> NOTE: We will overwrite the following files. Please take a backup of your existing files in the following locations
>
> * `~/.config/rclone/rclone.conf`

### Authentication

Post installation of the CLI tool and providing necessary permissions, use the following commands to login to GCP via CLI.

```
gcloud auth login
```

Then initialize the GCP configuration:

```
gcloud init
```

Authenticate the application with default credentials:

```
gcloud auth application-default login
```

Install the GKE gcloud authentication plugin:

```
gcloud components install gke-gcloud-auth-plugin
```

Note: Make sure you select the correct project and authenticate with the appropriate credentials.

### **Infra Setup**

Post login, update the `terraform/gcp/<env>/global-values.yaml` with the variables as per your environment

```
building_block: "" # building block name
env: ""
environment: "" # use lowercase alphanumeric string between 1-9 characters
cloud_storage_region: ""
cloud_storage_project: ""
zone: ""
gke_node_pool_instance_type: ""
domain: ""
sunbird_google_captcha_site_key: ""
google_captcha_private_key: ""
sunbird_google_oauth_clientId: ""
sunbird_google_oauth_clientSecret: ""
mail_server_from_email: ""
mail_server_password: ""
mail_server_host: smtp.sendgrid.net
mail_server_port: "587"
mail_server_username: apikey
sunbird_msg_91_auth: ""
sunbird_msg_sender: ""
youtube_apikey: ""
proxy_private_key: |
 <private_key_generated_when_setting_up_ssl>
proxy_certificate: |
 <certificate_generated_when_setting_up_ssl>
```

{% endtab %}

{% tab title="Oracle Cloud" %}

### Coming Soon

{% endtab %}

{% tab title="AWS" %}

### Coming Soon

{% endtab %}
{% endtabs %}


# Install

To commence your journey with SunbirdEd, follow these guidelines:&#x20;

* **Choose Cloud Platform:** Your first step is to create an account on a cloud platform that best fits your needs. Whether you opt for Azure, AWS, GCP, or OCI, your choice should be guided by considerations like your budget, available technical resources, and the degree of control you wish to have over your deployment. You can also leverage an existing account if it aligns with your requirements.
* **Provision Cloud Infrastructure**: In order to provision the infra please refer to the [Pre-requisites](/use/getting-started/pre-requisites) and ensure the requirements are met.

## Prepare the Environment

1. Copy the template directory

```
bash cd terraform/<cloud-provider> # Replace <cloud-provider> with your cloud provider 
cp -r template <env> # for reference
```

2. Ensure the required values in `<env>/global-values.yaml` are populated properly by following the prerequisites.

## Provision Infra and Install Services

In order to provision infra and install all services, run the following command

1. Ensure you are in the respective environment related folder<br>

   ```
   cd terraform/<cloud-provider>/<env>
   ```
2. Run the `install.sh` script that provisions the infra and installs the services<br>

   ```
   time ./install.sh
   ```

> NOTE: Currently there is only support for Azure. To add support for a new cloud provider, follow this [document](/use/source-code/easy-installer/adding-support-for-a-new-cloud-provider). We welcome contributions!


# Functional Configurations

To configure Sunbird Ed platform based on your use case, you will need to use the Postman tool. You can download and install the Postman tool by visiting the following link: <https://www.postman.com/downloads/>.

Please refer the below mentioned postman collection to setup minimal functional configuration for content creation workflow. Download the postman collection of Sunbird-Ed functional configuration from [here](https://github.com/project-sunbird/sunbird-ed-installer/tree/main/postman-collection)

Download the postman environment variable file (`postman.env.json`) from [here](https://github.com/project-sunbird/sunbird-ed-installer/blob/main/terraform/azure/template/postman.env.json) and replace the place holder values with actual values.

> NOTE: The above link points to Azure Postman ENV file from template directory. Depending on the cloud provider, please download the respective file.

​Import postman collection and environment variables to postman tool

refer: ​<https://learning.postman.com/docs/getting-started/importing-and-exporting-data/#importing-postman-data>

* Once the import is done, click on the "Collections" tab located in the upper-left corner. From the dropdown menu in the upper-right corner, select the desired environment name.
* Right click on the collection and choose `Run collection`. In `Run Configuration` section update `Delay` to `500ms` and then run the collection. This will trigger all the apis in the collection.

For forms related configurations and customizations, refer to the postman collection [here](https://www.postman.com/sunbird-building-blocks/sunbird-ed-coss/overview)

After configuration to ensure the installation is proper, use the following sanity test cases to validate the installation (& configuration)

{% file src="/files/1iqgGLoVjTRiu2H5hV8K" %}


# Developer Guide - Overview


# Architecture - Component Diagram

The architecture diagram explains the L0 architectural view of Sunbird-ED.

<figure><img src="/files/m1qr3dnAD2XhIZmSbLWl" alt=""><figcaption></figcaption></figure>

### Learning Apps

These are the client-facing applications where users (Admin, Creators and Consumers) can drive some capabilities.

* **Sunbird-Portal UI**\
  The Sunbird portal is the browser-based interface for the Sunbird application stack. It provides a web app through which all Sunbird functionality can be accessed.
* **Sunbird-Mobile-App**\
  The Sunbird Mobile app provides mobility to its feature-rich learning platform. It provides learners with the flexibility to learn anywhere, anytime.
* **Sunbird-Desktop**\
  It is powered by Sunbird-Portal itself. The same code-base is being used for offline access of portal application.
* **Sunbird-CoKreat (part of Sunbird-CoKreat building block)**\
  [**https://cokreat.sunbird.org/learn/readme#what-is-sunbird-cokreat**](https://cokreat.sunbird.org/learn/readme#what-is-sunbird-cokreat)

#### Video on Sunbird ED Architecture - Part 2

(Refer to this [link](https://ed.sunbird.org/learn/technical-overview/technical-architecture-diagram#video-sunbird-tech-architecture) for Part 1 of the explanation)

{% embed url="<https://youtu.be/XPrhdALMHeI?si=4DgX6U6QlwgBQSqX&t=116>" %}

### Front-end Libraries

Please refer to the below for more details on front-end libraries.

[Independent Libraries](/use/source-code/reference-apps/independent-libraries)

### API Player

* Sunbird-Portal (API service)\
  Sunbird portal is packaged with Client & Server side applications. The server slide application (NodeJS) will be built and deployed independently, acting as a proxy service for the Sunbird Portal (UI) application.
* Sunbird-Creation-Portal (API service)\
  Sunbird creation portal is also packaged with Client & Server side applications. The server slide application (NodeJS) will be built and deployed independently, acting as a proxy service for the Sunbird-Creation-Portal (UI) application.
* Form service

[Form service](/use/source-code/form-service)

* Contribute (Program) service

{% embed url="<https://cokreat.sunbird.org/contribute/contribution-service>" %}

### Dependant Sunbird BB's

[Dependencies](/use/learn-more/dependencies)


# System Requirements


# Learning Apps

**SunbirdEd-Portal / Desktop**

| Software                    | Version |
| --------------------------- | ------- |
| Node                        | 16      |
| Angular                     | 14      |
| Yarn (RECOMMENDED over npm) |         |
| NPM                         | 8+      |

**SunbirdEd-Mobile**

<table><thead><tr><th width="284.7636224792876">Software</th><th>Version</th></tr></thead><tbody><tr><td>Node</td><td>14</td></tr><tr><td>Angular</td><td>13+</td></tr><tr><td>NPM</td><td>5.6</td></tr><tr><td>Cordova</td><td>9</td></tr><tr><td>Ionic</td><td>5</td></tr><tr><td>Android SDK</td><td>10</td></tr><tr><td>Android Platform Tools</td><td>Compatible with Android SDK</td></tr></tbody></table>


# Install Locally


# SunbirdED Mobile

**Dependencies:**\
NPM Version - above 6\
Node JS Version - above 8

**1. Ionic-Android build Setup**\
\- [Install java](https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)\
\- [Install Gradle](https://gradle.org/install/)\
\- [Install Android Studio](https://developer.android.com/studio/)\
\- After Android studio installation, install SDK\
\- Open Android studio and goto `settings/appearance and behavior/system settings/Android SDK`\
\- Install appropriate Android sdk platform package.\
\- Add environment variables in `~/.bashrc` or `~/.bash_profile` as follows\
`export ANDROID_SDK_ROOT=path_to_sdk`\
`export PATH=$PATH:$ANDROID_SDK_ROOT/tools/bin`\
`export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools`\
\- Reference: <https://ionicframework.com/docs/installation/android>

```
CLI Setup    
- `npm install -g ionic`   
- `npm install -g cordova`   
```

**2. Project Setup**\
\- git clone the repo(<https://github.com/Sunbird-Ed/SunbirdEd-mobile-app>).\
\- Rename `sunbird.properties.example` file to `sunbird.properties` and put all the valid credentials and api endpoint.\
\- Go to project folder and run npm i\
\- Run `./build.sh`

**3. How to build apk**\
\- To check attached devices do `adb devices`\
\- `npm run ionic-build` (Make sure you have attached device)\
\- `ionic cordova run android --prod`\
\- Apk location `project_folder/platforms/android/app/build/outputs/apk/staging/debug/apk_name.apk`

**4. How to debug apk**\
\- Open chrome and enter `chrome://inspect`\
\- Select app

## IOS Development setup

### Prerequisites

```
1. Node js version 10.18.1
2. Ionic 5.4.16 using `npm i ionic@5.4.16 -g`
3. Cordova 9.0.0  using `npm i cordova@9.0.0 -g`
4. cordova-res 0.15.3 - using `npm install -g cordova-res`
5. ios-deploy  1.11.4 - using `brew install ios-deploy`
all of the above should be installed globally
Xcode 12.4 Build version 12D4e or above
```

### Steps

```
1. Checkout sunbird-sdk repo from https://github.com/shikshalokam/sunbird-mobile-sdk with branch release-3.9.0-ios
2. cd to <sunbird-mobile-sdk> && npm i && npm run build:prod
3. Checkout sunbird-mobile-app repo from https://github.com/shikshalokam/SunbirdEd-mobile-app with branch release-3.9.0-ios
4. Add `GoogleService-Info.plist` file
5. cd to <sunbird-mobile-app> local path
6. RUN npm i <sunbird-sdk repo local path>/dist
7. RUN npm i
8. RUN ./build-ios.sh
9. RUN cordova emulate ios
```

### Possible Errors

1. error: Value for SWIFT\_VERSION cannot be empty. (in target 'Sunbird' from project 'Sunbird') or Duplicate GoogleService-Info.plist file error

Solution

```
open platforms/ios/Sunbird.xcworkspace 
Select Sunbird 
Build setting Project, targets
update Swift language version to 4 
Inside Tagets -> Build phases -> Copy Bundle Resources -> remove duplicate GoogleService-Info.plist if present
and close Xcode then rerun the **cordova emulate ios**
```


# SunbirdED Portal

The Sunbird portal is the browser-based interface for the Sunbird application stack. It provides a web app through which all Sunbird functionality can be accessed.

### Getting started

To get started with the Sunbird portal, please try out our cloud-based demo site at: [https://staging.sunbirded.org](https://staging.sunbirded.org/)

### Table of contents

* [Prerequisites](https://github.com/Sunbird-Ed/SunbirdEd-portal#prerequisites)
* [Project Setup](https://github.com/Sunbird-Ed/SunbirdEd-portal#project-setup)
* [Running Application](https://github.com/Sunbird-Ed/SunbirdEd-portal#running-application)
* [Project Structure](https://github.com/Sunbird-Ed/SunbirdEd-portal#project-structure)
* [Testing](https://github.com/Sunbird-Ed/SunbirdEd-portal#testing)

#### Prerequisites

<table><thead><tr><th width="261">System Requirements</th><th></th></tr></thead><tbody><tr><td><strong>Operating System</strong></td><td>MAC OS X 10.0 and above/Linux<br><br><mark style="color:red;">Windows (not verified).</mark> Take it with your own expertise(no community support, but open for contribution).</td></tr><tr><td><strong>RAM</strong></td><td>> 6 Gb</td></tr><tr><td><strong>CPU</strong></td><td>2 cores, >2 GHz</td></tr></tbody></table>

| Software dependencies                                            |                                                      |
| ---------------------------------------------------------------- | ---------------------------------------------------- |
| [**Node**](https://nodejs.org/en/download/)                      | > 14.x.x (Install the latest release of LTS version) |
| [**Angular CLI**](https://angular.io/cli#installing-angular-cli) | > 11.x.x (Install the latest Angular CLI version)    |
| [**yarn**](https://classic.yarnpkg.com/en/)                      | Latest version of yarn: `npm install --global yarn`  |
| [**nodemon**](https://www.npmjs.com/package/nodemon)             | Latest version of nodemon: `npm install -g nodemon`  |

#### Project Setup

1. Clone project

   ```
   git clone https://github.com/Sunbird-Ed/SunbirdEd-portal.git
   ```

   > ***Note***: Stable versions of the sunbird portal are available via tags for each release, and the master branch contains latest stable release. For latest stable release [refer](https://github.com/Sunbird-Ed/SunbirdEd-portal/branches)
2. Install required dependencies
   1. Sunbird portal or web application
      1. $ cd {PROJECT-FOLDER}/src/app/client
      2. $ yarn install
   2. Sunbird services stack or the backend API interface
      1. $ cd {PROJECT-FOLDER}/src/app
      2. $ yarn install
3. Configuring the Environment and Services Stack

   > Configure the following system environment variables in the terminal which you have opened

   ```
      | Environment Variable      |  Value  | Data Type |
      | :------------------------ | ------- | --------- |
      |  sunbird_environment      | local   |   string  |
      |  sunbird_instance         | sunbird |   string  |
      |  sunbird_default_channel  | sunbird |   string  |
      |  sunbird_default_tenant   | sunbird |   string  |
   ```

   > The initialization of these environmental variables can take place in a common place like in your **.bashrc** or **.bash\_profile**
4. Edit the Application Configuration

   > Open `<PROJECT-FOLDER>/src/app/helpers/environmentVariablesHelper.js` in any available text editor and update the contents of the file so that it contains exactly the following values

   ```
       module.exports = {
           // 1. LEARNER_URL   
           LEARNER_URL: env.sunbird_learner_player_url || <'https://<host for adopter's instance>',
           
           // 2. CONTENT_URL
           CONTENT_URL: env.sunbird_content_player_url || <'https://<host for adopter's instance>',
           
           // 3. CONTENT_PROXY  
           CONTENT_PROXY_URL: env.sunbird_content_proxy_url || <'https://<host for adopter's instance>',
           PORTAL_REALM: env.sunbird_portal_realm || 'sunbird',
           
           // 4. PORTAL_AUTH_SERVER_URL
           PORTAL_AUTH_SERVER_URL: env.sunbird_portal_auth_server_url || <'https://<host for adopter's instance>',
           PORTAL_AUTH_SERVER_CLIENT: env.sunbird_portal_auth_server_client || "portal",
           ...
           PORTAL_PORT: env.sunbird_port || 3000,
             
           // 5. PORTAL_API_AUTH_TOKEN
           PORTAL_API_AUTH_TOKEN: env.sunbird_api_auth_token || User generated API auth token
           ...
           
           // 6. PORTAL_ECHO_API_URL
           PORTAL_ECHO_API_URL: env.sunbird_echo_api_url || '',
           ...
       }
   ```

   > These are the mandatory keys required to run the application in Local environment. Please update them with appropriate values in `<PROJECT-FOLDER>/src/app/helpers/environmentVariablesHelper.js`

   ```markup
       |           Environment Variable        |  Data Type |             Description                |
       | :-------------------------------------| ---------- | -------------------------------------  |
       |        sunbird_azure_account_name     |   string   |          Azure account Name            |
       |        sunbird_azure_account_key      |   string   |          Azure Account Key             |
       |          sunbird_aws_region           |   string   |        Region for AWS account          |
       |  KONG_DEVICE_REGISTER_ANONYMOUS_TOKEN |   boolean  |   Flag value to allow anonymous user   |
       |  sunbird_anonymous_device_register_api|   string   |The API for registering anonymous device|
       |  sunbird_anonymous_register_token     |   string   |    Token to register anonymous device  |
       |               SB_DOMAIN               |   string   |    The host for Sunbird Environment    |
       |         PORTAL_API_AUTH_TOKEN         |   string   |     User generated API auth token      |
   ```

   > Once the file is updated with appropriate values, then you can proceed with running the application

#### Running Application

1. Sunbird portal or web application
   1. Run the following command in the **{PROJECT-FOLDER}/src/app/client** folder
   2. $ ng build --watch=true
   3. Wait for the build process to complete before proceeding to the next step
2. Sunbird services stack or the backend API interface
   1. Run the following command in the **{PROJECT-FOLDER}/src/app** folder
   2. $ npm run server
3. The local HTTP server is launched at `http://localhost:3000`

#### Project Structure

```
.
├── Sunbirded-portal                                            
|   ├── /.circleci                           # 
│   |   └── config.yml                       # Circleci Configuration file
|   ├── /experiments                         # -|-
|   ├── /src/app                             # Sunbird portal or web application
│   |   ├── /client                          # -|-
│   |   |    └── src                         # -|-
│   |   ├── /helpers                         # Helpers and Service file
│   |   ├── /libs                            # Sunbird utilities
│   |   ├── /proxy                           # Redirection to respective services
│   |   ├── /resourcebundles                 # Language resources
│   |   ├── /routes                          # Sunbird Backend Routes
│   |   ├── /sunbird-plugins                 # Sunbird plugins for editors
│   |   ├── /tests                           # Test case scripts for helpers and routes
│   |   ├── framework.config.js              # Default framework configuration
│   |   ├── gulp-tenant.js                   # -|-
│   |   ├── gulpfile.js                      # Gulp build configuration
│   |   ├── package.json                     # Contains Node packages as specified as dependencies in package.json
│   |   └── server.js                        # Main application program file / entry file for Sunbird services stack or the backend API interface
└───└── .gitignore                           # git configuration to ignore some files and folder
```

#### Testing

1. Sunbird portal or web application

   ```
    1. $ cd {PROJECT-FOLDER}/src/app/client
    2. $ npm run test
    3. With Coverage $ npm run test-coverage
   ```
2. Sunbird services stack or the backend API interface

   ```
    1. $ cd {PROJECT-FOLDER}/src/app
    2. $ npm run backend-test
    3. With Coverage $ npm run backend-test-with-coverage
   ```


# Easy Installer

The SunbirdEd Easy Installer is designed to simplify and accelerate the setup process of the SunbirdEd platform. This installer provides an automated way to deploy SunbirdEd, ensuring that all necessary components and dependencies are correctly configured and installed with minimal user intervention. Whether you are setting up a environment to try SunbirdED or development environment, the Easy Installer will help you get SunbirdEd up and running quickly, allowing you to focus on leveraging its features for your educational initiatives.&#x20;

Please refer below mentioned link to setup Sunbird Ed using easy installer.

{% embed url="<https://github.com/project-sunbird/sunbird-ed-installer>" %}


# Adding Support for a New Cloud Provider

## Requirements

#### Cluster Specifications

* **Minimum Requirements:**
  * CPU: 48 vCPUs
  * Memory: 192 GB
* **Recommended Node Size:**
  * 3 nodes of each of 16 vCPUs 64 GB RAM

#### Networking

* Public Subnet

#### Storage Buckets

Create the following buckets:

1. `private_container_name`
2. `public_container_name`
3. `dial_state_container_public`
4. `velero_private_container_name`

#### Additional Requirements

1. Storage Account
2. Random String
3. Encryption String
4. JWT Tokens
5. RSA Keys

***

### Steps to Add a New Cloud Provider

#### Step 1: Create a New Folder

* Navigate to the `terraform` directory and create a folder for the new cloud provider.\
  Example: `terraform/gcp/`

#### Step 2: Recommended Folder Structure

Organize the folder as follows:

```plaintext
terraform/<cloud_provider>/
├── _common
│   ├── kubernetescluster.hcl
│   ├── keys.hcl
│   ├── network.hcl
│   ├── output-file.hcl
│   ├── serviceaccount.hcl
│   ├── storage.hcl
│   └── upload-files.hcl
├── modules
│   ├── kubernetescluster
│   ├── keys
│   ├── network
│   ├── output-file
│   ├── serviceaccount
│   ├── storage
│   └── upload-files
└── template/
    ├── kubernetescluster
    │   └── terragrunt.hcl
    ├── create_tf_backend.sh
    ├── global-values.yaml
    ├── install.sh
    ├── keys
    │   └── terragrunt.hcl
    ├── network
    │   └── terragrunt.hcl
    ├── output-file
    │   └── terragrunt.hcl
    ├── postman.env.json
    ├── storage
    │   └── terragrunt.hcl
    ├── terragrunt.hcl
    └── upload-files
        └── terragrunt.hcl
```

#### Step 3: Copy Template Files

Copy the template files from the Azure configuration:

```sh
cp sunbird-ed-installer/terraform/azure/template/{global-values.yaml,install.sh} sunbird-ed-installer/terraform/gcp/template/
In global-values.yaml, add this variable:
cloud_provider: "REPLACE_ME" # for configuring GCP and AWS installations
```

#### Step 4: Structuring Output Files

This will become the input for Helm bundles:

```plaintext
  global-cloud-values.yaml
  global-values.yaml 
```

#### Step 5: Helm Changes

In Helm charts, wherever cloud values are being referred to, use the following format:

```yaml
{{- if eq .Values.global.cloud_storage_provider "aws" }}
# AWS Specific Values
{{- else if eq .Values.global.cloud_storage_provider "gcp" }}
# GCP Specific Values
{{- end }}
```

**Example:**

In **Helm charts**, using a direct reference for **Azure**:

```yaml
container_name: "{{ .Values.global.public_container_name }}"
```

Using an `if-else` condition for multiple cloud providers:

```yaml
container_name: 
  {{- if eq .Values.global.cloud_storage_provider "aws" }}
  "{{ .Values.global.public_container_name }}"
  {{- else if eq .Values.global.cloud_storage_provider "gcp" }}
  "{{ .Values.global.public_container_namee }}"
  {{- else }}
  "{{ .Values.telemetry_container_private }}"
  {{- end }}
```

#### Step 6: Enable Service Account and Add Annotations

When using storage buckets, ensure the appropriate service account is enabled and annotated\
For example:

```yaml
serviceAccount:
  create: true
  name: <created at step 2>
  annotations:
    iam.gke.io/gcp-service-account: <service-account-name>@<project-id>.iam.gserviceaccount.com
```

For **Azure installation**, please refer to the documentation:`/sunbird-ed-installer/terraform/azure/README.md`

For GCP **installation**, please refer to the documentation:`/sunbird-ed-installer/``terraform/gcp/README.md`


# Velero Backup and Restore Guide

## Overview

This guide explains how **Velero** is used for **backup and restore** processes in the **Sunbird infrastructure**. Velero is installed as part of the [ED Installer ](https://github.com/project-sunbird/sunbird-ed-installer/tree/main/helmcharts/additional)and is used to take entire cluster backups and database-level backups. We use Velero to:

* Schedule and manage database and cluster-wide backups
* Enable volume snapshots for persistent storage
* Restore specific workloads and namespaces as needed

For more detailed features and configurations, refer to the official [Velero ](https://velero.io/docs/)documentation.

### Backup Scheduling

Backups are scheduled using Helm values under the `schedules` section. You can enable or disable specific schedules, change backup times, and set retention policies.

#### Example Velero Schedule Config

```yaml
schedules:
  edcluster-backup:
    disabled: false
    schedule: "0 0 * * *"
    useOwnerReferencesInBackup: false
    template:
      ttl: "240h"
      includedNamespaces:
        - "sunbird"
      snapshotVolumes: true  

  database-backup:
    disabled: true # disabled by default; enable and configure the schedule as per the needs
    schedule: "0 0 * * *"
    useOwnerReferencesInBackup: false
    template:
      ttl: "240h"
      includedNamespaces:
        - "sunbird"
      labelSelector:
        matchExpressions:
          - key: app.kubernetes.io/name
            operator: In
            values:
              - cassandra
              - neo4j
              - redis
              - postgresql
      snapshotVolumes: true
```

### Restoring from Backup

#### Retrieving Backup Names

To find the backup names in your cluster where Velero is installed, execute the following command:

```sh
velero get backups
```

This will list all the backups available, allowing you to choose the specific `<backup-name>` for restoration.

#### Namespace Level Restore

To restore a specific namespace from a backup, use the following command:

```sh
velero restore create --from-backup <backup-name> --namespace-mappings <source-namespace>:<target-namespace>
```

Replace `<backup-name>`, `<source-namespace>`, and `<target-namespace>` with your specific backup and namespace details.

#### Service Level Restore

For service level restoration, you might need to specify particular resources. Here’s an example command:

```sh
velero restore create --from-backup <backup-name> --include-resources <resource-type>
```

**Example**: The following command demonstrates how to restore the entire Cassandra service, including all associated resources and volumes:

```sh
velero restore create cassandra-restore-test \
  --from-backup <backup-name> \
  --namespace-mappings sunbird:sunbird \
  --selector app.kubernetes.io/name=cassandra \
  --restore-volumes
```

This ensures that all components of the Cassandra service are restored from the specified backup.

#### Entire Cluster Restore

To restore the entire cluster from a backup, execute the following command:

```sh
velero restore create --from-backup <backup-name>
```

Replace `<backup-name>` with the name of your specific backup to initiate a full cluster restoration.

References:

1. Velero - <https://velero.io/docs/main/>


# Database Migration: Sunbird ED 8.1.0 → Sunbird Spark

End-to-end runbook for migrating data from a Sunbird ED 8.1.0 cluster into a new Sunbird Spark cluster.

**Supported clouds:** Azure / GCP / AWS (Blob / GCS / S3)

> **Note:** Same-domain migration only (DNS swap at cutover). Different-domain migrations are not validated by this guide.

***

### Prerequisites — One-time setup

Before starting, complete the **one-time setup** in [`private-repo-setup/README.md`](https://github.com/Sunbird-Spark/sunbird-spark-installer/blob/main/private-repo-setup/README.md). Required for **both** paths:

**GitHub Action path (primary)**

* Create private repo
* Copy workflows
* Encrypt config
* Configure Azure OIDC + GitHub secrets/environment

**VM path (alternative — see Appendix)**

* Install CLI tools: `jq`, `yq`, `opentofu`, `terragrunt`, `kubectl`, `helm`, `postman`, `az/gcloud`
* Clone repos on VM
* Place config at `opentofu/<cloud>/<env>/`

Finish that setup, then return here for the migration phases.

***

### Architecture

```
SOURCE CLUSTER                  OBJECT STORAGE                TARGET CLUSTER
(Sunbird ED 8.1.0)             (Blob / GCS / S3)            (Sunbird Spark)

+-----------------+             +----------------+            +------------------+
| PostgreSQL    --|--> dump --> |                |--> load -->| YugabyteDB YSQL  |
| Cassandra     --|--> CSV  --> |   Artifacts    |--> load -->| YugabyteDB YCQL  |
| Neo4j         --|--> CSV  --> |                |--> load -->| JanusGraph       |
| Elasticsearch --|--> snap --> |                |--> load -->| Elasticsearch    |
+-----------------+             +----------------+            +------------------+

     PHASE 1 (export.sh)           HANDOFF                   PHASE 4 (migrate.sh)
```

***

### Orchestration scripts

Three shell scripts drive the helm-based migration steps. **Use these — do not run `helm upgrade --install` directly.**

| Script                      | Runs on     | What it drives                                                    |
| --------------------------- | ----------- | ----------------------------------------------------------------- |
| `migration/export.sh`       | OLD cluster | Phase 1 — exports 4 source DBs to object storage                  |
| `migration/migrate.sh`      | NEW cluster | Phase 4 — restores data one DB at a time + DB-only fixups         |
| `migration/post-migrate.sh` | NEW cluster | Phase 6 — post-deploy reconciles with service-readiness preflight |

Each script wraps `helm upgrade --install` calls and manages the `enabled/disabled` flag toggling between steps automatically. Scripts use `set -euo pipefail` — any failure halts immediately.

**Run all steps:**

```bash
./migration/export.sh          # Phase 1 (OLD cluster)
./migration/migrate.sh         # Phase 4 (NEW cluster)
./migration/post-migrate.sh    # Phase 6 (NEW cluster)
```

**Run individual steps (recommended for first-time runs):**

```bash
./migration/export.sh 1.1      # run only step 1.1
./migration/migrate.sh 4.3     # run only step 4.3
./migration/post-migrate.sh 6.2
```

**Configurable env vars (all have defaults):**

| Var            | Default        | Purpose                |
| -------------- | -------------- | ---------------------- |
| `NAMESPACE`    | `migration`    | Helm release namespace |
| `RELEASE`      | `db-migration` | Helm release name      |
| `HELM_TIMEOUT` | `60m`          | Per-upgrade timeout    |

***

### Migration Phases — Overview

> **Warning:** Run phases **in order**. Do not skip ahead.

| Phase | What it does                                    | Where it runs                   |
| ----- | ----------------------------------------------- | ------------------------------- |
| 1     | Export DBs from OLD cluster into object storage | OLD cluster — `export.sh`       |
| 2     | Provision NEW infra (no apps yet)               | Private repo + Cloud            |
| 3     | Install data-tier only on NEW cluster           | NEW cluster — GitHub Action     |
| 4     | Restore data one DB at a time                   | NEW cluster — `migrate.sh`      |
| 5     | Install all remaining services                  | NEW cluster — GitHub Action     |
| 6     | Post-deploy reconciles                          | NEW cluster — `post-migrate.sh` |
| 7     | DNS swap (cutover)                              | DNS provider                    |
| 8     | Validate                                        | NEW cluster — GitHub Action     |

***

### Phase 1 — Export from OLD Cluster

Runs inside the **source ED 8.1.0 cluster**. Produces tarballs in object storage.

#### 1.1 Configure export values

Edit [`migration/database/export/values.yaml`](https://github.com/Sunbird-Spark/sunbird-spark-installer/blob/main/migration/database/export/values.yaml) with source DB endpoints and storage credentials:

| Cloud | Required fields                                           |
| ----- | --------------------------------------------------------- |
| Azure | `storageAccount` + `accessKey`                            |
| GCP   | `bucket` + `serviceAccountKey`                            |
| AWS   | `s3Bucket` + `accessKeyId` + `secretAccessKey` + `region` |

#### 1.2 Run the export

**Run all 4 steps at once:**

```bash
./migration/export.sh
```

**Run step by step:**

```bash
./migration/export.sh 1.1   # PostgreSQL → <bucket>/postgresql/*.sql.gz
./migration/export.sh 1.2   # Cassandra  → <bucket>/cassandra/<keyspace>.tar.gz
./migration/export.sh 1.3   # Neo4j      → <bucket>/neo4j/neo4j_export.tar.gz
./migration/export.sh 1.4   # Elasticsearch snapshot → <bucket>/cluster-1/snapshots/...
```

#### 1.3 Verify artifacts in cloud storage

| Path                                   | Content                |
| -------------------------------------- | ---------------------- |
| `<bucket>/postgresql/*.sql.gz`         | PostgreSQL dumps       |
| `<bucket>/cassandra/<keyspace>.tar.gz` | Cassandra keyspaces    |
| `<bucket>/neo4j/neo4j_export.tar.gz`   | Neo4j export           |
| `<bucket>/cluster-1/snapshots/...`     | Elasticsearch snapshot |

***

### Phase 2 — Provision NEW Spark Cluster (Infra Only)

Uses the **private-repo GitHub Action** (`sunbird-spark-platform.yaml`).

> **Note:** This phase reuses OLD storage — it does **not** create a new storage account. The `skip_storage_module: true` flag prevents OpenTofu from provisioning new storage.

#### 2.1 Copy config templates into private repo

```
opentofu/<cloud>/template/global-values.yaml       →  configs/<env>/global-values.yaml
opentofu/<cloud>/template/global-cloud-values.yaml →  configs/<env>/global-cloud-values.yaml
```

#### 2.2 Edit `global-values.yaml`

* Set `resource_group_name` as needed
* Set `skip_storage_module: true` ← **critical**

#### 2.3 Fetch OLD cluster's encryption key

```bash
kubectl --context <OLD-CLUSTER-CONTEXT> \
  get configmap learn-service -n sunbird -o yaml \
  | grep sunbird_encryption_key
```

> **Note:** This key is needed so the NEW cluster can decrypt PII (email/phone) migrated into YugabyteDB.

#### 2.4 Edit `global-cloud-values.yaml`

Prefill with OLD storage references and the encryption key:

```yaml
global:
  cloud_storage_access_key:          <OLD storage account name>
  public_container_name:             <OLD public container>
  private_container_name:            <OLD private container>
  velero_storage_container_private:  <OLD velero container>
  sunbird_encryption_key:            "<OLD encryption key>"
```

**Why these settings matter:**

* **OLD storage refs** — The NEW cluster reads existing user uploads, content, and certs directly from OLD storage. No data copy needed.
* **OLD encryption key** — The `learn-service` configmap uses `{{ default .Values.global.random_string .Values.global.sunbird_encryption_key }}`. Without the OLD key, PII columns will not decrypt and logins will fail.
* **Do not touch `random_string`** — Keycloak client secrets, kong consumers, player session secret, and flink all depend on it. It is managed by OpenTofu's keys module.

#### 2.5 Encrypt and commit both config files

```bash
ansible-vault encrypt \
  configs/<env>/global-values.yaml \
  configs/<env>/global-cloud-values.yaml

git push
```

#### 2.6 Trigger GitHub Action — infra only

| Input                 | Value |
| --------------------- | ----- |
| `create_tf_backend`   | ✅     |
| `backup_configs`      | ✅     |
| `create_tf_resources` | ✅     |

Wait for AKS/GKE and supporting infra to complete before proceeding.

***

### Phase 3 — Install Data-Tier Only

> **Warning:** Do **not** install `learnbb` or `knowledgebb` yet — they would repopulate schemas before import runs.

Trigger the GitHub Action **3 times** in order with `install_helm: true` and `helm_mode: selective`:

| Run | Bundle        | `specific_charts`  | Installs           |
| --- | ------------- | ------------------ | ------------------ |
| 1   | `edbb`        | `kafka yugabytedb` | Kafka + YugabyteDB |
| 2   | `learnbb`     | `elasticsearch`    | Elasticsearch      |
| 3   | `knowledgebb` | `janusgraph`       | JanusGraph         |

After Run 3, all target databases exist (empty/freshly schema'd) and are ready for import.

***

### Phase 4 — Import Data

**Before running:** edit [`migration/database/import/values.yaml`](https://github.com/Sunbird-Spark/sunbird-spark-installer/blob/main/migration/database/import/values.yaml) with target DB endpoints, storage credentials, and step-specific settings (see each sub-step below).

> **Warning:** Run steps **in order**. Each step is safe to rerun individually if it fails.

**Run all 6 steps at once:**

```bash
./migration/migrate.sh
```

**Run step by step (recommended first time — verify each before moving on):**

```bash
./migration/migrate.sh 4.1
./migration/migrate.sh 4.2
./migration/migrate.sh 4.3
./migration/migrate.sh 4.4
./migration/migrate.sh 4.5
./migration/migrate.sh 4.6
```

#### 4.1 PostgreSQL → YugabyteDB YSQL

No extra config beyond target DB connection settings already in `values.yaml`.

**Verify after:**

```bash
kubectl exec -it -n sunbird yb-tserver-0 -- ysqlsh -c '\l'
# Expected: keycloak and registry databases visible
```

***

#### 4.2 Rotate Keycloak Credentials

The PostgreSQL restore brought in OLD keycloak admin password and client secrets. Rotate them now so the NEW keycloak service (Phase 5) finds matching credentials.

Set in `migration/database/import/values.yaml` before running:

```yaml
dbFixups:
  keycloakCredentials:
    adminPassword: "<keycloak_password from NEW cluster's global-values.yaml>"
    secretSuffix:  "<random_string from NEW cluster's global-cloud-values.yaml>"
```

| Field           | Source                                                                                    |
| --------------- | ----------------------------------------------------------------------------------------- |
| `adminPassword` | `keycloak_password` in NEW `global-values.yaml`                                           |
| `secretSuffix`  | `random_string` in NEW `global-cloud-values.yaml` (auto-generated by OpenTofu in Phase 2) |

> **Tip:** Writes directly to YSQL (`keycloak` DB). No keycloak service needed. Safe to rerun.

***

#### 4.3 Cassandra → YugabyteDB YCQL

Set in `migration/database/import/values.yaml` before running:

```yaml
databases:
  ycql:
    sourcePrefix: "sb_"
    targetPrefix: "<global.env from NEW cluster's global-values.yaml>_"
```

> **Warning:** `targetPrefix` must match the NEW cluster's `global.env` with a trailing underscore. Example: `env: "dv"` → `targetPrefix: "dv_"`

Logs show `==> keyspace X -> Y` per keyspace and `<== Y done: tables=N rows=M`.

***

#### 4.4 Neo4j → JanusGraph

No extra config beyond JanusGraph connection settings in `values.yaml`.

Runs `import_data.groovy` → `set_graphid.groovy` → `verify_migration.groovy` inside the JanusGraph pod.

***

#### 4.5 Elasticsearch → Elasticsearch

No extra config beyond storage and ES connection settings in `values.yaml`.

Restores snapshot via `repository-azure` (or GCS / S3) plugin.

***

#### 4.6 Backfill `createdat` Column

Backfills the `createdat` column on the YugabyteDB user table (not populated in ED 8.1.0). No service dependency. No extra config needed.

***

### Phase 5 — Install All Remaining Services

Trigger the GitHub Action with:

| Input          | Value |
| -------------- | ----- |
| `install_helm` | ✅     |
| `helm_mode`    | `all` |

Runs all 7 bundles: `monitoring`, `edbb`, `learnbb`, `knowledgebb`, `obsrvbb`, `inquirybb`, `additional`. Charts already installed in Phase 3 upgrade in place — no data loss.

***

### Phase 6 — Post-Deploy Reconciles

> **Warning:** Run **after Phase 5** — requires running keycloak, knowlg-service, and lern-service.

`post-migrate.sh` checks readiness before running: it queries those three Deployments in the `sunbird` namespace and exits immediately if any has 0 Ready replicas. Wait for Phase 5 Action to finish and pods to become Ready, then run.

**Before running:** set step-specific values in `migration/database/import/values.yaml`.

**Run all 3 steps at once:**

```bash
./migration/post-migrate.sh
```

**Run step by step:**

```bash
./migration/post-migrate.sh 6.1
./migration/post-migrate.sh 6.2
./migration/post-migrate.sh 6.3
```

#### 6.1 Keycloak Realm Reconcile

Reconciles the migrated keycloak realm with the NEW chart's `realm.json` (locales, refresh-token policy, client redirectUris, auth flows).

> **Note:** Migrated user accounts and passwords are **never touched**.

Set in `migration/database/import/values.yaml`:

```yaml
postMigration:
  keycloakRealmReconcile:
    adminPassword: "<keycloak_password from NEW cluster's global-values.yaml>"
```

***

#### 6.2 Hierarchy Fix

Regenerates content hierarchy relations via `knowlg-service`. No extra config beyond connection settings in `values.yaml`.

***

#### 6.3 User Progress Sync

Syncs user course progress across frontend and backend. Required when migrating from older Sunbird versions where progress data may be out of sync.

Set in `migration/database/import/values.yaml`:

```yaml
postMigration:
  userProgressSync:
    adminUsername: "<admin-user>"
    adminPassword: "<admin-password>"
    dryRun: false
```

> **Note:** `adminUsername` and `adminPassword` must match the admin credentials created during initialization (e.g., `admin@yopmail.com` / `Admin@123`). Job automatically disables `filter_processed_enrolments` in lern-env ConfigMap before sync and re-enables it after completion.

***

### Phase 7 — DNS Swap (Cutover)

#### 7.1 Get the NEW cluster's nginx IP

```bash
kubectl get svc -n sunbird ingress-nginx-controller \
  -o jsonpath='{.status.loadBalancer.ingress[0].ip}'
```

#### 7.2 Update DNS

In the DNS provider (Route53 / Cloud DNS / etc.), update the A record for the OLD domain to point to the new nginx IP. Wait 5–30 minutes for propagation.

```bash
dig +short <your-domain>   # should resolve to new IP
```

***

### Recovery — Missed `sunbird_encryption_key` in Phase 2

> **Caution:** If `sunbird_encryption_key` was not set in `global-cloud-values.yaml` during Phase 2, `learn-service` falls back to `random_string` as the encryption key — causing login failures and garbled PII columns.

**Step 1 — Fetch OLD key:**

```bash
kubectl --context <OLD-CLUSTER-CONTEXT> \
  get configmap learn-service -n sunbird -o yaml \
  | grep sunbird_encryption_key
```

**Step 2 — Add to NEW cluster's `global-cloud-values.yaml`:**

```yaml
global:
  sunbird_encryption_key: "<value from OLD cluster>"
  # Do NOT touch random_string
```

**Step 3 — Re-encrypt, commit, and redeploy `learn-service`:**

```
helm_mode: selective   bundle: learnbb   specific_charts: learn-service
```

***

### Phase 8 — Validate

Trigger the GitHub Action with:

| Input                  | Purpose                                       |
| ---------------------- | --------------------------------------------- |
| `generate_postman_env` | Builds `env.json` with NEW cluster endpoints  |
| `migrate_forms`        | Seeds System Settings + creates/updates Forms |

**Form migration behaviour (`migrate_forms.py`):**

| API response | Action                                                    |
| ------------ | --------------------------------------------------------- |
| `404`        | Create form                                               |
| `200`        | Update form                                               |
| Skipped      | 6 Spark Portal Creation forms (left untouched if present) |

> **Note:** `run_post_install` is not needed for migrations — it is for fresh installs only.

**Manual sanity checks:**

* Login with a migrated user → password works (encryption key correct, keycloak reconciled)
* Old user-uploaded content is visible (storage refs correct)
* API endpoints return data
* Mobile app authenticates (android client redirectUris reconciled in Phase 6.1)

***

### End-to-end command reference

```bash
# ── OLD cluster (kubectl context = OLD) ──────────────────────────────────────
# Phase 1 — export 4 source DBs to object storage
./migration/export.sh

# ── switch kubectl context to NEW cluster ────────────────────────────────────

# Phase 2 — trigger GitHub Action: create_tf_backend + backup_configs + create_tf_resources
# Phase 3 — trigger GitHub Action 3 times:
#   Run 1: bundle=edbb,        specific_charts="kafka yugabytedb"
#   Run 2: bundle=learnbb,     specific_charts="elasticsearch"
#   Run 3: bundle=knowledgebb, specific_charts="janusgraph"

# Phase 4 — DB imports + DB-only fixups
./migration/migrate.sh

# Phase 5 — trigger GitHub Action: install_helm=true, helm_mode=all
#   Wait until Deployments in ns/sunbird are Ready.

# Phase 6 — post-deploy reconciles (preflight checks services first)
./migration/post-migrate.sh

# Phase 8 — trigger GitHub Action: generate_postman_env + migrate_forms

# Phase 7 — DNS swap (manual)
```

***

### Idempotency

All import steps are safe to rerun:

| Step                      | How idempotency is achieved                                                              |
| ------------------------- | ---------------------------------------------------------------------------------------- |
| 4.1 PostgreSQL restore    | `DROP/CREATE` database before restore                                                    |
| 4.2 Keycloak credentials  | `UPDATE` — no insert conflicts                                                           |
| 4.3 Cassandra → YCQL      | `TRUNCATE` before load (controlled by `truncateBeforeLoad` in values.yaml)               |
| 4.4 Neo4j → JanusGraph    | `verify_migration.groovy` validates; re-import overwrites                                |
| 4.5 Elasticsearch restore | Deletes non-system indices before restoring snapshot                                     |
| 4.6 createdat backfill    | `ALTER TABLE … ADD IF NOT EXISTS`; ES `_update_by_query` is a no-op if already populated |
| 6.1 Realm reconcile       | `PUT` (idempotent) for realm and client settings                                         |
| 6.2 Hierarchy fix         | `POST` to knowlg-service is idempotent per identifier                                    |
| 6.3 User progress sync    | `POST` to lern activity API is idempotent per enrolment                                  |

***

### Troubleshooting

| Symptom                              | Likely cause                                           | Fix                                                        |
| ------------------------------------ | ------------------------------------------------------ | ---------------------------------------------------------- |
| Login fails / PII columns garbled    | `sunbird_encryption_key` not set                       | See Recovery section above                                 |
| Old uploads return 404               | Wrong storage container names                          | Re-verify Phase 2.4                                        |
| Keycloak admin login fails           | `keycloakCredentials` not run or wrong `adminPassword` | Rerun step 4.2                                             |
| Client secret invalid                | Wrong `secretSuffix` in step 4.2                       | Re-read `random_string` from config, rerun step 4.2        |
| Refresh token rejected               | Realm reconcile did not apply                          | Rerun step 6.1                                             |
| YCQL keyspace not found              | `targetPrefix` mismatch vs `global.env`                | Fix prefix in values.yaml, rerun step 4.3                  |
| Mobile app cannot login              | android client redirectUris not updated                | Check step 6.1 job logs                                    |
| `helm timeout` on import job         | Job is working but slow                                | Set `HELM_TIMEOUT=120m` env var before running the script  |
| `post-migrate.sh` exits at preflight | keycloak/knowlg-service/lern-service not Ready         | Wait for Phase 5 Action to finish + pods Ready, then rerun |

***

### File Reference

| Path                                                                | Purpose                                                                       |
| ------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| `migration/export.sh`                                               | Phase 1 — orchestrates 4 export steps on OLD cluster                          |
| `migration/migrate.sh`                                              | Phase 4 — orchestrates 6 import/fixup steps on NEW cluster                    |
| `migration/post-migrate.sh`                                         | Phase 6 — orchestrates 3 post-deploy reconciles with readiness preflight      |
| `migration/database/export/values.yaml`                             | Phase 1 config — source DB endpoints + storage credentials                    |
| `migration/database/import/values.yaml`                             | Phase 4 + 6 config — target DB endpoints, fixup values, post-migration values |
| `migration/database/import/files/keycloak_apply_realm_reconcile.py` | Step 6.1 realm reconciler                                                     |
| `migration/database/import/files/user-progress-sync.py`             | Step 6.3 user progress sync                                                   |
| `migration/migrate_forms.py`                                        | Phase 8 — seed System Settings and Forms                                      |

***

### Appendix — Running Without GitHub Action (VM path)

GitHub Action is the primary path. For the VM path, complete the one-time VM setup in [`private-repo-setup/README.md`](https://github.com/Sunbird-Spark/sunbird-spark-installer/blob/main/private-repo-setup/README.md) first (CLI tools, repo clone, config placement).

| Phase        | GitHub Action inputs                                         | VM equivalent                                                       |
| ------------ | ------------------------------------------------------------ | ------------------------------------------------------------------- |
| 2            | `create_tf_backend`, `backup_configs`, `create_tf_resources` | `./install.sh create_tf_backend backup_configs create_tf_resources` |
| 3 — Run 1    | `edbb`, `specific_charts: kafka yugabytedb`                  | `./install.sh install_service edbb kafka yugabytedb`                |
| 3 — Run 2    | `learnbb`, `specific_charts: elasticsearch`                  | `./install.sh install_service learnbb elasticsearch`                |
| 3 — Run 3    | `knowledgebb`, `specific_charts: janusgraph`                 | `./install.sh install_service knowledgebb janusgraph`               |
| 5            | `helm_mode: all`                                             | `./install.sh install_helm_components`                              |
| 7 (recovery) | `learnbb`, `specific_charts: learn-service`                  | `./install.sh install_service learnbb learn-service`                |
| 8            | `generate_postman_env`, `migrate_forms`                      | `./install.sh generate_postman_env migrate_forms`                   |

> **Note:** Phases 1, 4, and 6 use `export.sh` / `migrate.sh` / `post-migrate.sh` directly and run identically in both paths.


# Configuration


# SunbirdEd Portal

This page provides a list of environment variables with their default values, description and purpose as required to run the Sunbird portal service. To change default behavior, modify the variable value based on your requirements.

### Variable List <a href="#variable-list" id="variable-list"></a>

<table data-header-hidden><thead><tr><th width="150"></th><th></th><th></th><th></th><th></th></tr></thead><tbody><tr><td><strong>S NO</strong></td><td><strong>VARIABLE NAME</strong></td><td><strong>DESCRIPTION</strong></td><td><strong>PURPOSE</strong></td><td><strong>DEFAULT VALUE</strong></td></tr><tr><td>1</td><td>sunbird_portal_realm</td><td>Represents the Keycloak realm value</td><td>The realm value of Keycloak to update in each installation</td><td>sunbird</td></tr><tr><td>2</td><td>sunbird_portal_auth_server_url</td><td>Represents the Keycloak authorization service URL</td><td>To connect to the Keycloak server</td><td>https://staging.open-sunbird.org/auth</td></tr><tr><td>3</td><td>sunbird_portal_auth_server_client</td><td>Represents the client ID of the Keycloak client</td><td>To update the client ID</td><td>portal</td></tr><tr><td>4</td><td>sunbird_environment</td><td>Represents the environment where the instance is running</td><td>To send the telemetry with proper pdata and for other purposes</td><td></td></tr><tr><td>5</td><td>sunbird_instance</td><td>Represents the name of the instance</td><td>To set up the name of the instance</td><td></td></tr><tr><td>6</td><td>sunbird_learner_player_url</td><td>Represents the learner service proxy URL</td><td>To change the learner service proxy URL</td><td>https://staging.open-sunbird.org/api/</td></tr><tr><td>7</td><td>sunbird_content_player_url</td><td>Represents the content service proxy URL</td><td>To change content service proxy URL</td><td>https://staging.open-sunbird.org/api/</td></tr><tr><td>8</td><td>sunbird_content_proxy_url</td><td>Represents the proxy URL address to load plugins</td><td>To load plugins</td><td>https://staging.open-sunbird.org</td></tr><tr><td>9</td><td>sunbird_default_channel</td><td>Represents the default channel of the installation, same as in learner service and content service</td><td>To set default channel for installation</td><td></td></tr><tr><td>10</td><td>sunbird_api_auth_token</td><td>Represents the auth token to connect APIs</td><td>To connect the services</td><td></td></tr><tr><td>11</td><td>sunbird_telemetry_packet_size</td><td>Represents the size of the batch to sync data</td><td>To set the size of events to be synced</td><td>20</td></tr><tr><td>12</td><td>sunbird_echo_api_url</td><td>Represents the URL to validate the SSO token</td><td>To validate the JWT Token from the trampoline service</td><td>https://staging.open-sunbird.org/api/echo/</td></tr><tr><td>13</td><td>sunbird_autocreate_trampoline_user</td><td>In case there are no users, auto create a user from the trampoline service</td><td>To change the handle for user creation from trampoline service</td><td>true</td></tr><tr><td>14</td><td>sunbird_trampoline_client_id</td><td>Represents the trampoline client ID</td><td>To identify the client using the trampoline service</td><td>trampoline</td></tr><tr><td>15</td><td>sunbird_trampoline_secret</td><td>Represents the trampoline secret</td><td></td><td></td></tr><tr><td>16</td><td>sunbird_session_store_type</td><td>Represents the storage to store portal sessions</td><td>To set the storage type</td><td>in-memory</td></tr><tr><td>17</td><td>sunbird_portal_title_name</td><td>Represents the title displayed in browser</td><td>To update title name for browser</td><td>Sunbird</td></tr><tr><td>18</td><td>sunbird_portal_cdn_url</td><td>Represents the CDN BASE URL where static assets are stored</td><td>To update the CDN based on implementation</td><td></td></tr><tr><td>19</td><td>sunbird_portal_default_language</td><td>To set the default language of the portal</td><td>Set the display language of the portal</td><td>en</td></tr><tr><td>20</td><td>sunbird_dataservice_url</td><td>Represents the data service URL</td><td>The URL to access the data services</td><td>https://staging.open-sunbird.org/api/</td></tr><tr><td>21</td><td>sunbird_keycloak_public</td><td>Represents the keycloak</td><td></td><td>true</td></tr><tr><td>22</td><td>sunbird_keycloak_realm</td><td>Represents the Keycloak realm</td><td></td><td>sunbird</td></tr><tr><td>23</td><td>sunbird_content_channel_filter_type</td><td>Represents the filter type to show content based on the applied filter. By default it is set to ‘all’ which displays all content. If set to ‘self’, it shows the current channel content</td><td></td><td>all</td></tr><tr><td>24</td><td>sunbird_android_app_url</td><td>Represents the android app URL in play store</td><td>Used to set the android app URL</td><td>http://www.sunbird.org</td></tr><tr><td>25</td><td>sunbird_enable_signup</td><td>Enables and disables signup functionality</td><td>To enable and disable sign-in functionality</td><td>true</td></tr><tr><td>26</td><td>sunbird_api_response_cache_ttl</td><td>Represents the Time-to-Live (TTL) for the API response cache in seconds</td><td>To set cache for API responses in seconds</td><td>600</td></tr><tr><td>27</td><td>sunbird_tenant_cdn_url</td><td>Represents the URL of the CDN, the tenant specific files are stored here</td><td>To render the static tenant pages from the CDN</td><td></td></tr><tr><td>28</td><td>sunbird_cloud_storage_urls</td><td>URLs are stored and get the assets passed to editors from portal as config</td><td>To change the assets and data storage by setting this env</td><td></td></tr><tr><td>29</td><td>sunbird_portal_user_upload_ref_link</td><td>URL of the user upload instruction document</td><td>To get the instruction about user upload</td><td>http://www.sunbird.org/features-documentation/register_user</td></tr><tr><td>30</td><td>config_service_enabled</td><td>To enable/disable the fetching of configuration details from config service</td><td>To enable/disable the fetching of configuration details</td><td>false</td></tr><tr><td>31</td><td>config_refresh_interval</td><td>Represents the interval in minutes to refresh the fetching of configurations</td><td>To set the interval of time within which configurations are refreshed</td><td>1440</td></tr><tr><td>32</td><td>sunbird_cassandra_urls</td><td>Represents the URLs of Cassandra instance</td><td>Used to connect to the Cassandra db</td><td>127.0.0.1:9042</td></tr><tr><td>33</td><td>sunbird_cassandra_consistency_level</td><td>Represents the minimum number of Cassandra nodes that must acknowledge a read or write operation before the operation can be considered successful</td><td>Used to mantain the data consistency of multi node Cassandra</td><td>one</td></tr><tr><td>34</td><td>sunbird_cassandra_replication_strategy</td><td>Represents data replication of Cassandra</td><td>To replicate the Cassandra data set</td><td>’{“class”:”SimpleStrategy”,”replication_factor”:1}’</td></tr><tr><td>35</td><td>device_register_api</td><td>Device registry Api</td><td>To register/capture IP address/geo-location/device information</td><td>https://api.open-sunbird.org/v3/device/register/</td></tr><tr><td>36</td><td>sunbird_azure_account_name</td><td>Azure account name</td><td>To login to Azure account</td><td></td></tr><tr><td>37</td><td>sunbird_azure_account_key</td><td>Azure account key</td><td>To login to Azure account</td><td></td></tr><tr><td>38</td><td>sunbird_azure_report_container_name</td><td>Container for storing reports</td><td>To store organization reports</td><td>reports</td></tr><tr><td>39</td><td>sunbird_response_cache_ttl</td><td>API response cache time</td><td>API response is cached with configured time in browser</td><td>180</td></tr><tr><td>40</td><td>sunbird_health_check_enable</td><td>To enable/disable health check API</td><td>If dependent service is down, api call will not be proxy-ed if value is set to true</td><td>true</td></tr><tr><td>41</td><td>sunbird_cassandra_consistency_level</td><td>Cassandra consistency level</td><td>Used in cassandra configuration</td><td>one</td></tr><tr><td>42</td><td>sunbird_processing_kafka_host</td><td>Processing Kafka host URL</td><td>To send Kafka messages to process Kafka host URL</td><td></td></tr><tr><td>43</td><td>sunbird_sso_ kafka_topic</td><td>Kafka topic for SSO</td><td>To send Kafka messages in SSO flow</td><td></td></tr><tr><td>44</td><td>sunbird_portal_preview_cdn_url</td><td>Content player CDN preview URL</td><td>To load the content player from CDN</td><td></td></tr></tbody></table>

\\


# Sunbird Mobile

### Introduction <a href="#introduction" id="introduction"></a>

The Sunbird Mobile app provides mobility to its feature-rich learning platform. It provides learners with the flexibility to learn anywhere, anytime.

### Prerequisites <a href="#prerequisites" id="prerequisites"></a>

1. To set up the Sunbird Mobile app, ensure you have installed the following:
   * NPM version: 6+
   * Node JS version: 8+
   * Cordova version: 8+
   * Ionic version: 4.11.2
2. Generate the key and secret for the mobile app user using the JWT token of the mobile admin user. Run the **OnboardConsumers** Jenkins Job and take the JWT token (**JWT token for mobile\_admin**) from Jenkins output.

**Generating Secret:** Execute the listed API to generate the key and secret for the mobile app:

curl -X POST \ \<your-sunbird-base-url>/api/api-manager/v1/consumer/mobile\_app/credential/register \ -H ‘authorization: Bearer \<mobile\_admin\_jwt\_token\_from\_jenkins\_job\_output>’ \ -H ‘content-type: application/json’ \ -d ‘{ “request”: { “key”: “\<implementation-name>-mobile-app- \<version-number>” } }’

**Response body:**

`{“result”:{“key”:”<implementation-name>-mobile-app-<version-number>”,”secret”:”<secret>”}}`

Use the key and secret from the response given for MOBILE\_APP\_KEY and MOBILE\_APP\_SECRET configuration in respective environments in the gradle.properties file. Example:

**`dev_mobile_app_key = “<implementation-name>-mobile-app-<version-number>” dev_mobile_app_secret = “<secret>“`**

**Producer Key**

Replace the producer id `PRODUCER_ID` for respective environments in sunbird.properties.

**Fabric credentials:**

Replace `release_fabric_api_key` in `sunbird.properties` with your fabric API Key. Create an account in [fabric.io](https://get.fabric.io/) and register in the app to get the API key.

### Set up mobile app workspace from Git Repository <a href="#set-up-mobile-app-workspace-from-git-repository" id="set-up-mobile-app-workspace-from-git-repository"></a>

Sunbird mobile app can be built from the main source code, which is available at [SunbirdEd-mobile-app](https://github.com/Sunbird-Ed/SunbirdEd-mobile-app).

* Clone the [SunbirdEd-mobile-app](https://github.com/Sunbird-Ed/SunbirdEd-mobile-app) repo
* [Customising App Configuration](http://docs.sunbird.org/latest/#customising-app-configuration) - sample.sunbird.properties file is located inside the SunbirdEd-mobile-app > buildConfig folder. The file must be renamed to sunbird.properties, and appropriate values should be provided.
* [Package the framework and form data](http://docs.sunbird.org/latest/#package-the-framework-and-form-data).
* go to the project folder and run **`./build.sh`**

#### Customising App Configuration <a href="#customising-app-configuration" id="customising-app-configuration"></a>

Instance admin of Sunbird adopters can configure various aspects of the Sunbird mobile app based on the requirements of the organization. The admins are able to configure various aspects, such as:

* App name
* App logo
* Login/Guest page to new users
* Sign in footer card on the app
* Onboarding cards
* Categories in the profile page

<table><thead><tr><th width="150">S NO.</th><th>VARIABLE NAME</th><th>DESCRIPTION</th><th>PURPOSE</th><th>DEFAULT VALUE</th></tr></thead><tbody><tr><td>1</td><td>dev_app_id/staging_app_id/production_app_id</td><td>The app ID in the <strong>SunbirdEd-mobile-app/buildConfig/sunbird.properties</strong> file with the implementation-specific application ID</td><td>To change the app ID</td><td>appId: “org.sunbird.app”</td></tr><tr><td>2</td><td>app name</td><td>Navigate to the <strong>SunbirdEd-mobile-app/config.xml</strong> file and enter the required app name</td><td>To change the app name</td><td></td></tr><tr><td>3</td><td>app logo</td><td>Navigate to <strong>SunbirdEd-mobile-app/resources/android/icon</strong></td><td>Replace the <strong>ic_launcher.png</strong> image with your desired logo in all the mipmap and drawable folders. The logo name should be <strong>drawable-ldpi-icon.png</strong></td><td>To change the app logo</td></tr><tr><td>4</td><td>splash image</td><td>Navigate to <strong>SunbirdEd-mobile-app/resources/android/splash</strong></td><td>Replace the <strong>drawable-ldpi-icon.png, drawable-hdpi-icon.png, drawable-xhdpi-icon.png</strong> image with your desired image.</td><td>To change the splash image</td></tr><tr><td>5</td><td>app</td><td>Set the configuration variable in the <strong>SunbirdEd-mobile-app repo</strong> file in the <strong>buildConfig</strong> folder</td><td></td><td></td></tr><tr><td>6</td><td>app version code</td><td>Version code for the app release</td><td>To customize the end points in the app</td><td>Replace redirect base url REDIRECT_BASE_URL and all other base urls with your respective domain name in sunbird.properties</td></tr><tr><td>7</td><td>deep link schema</td><td>This plugin handles deeplinks on iOS and Android for both custom URL scheme links and Universal App Links. Deep link schema can be changed from sunbird.properties</td><td>Change the “dev_deeplink_base_url = dev.open-sunbird.org” to the required name</td><td></td></tr><tr><td>8</td><td>display_onboarding_page</td><td>set the configuration variable inside the <strong>SunbirdEd-mobile-app repo</strong> inside <strong>buildConfig</strong> folder</td><td>to display the onboarding page</td><td>false</td></tr><tr><td>9</td><td>display_signin_footer_card_in_course_tab_for_teacher</td><td>set the <strong>display_signin_footer_card_in_course_tab_for_teacher</strong>variable as <strong>true</strong> in sunbird.properties file</td><td>to show the sign-in footer in the course tab for teachers</td><td>false</td></tr><tr><td>10</td><td>display_signin_footer_card_in_library_tab_for_teacher</td><td>Set the <strong>display_signin_footer_card_in_library_tab_for_teacher</strong> variable <strong>true</strong> in sunbird.properties file</td><td>to show the sign-in footer in the library tab for teachers</td><td>false</td></tr><tr><td>11</td><td>display_signin_footer_card_in_profile_tab_for_teacher</td><td>Set the <strong>display_signin_footer_card_in_profile_tab_for_teacher</strong>as <strong>true</strong> in sunbird.properties file</td><td>to show the sign-in footer in the profile tab for teachers</td><td>false</td></tr><tr><td>12</td><td>display_signin_footer_card_in_profile_tab_for_student</td><td>Set the <strong>display_signin_footer_card_in_profile_tab_for_student</strong>as <strong>true</strong> in sunbird.properties file</td><td>to show the sign-in footer in the profile tab for students</td><td>false</td></tr><tr><td>13</td><td>display_signin_footer_card_in_library_tab_for_student</td><td>Set the <strong>display_signin_footer_card_in_library_tab_for_student</strong>as <strong>true</strong> in sunbird.properties file</td><td>to show the sign-in footer in the profile tab for students</td><td>false</td></tr><tr><td>14</td><td>display_onboarding_card</td><td>set the display__onboarding_cards as true in sunbird.properties file</td><td>to display the guest/login page</td><td>false</td></tr><tr><td>15</td><td>display_framework_categories_in_profile</td><td>set the display_framework_categories_in_profile variable as true in sunbird.properties file</td><td>to display categories in the guest/login page</td><td>false</td></tr><tr><td>16</td><td>track_user_telemetry</td><td>Variable used to track user telemetry.</td><td>Used to track telemetry that is missing at the device level so as to generate greater usage context within the instance. Set the variable as <em>true</em> in the <strong>sunbird.properties</strong> file to enable tracking.</td><td>false</td></tr><tr><td>17</td><td>content_streaming_enabled</td><td>Variable used to enable content streaming</td><td>Used to enable content streaming. Set the variable as <em>true</em> in the <strong>sunbird.properties</strong> file to enable content streaming</td><td>false</td></tr><tr><td>18</td><td>open_rapdiscovery_enabled</td><td>Variable used to enable OPENRAP discovery</td><td>Used to enable OPENRAP discovery. Set the variable as <em>true</em> in the <strong>sunbird.properties</strong> file to enable OPENRAP discovery</td><td>false</td></tr><tr><td>19</td><td>display_onboarding_category_page</td><td>Variable used to enable onboarding category selection page</td><td>Used to onboarding category selection page in the onboarding process. Set the variable as <em>true</em> in the <strong>sunbird.properties</strong> file to enable onboarding category selection page.</td><td>false</td></tr><tr><td>20</td><td>display_onboarding_scan_page</td><td>Variable used to enable onboarding scan page.</td><td>Used to enable onboarding scan page in the onboarding process. Set the variable as <em>true</em> in the <strong>sunbird.properties</strong> file to onboarding scan page</td><td>false</td></tr><tr><td>21</td><td>support_email</td><td>Variable used to set</td><td>Used to set the support email id. Set the variable as <em>&#x3C;valid_email_id></em> in the <strong>sunbird.properties</strong> file to set support email id</td><td>&#x3C;valid_email_id></td></tr><tr><td>22</td><td>dev_custom_scheme/staging_custom_scheme/production_custom_scheme</td><td>Scheme used to redrirect chrome custom tab back to mobile app</td><td></td><td>“org.sunbird.app”</td></tr></tbody></table>

#### Packaging Framework and Form Data <a href="#packaging-framework-and-form-data" id="packaging-framework-and-form-data"></a>

Sunbird mobile app supports configuration of the app framework to enable offline usage of the app. To configure the app framework, adopter needs to package the channel for the respective framework. Details of the file naming convention and folder location are given below:

<table><thead><tr><th width="150">S NO.</th><th>FOLDER</th><th>FILE NAME</th><th>PURPOSE</th></tr></thead><tbody><tr><td>1</td><td>buildConfig/data/framework</td><td>framework-&#x3C;FRAMEWORK_IDENTIFIER&#x3C;.json</td><td>To package the channel for the respective framework. Same framework must be listed in the channel’s suggestedFramework list</td></tr><tr><td>2</td><td>buildConfig/data/channel</td><td>channel-&#x3C;CHANNEL_IDENTIFIER>.json</td><td>To package the channel. To support offline usage custodianOrgId channel must be included in the bundle</td></tr><tr><td>3</td><td>buildConfig/data/form</td><td>pageassemble_course_filter.json</td><td>Page assemble filter for course</td></tr><tr><td>4</td><td>buildConfig/data/form</td><td>pageassemble_library_filter.json</td><td>Page assemble filter for library</td></tr><tr><td>5</td><td>buildConfig/data/system</td><td>&#x3C;system-setting-custodianOrgId>.json</td><td>custodianOrgId channelid for the mobile app</td></tr><tr><td>6</td><td>buildConfig/data/system</td><td>system-setting-courseFrameworkId.json</td><td>courseFrameworkId for the TPD workflow</td></tr><tr><td>7</td><td>buildConfig/data/notificationconfig</td><td>local_notofocation_config.json</td><td>Configuration for local Notification setup in mobile</td></tr></tbody></table>

#### Installing the Mobile Application <a href="#installing-the-mobile-application" id="installing-the-mobile-application"></a>

To install the Sunbird Mobile app, follow the steps below:

1. Create a workspace (Folder Hierarchy) and clone the Git repositories into this folder
2. Execute the instructions mentioned for each cloned repository
3. Open terminal and change the directory to “SunbirdEd-mobile-app”
4. Add one device to the system
5. Run the command - **`$ ionic cordova run android`**

#### Generate Multiple Sunbird Apps <a href="#generate-multiple-sunbird-apps" id="generate-multiple-sunbird-apps"></a>

Sunbird instance owners should be able to generate multiple apps for multiple environments (dev/qa/production) so that user can use all the apps simultaneously. For each app, user should be able to have different content stores (on the local device), fire telemetry from separate app identifiers and upload to the play store (if need be).

#### **Configuration**

Instance admin of Sunbird adopters can configure the appId in the following way to acheive the functionality

* dev\_app\_id = org.sample.app.dev
* staging\_app\_id = org.sample.app.staging
* production\_app\_id = org.sample.app


# Portal


# Component Diagram

The Sunbird portal is the browser-based interface for the Sunbird application stack. It provides a web app through which all functionality of Sunbird can be accessed.

## GitHub Repository

{% embed url="<https://github.com/Sunbird-Ed/SunbirdEd-portal>" %}
git
{% endembed %}

## Architecture

<figure><img src="/files/oS7THRZUgMhdkmDHKxZv" alt=""><figcaption><p>Sunbird ED Portal Architecture</p></figcaption></figure>

## Sunbird ED Portal

The Sunbird ED portal is divided into two folders

**App:** Contains the back-end code base, which uses the Node.js framework for server-side.

**Client**: Contains the front-end code base which uses Angular framework for client-side.

<div><img src="/files/tmlOjZH6cwXL7AiqEhHv" alt="" width="375"> <img src="/files/kO5Hdlct5AfnAnmwrIPA" alt="" width="375"></div>

## **Sunbird Portal UI**

<div><img src="/files/jdR9xPQBRRLHezfUkfkl" alt="" width="375"> <img src="/files/sg7P7ndNqma2UPMY1sHV" alt="" width="375"></div>

[**Client Folder**](https://github.com/Sunbird-Ed/SunbirdEd-portal/tree/release-7.0.0/src/app/client) includes the client source code for the Angular application. This folder includes various components, modules, services, styles, and other assets necessary to build the front end of the application.

<figure><img src="/files/y49Fzflo1sdZ97smymSG" alt=""><figcaption><p>Sunbird Portal UI Architecture</p></figcaption></figure>

### **Key modules used in the Sunbird Portal**&#x20;

The objective of the following modules or folders is to provide all the features in one place, which can be leveraged further if needed.

#### [Public](https://sunbird-ed.github.io/docs/portal/modules/PublicModule.html)

**Objective**: To provide all the public routes (i.e. consumers).

This folder contains routing for the modules that can be accessed by everyone and does not have any auth required, such as guest user/anonymous user.

#### [Core](https://sunbird-ed.github.io/docs/portal/modules/CoreModule.html)

**Objective**: To provide a static screen component that is present in every route.

The folder contains those components that are statically positioned, though data will be dynamic; we can integrate the core components at the app level so that they are present in every route and also provide the routes to different modules such as the header, footer, search, main menu, and language dropdown.

#### [Shared](https://sunbird-ed.github.io/docs/portal/modules/SharedModule.html)

**Objective:** To provide all reusable features.

The folder contains all the reusable components across the portal, such as the loader, popup, card, sb-data table, alert popup, slick, etc.

#### [Manage Learn](/misc/misc-pages/portal-manage-learn-component-diagram)

Manage Learn contains tools or solutions like Observation, Projects, and Surveys. These tools are used to help the learners to learn in a structured manner.

### Additional Info:

#### Forms

In the portal, lots of UI capabilities are generalised in terms of [formConfig](https://documenter.getpostman.com/view/25186239/2s946pXoZ2) to reduce the code dependency by decoupling form logic from the portal code.

## Front-End Libraries

<figure><img src="/files/MB1NMFbV9WUcFdVZGZis" alt=""><figcaption><p>Frontend libraries</p></figcaption></figure>

The purpose of all the libraries is to make the UI more consistent across all the clients who are using this library.

| Library Name       | GitHub Repo                                                               | Description                                                                                                                                                                                                       |
| ------------------ | ------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Common-Consumption | <https://github.com/Sunbird-Ed/SunbirdEd-consumption-ngcomponents#readme> | These components are designed to be used in Sunbird consumption platforms *( web portal, offline desktop app)* to drive reusability, maintainability hence reduce the redundant development effort significantly. |
| SB-Forms           | <https://github.com/Sunbird-Ed/SunbirdEd-forms>                           | This Library expects a configuration and renders form according to the view.                                                                                                                                      |
| SB-Dashlet         | <https://github.com/Sunbird-Ed/sb-dashlets>                               | Library used for Reusable charts. Supported by charts has an extensible, general purpose analytical presentation capabilities like graphs, tables, charts etc..                                                   |
| Client-Services    | <https://github.com/Sunbird-Ed/sunbird-client-services>                   | Library used to create API calls with Sunbird Environment. Includes necessary typescript code to do search, content read, corresponding data models of the platform are available.                                |
| Quml Player        | <https://github.com/Sunbird-inQuiry/player/tree/release-6.0.0>            | The library which is responsible for rendering questions and question sets created according to the QuML specification.                                                                                           |
| Collection-Editors | <https://github.com/Sunbird-Knowlg/sunbird-collection-editor>             | Library which supports to create all type of collections like Book, Course, PlayList & QuestionSet                                                                                                                |
| Video Player       | <https://github.com/Sunbird-Knowlg/sunbird-video-player>                  | The Video player library is used to play video/audio content in Sunbird ED                                                                                                                                        |
| PDF Player         | <https://github.com/Sunbird-Knowlg/sunbird-pdf-player>                    | The PDF player library is used to play pdf content on Sunbird ED                                                                                                                                                  |
| Epub Player        | <https://github.com/Sunbird-Knowlg/sunbird-epub-player>                   | The Epub player library is used to play epub content on Sunbird ED                                                                                                                                                |

## Sunbird Portal API Servcies

<div><img src="/files/bRUrjzLi0F83Ze2zOLgE" alt="" width="375"> <img src="/files/YCkR4dkDI2tFupsdCN8F" alt="" width="375"></div>

[**App Folder**](https://github.com/Sunbird-Ed/SunbirdEd-portal/tree/release-7.0.0/src/app) (without client) includes back-end API interface which is used Node.js framework.

It leverages a keyCloakHelper file to handle login and logout functionalities while adopting token-based session storage to manage user sessions effectively.

Additionally, the interface integrates multiple API middleware functions to accomplish tasks such as token verification, API whitelisting, and customizing request headers as needed.

<figure><img src="/files/VDmgWWVdPp7wKwSacH2h" alt=""><figcaption><p>API Layer Architecture</p></figcaption></figure>

### Code Structure

### [User Session Management - **Server.js**](https://github.com/Sunbird-Ed/SunbirdEd-portal/blob/release-7.0.0/src/app/server.js)

It is used in web development for the server-side entry point of a Node.js application.

It acts as the main starting point of the server, responsible for initializing the server, defining routes, and handling incoming requests from clients.

It is used to store the session based on [Anonymous](https://project-sunbird.atlassian.net/wiki/spaces/SP/pages/3324477457/Portal+-+Login+Work+flow+post+success+with+keycloak+-+Anonymous) &[ Logged in User](https://project-sunbird.atlassian.net/wiki/spaces/SP/pages/3324182538/Portal+-+Login+Work+flow+post+success+with+keycloak+-+Logged+In+User).

### [**Routes**](https://github.com/Sunbird-Ed/SunbirdEd-portal/tree/release-7.0.0/src/app/routes)

It handles all the API routes, which are triggering from the client side, such as content/\*, content/copy/questionset, etc.

### [API Whitelisting: **Helpers Folder**](https://github.com/Sunbird-Ed/SunbirdEd-portal/tree/release-7.0.0/src/app/helpers)

Contains all the js files which are used for user [authentication](https://github.com/Sunbird-Ed/SunbirdEd-portal/blob/release-6.0.0/src/app/helpers/kongTokenHelper.js) and [authorization](https://github.com/Sunbird-Ed/SunbirdEd-portal/blob/release-6.0.0/src/app/helpers/keyCloakHelper.js).

Contains the [API Whitelist](https://github.com/Sunbird-Ed/SunbirdEd-portal/blob/release-6.0.0/src/app/helpers/apiWhiteList.js) js file, which Handles whitelisting and role checks of Portal API(s).

### [Role check: **Proxy Folder**](https://github.com/Sunbird-Ed/SunbirdEd-portal/tree/release-7.0.0/src/app/proxy)

It contains the set-up methods such as decoraterequestHeader, verifyToken, and isApiwhitelisted, which validates whether the API request is valid or not with proper role check and auths token.

### [**ResourceBundles**](https://github.com/Sunbird-Ed/SunbirdEd-portal/tree/release-7.0.0/src/app/resourcebundles)&#x20;

It contains the resource bundles in the application for internationalization and localization purposes. It is used for translations and provides a seamless way to display the application's user interface in different languages based on user preferences.

### [EnvVariablesHelper](https://github.com/Sunbird-Ed/SunbirdEd-portal/blob/release-6.0.0/src/app/helpers/environmentVariablesHelper.js)

It contains the [envHelperFile](https://github.com/Sunbird-Ed/SunbirdEd-portal/blob/release-6.0.0/src/app/helpers/environmentVariablesHelper.js), which is responsible for storing the env variable that is required in the portal from DevOps.

## **Dependent Sunbird BBs**

<figure><img src="/files/whhHeqNdhacKYA6rfIBG" alt=""><figcaption><p>Dependent Sunbird BBs' Architecture</p></figcaption></figure>

There are lots of front-end libraries and services that we are leveraging from the other building blocks.

### **Sunbird Building Blocks, which are being used in the ED Portal**

* [Lern](https://lern.sunbird.org/)
* [Obsrv](https://obsrv.sunbird.org/)
* [InQuiry](https://inquiry.sunbird.org/learn/readme)
* [Knowlg](https://knowlg.sunbird.org/learn/readme)
* [ED](https://ed.sunbird.org/learn/readme)


# I18N (Resource Bundles)

Resource bundles provide support to different languages based on the user’s preference.

* Resource bundles takes the json data specified in {language\_code}.json . [Refer this to know about language codes](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) .
* Defines two resource types:

&#x20;       1\.    Consumption: Related to content consumed by users.

&#x20;       2\.   Creation: Related to tools for creating content.

To Change the Language Preference:

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXdx3zzON4lggvxvNe9uw1-AmnwSCdsKmjcpobQyz-BcZv7SXhk5AO3RAZtGCRs_Nvts5aQWlCSV6SizilXElYlq5Cw9eVEtDmD6CV2GzhUar48NVNdb5e4pqP1Ffg2bbCVxbhNC?key=4wDksYJljHUrao5XV3FDqdYo)

Select one from the dropdown, default is English.

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXdmHyXcWUi74nQ-HzTDkmRu4ZGlEo7FhiHw1B-FcTC4NqEFwVv2GeaiSjvz4dS0oRWxxkbPPwo0Fz8d0ASn9MlZmOLjNTN8GTclvoWh7_QbvncSiPslLHoKkRj_roUMD0K35WT-?key=4wDksYJljHUrao5XV3FDqdYo)

## To modify existing resource bundle in portal:

* [src->app->resourcebundles->json](https://github.com/Sunbird-Ed/SunbirdEd-portal/tree/release-7.0.1/src/app/resourcebundles/json) has the .json  files that contains the resource bundles array.
* For example [en.json](https://github.com/Sunbird-Ed/SunbirdEd-portal/blob/release-7.0.1/src/app/resourcebundles/json/en.json) has,

&#x20;      `frmelmnts->btn-> "addnuserrole"="Add new role"`

&#x20;       If you want to modify the add new user role button just update the

&#x20;       Add new role  like,

&#x20;      `frmelmnts->btn-> "addnuserrole"="new Add new role"`<br>

## To add new resource bundle in portal:&#x20;

* [src->app->resourcebundles->json](https://github.com/Sunbird-Ed/SunbirdEd-portal/tree/release-7.0.1/src/app/resourcebundles/json)  This folder contains .json files that hold the resource bundle arrays. To add a new resource bundle, create a file named {language\_code}.json.
* Copy and paste the content of [en.json](https://github.com/Sunbird-Ed/SunbirdEd-portal/blob/release-7.0.1/src/app/resourcebundles/json/en.json) into your new file and modify the value. It will display the default(english) value if any of the values are missing.
* A proper format should be followed for example,&#x20;

&#x20;     `frmelmnts->btn-> "addnuserrole"= "Add new role"`


# Branding Name and Logo Configuration Guide

This document explains how users can configure the branding name and logo for their Sunbird application using the sunbird\_tenant\_cdn\_url .

The configuration allows customization of various branding assets such as logos, app logos, favicons, and posters.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcy6RDfJ4MuU2k3VNPAWa1gdZ-y-Ij9dCef5mivTxff_jIjvXdvVYcdAdnItYysYRenixORi9rhA2Hnb6SJ-BaHxLrv3cMr1wSp-yaTrDAXxO5bN60eoO6i97ymUEk9nDkOHRL3tQ?key=6ZxLi1rtEkXdLe4tCZWjbGAg" alt=""><figcaption><p>i. Brand Logo</p></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdv0bg4SfYkzp2p1OzbYbhnINnuHxELd7nrXjHKEu-SDx4m7bp2Hyik6nwqCgrFIZa69djeVf2HRTW_Btl6-AeK2-PXuvo21SAELsFSZ8S9WCGfb3wQaEX_5wq9oAz8a__XNIq3MA?key=6ZxLi1rtEkXdLe4tCZWjbGAg" alt=""><figcaption><p>ii) Brand favicon</p></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdGL1m8wuy0qCfvmUUNTexAx9KYOK6sLz-TNkr4HE9yLmE_rlhJ6RKSnT4V5owFd1jL_sNeR-ahtRKcKN0aPsoUmzNDPWOgQgLmEVct4GXWfTX5B6rILDwneQ6XF0-yErHKUxqn?key=6ZxLi1rtEkXdLe4tCZWjbGAg" alt=""><figcaption><p>iii) Poster</p></figcaption></figure>

***

### Configuration overview

The branding assets are served through a Content Delivery Network (CDN) and follow a specific URL structure. The assets must be stored under a tenant directory with predefined image names. If no custom branding is provided, default branding assets for Sunbird will be used.

The CDN URL must follow the structure: `sunbird_tenant_cdn_url/tenant_id/image_name`

Example:[`http://sunbirded/NCF/logo.png`](http://sunbirded/NCF/logo.png)

Here:

* *sunbird\_tenant\_cdn\_url*: The base URL of the CDN (e.g., \`<http://sunbirded\\`>).
* *tenant\_id*: The tenant identifier (e.g., \`NCF\`). Configured as sunbird\_default\_channel
* *image\_name*: The predefined name of the branding asset (e.g., \`logo.png\`).

***

### Predefined Image Names

To properly configure branding, the following image names must be used:

| **Asset** | **Image Name** | **Description**                                            |
| --------- | -------------- | ---------------------------------------------------------- |
| Logo      | logo.png       | The primary logo displayed on the application.             |
| App Logo  | appLogo.png    | The logo specifically used for the mobile app              |
| Favicon   | favicon.ico    | The small icon displayed in the browser tab or address bar |
| Poster    | poster.png     | A poster image for informational displays \[Optional]      |

### Default Branding

If no custom branding is provided, the application will fall back to the default Sunbird branding. The default branding assets include:

* Logo: A generic Sunbird logo.
* App Logo: Same as the default Sunbird logo for mobile application.
* Favicon: A Sunbird-themed favicon.
* Poster: A default poster image for Sunbird.

***

### Steps to Configure Branding

1. **Prepare the Branding Assets:**
   1. Ensure that the images are in the correct formats:
      1. logo.png and appLogo.png: PNG format.
      2. favicon.ico: ICO format.
      3. poster.png: PNG format.
   2. Use the exact file names as specified above.
2. **Upload Assets to the CDN:**
   1. Place the assets in the appropriate tenant directory under the CDN.
   2. For example:
      1. <http://sunbirded/NCF/logo.png>
      2. [http://sunbirded/NCF/appLogo.png](http://sunbirded/NCF/logo.png)
      3. [http://sunbirded/NCF/favicon.ico](http://sunbirded/NCF/logo.png)
      4. [http://sunbirded/NCF/poster.png](http://sunbirded/NCF/logo.png)
3. **Update the Configuration:**
   1. Set the `sunbird_tenant_cdn_url` to the base URL of the CDN in the environment configuration.
   2. Example:
      1. `sunbird_tenant_cdn_url=http://sunbirded`
      2. `sunbird_default_channel=NCF`
4. **Verify the Branding:**
   1. Access the application and ensure that the branding assets are correctly displayed.
   2. If any asset is missing or not configured, the default branding will be used.

***

### Troubleshooting

1. **Missing or Incorrect Branding:**
   1. Verify the URL structure and ensure the assets are correctly named and placed in the tenant directory.
   2. Check the `sunbird_tenant_cdn_url` and `sunbird_default_channel` configurations.
2. **Fallback to Default Branding:**
   1. If the custom asset is not found, the application will use the default Sunbird branding.
   2. Ensure that the asset exists in the CDN with the correct file name.

&#x20;

<br>


# Desktop


# Component Diagram

The Sunbird Desktop is the offline-based interface that provides to access & distribution of digital content in areas where Internet connectivity is challenging.

#### Video on Desktop App

{% embed url="<https://youtu.be/H8afe1-cF_c?si=MvSjRbyVzu0vq4Y5>" %}

## GitHub Repository

{% embed url="<https://github.com/Sunbird-Ed/SunbirdEd-portal/tree/master/src/desktop>" %}
github repo
{% endembed %}

## Architecture

<figure><img src="/files/dMSzkEG86bVYZv7StxaT" alt=""><figcaption><p>Desktop Architecture</p></figcaption></figure>

Sunbird desktop runs on a platform called [electron](https://www.electronjs.org/).

## Sunbird Desktop

<img src="/files/h3qtY70E3xNv6x06hB6T" alt="" width="375">

### Sunbird Desktop UI

<img src="/files/qIfQdXzs6WMWxGd3YQOK" alt="" width="375">

The Portal folder is responsible for rendering the UI on the desktop.

### Sunbird Desktop API Server

<img src="/files/aUPvNIrGqx6wdGtkKfW0" alt="" width="375">

The Modules folder contains the API server proxy to communicate with the upstream server.

### Code Structure

Important folders

These are the important folders that are used in Sunbird Desktop:

* [helpers](https://github.com/Sunbird-Ed/SunbirdEd-portal/tree/master/src/desktop/helper)
* [gulpfile.js](https://github.com/Sunbird-Ed/SunbirdEd-portal/blob/master/src/desktop/gulpfile.js)
* [main.ts](https://github.com/Sunbird-Ed/SunbirdEd-portal/blob/master/src/desktop/main.ts)
* [modules](https://github.com/Sunbird-Ed/SunbirdEd-portal/tree/master/src/desktop/modules)
* [OpenRAP](https://github.com/Sunbird-Ed/SunbirdEd-portal/tree/master/src/desktop/OpenRAP)
* [Public](https://github.com/Sunbird-Ed/SunbirdEd-portal/tree/master/src/desktop/public)
* [env.json](https://github.com/Sunbird-Ed/SunbirdEd-portal/blob/release-6.0.0/src/desktop/env.json)
* [openrap-sunbirded-plugin](#openrap-sunbirded-plugin)

### [helpers](https://github.com/Sunbird-Ed/SunbirdEd-portal/tree/master/src/desktop/helper)

This folder is used to provide the Authentication/Authorization session of the logged-in user.

### [gulpfile.js](https://github.com/Sunbird-Ed/SunbirdEd-portal/blob/master/src/desktop/gulpfile.js)

In the portal desktop Gulp is a task runner that uses Node.js as a platform. Gulp purely uses JavaScript code and helps to run front-end tasks and large-scale web applications. It builds system automated tasks like CSS and HTML minification, concatenating library files, and compiling the SASS files.

### [main.ts](https://github.com/Sunbird-Ed/SunbirdEd-portal/blob/master/src/desktop/main.ts)

The main.ts file is the entry point of a portal desktop where all the script executions are initiated.

### [modules](https://github.com/Sunbird-Ed/SunbirdEd-portal/tree/master/src/desktop/modules)

This folder contains API server proxy to communicate with the upstream server, such as routes, sdk db schema, logger, proxy-util, and telemetry helper.

### [OpenRAP](https://github.com/Sunbird-Ed/SunbirdEd-portal/tree/master/src/desktop/OpenRAP)

OpenRAP is more like a repo, where we have a content database, which is meant for desktop. It's a standalone app that runs mainly offline first. In offline, first, certain items such as content items and telemetry user data have to be stored & when the user log-in it's not online, but it will give the data from the [pouchdb](#pouchdb).

OpenRAP is an open-source initiative to enable communities/stakeholders to easily build and deploy WiFi-enabled resource access points within their community.

### [pouchdb](https://pouchdb.com/)

It enables applications to store data locally while offline, then synchronize it with PouchDB and compatible servers when the application is back online, keeping the user's data in sync no matter where they next log in.

### [Public](https://github.com/Sunbird-Ed/SunbirdEd-portal/tree/master/src/desktop/public)

The folder includes the code to initiate the player and the portal UI in the desktop app.

### [env.json](https://github.com/Sunbird-Ed/SunbirdEd-portal/blob/release-6.0.0/src/desktop/env.json)

It contains the [env.json](https://github.com/Sunbird-Ed/SunbirdEd-portal/blob/release-6.0.0/src/desktop/env.json) file, which is responsible for storing the env variable such as token, baseurl, and id that is required in the Desktop from DevOps.

### openrap-sunbirded-plugin

It contains the below folders:

**content**: sample content to be used for offline desktop

**Data**: It contains some sample channels used as a default, sample form JSON, faq, framework & location.

**ecars**: It stands for ekstep content archive. It stores and loads the ecars if required on desktop.

### Resources:

* [Portal Desktop Application - Local Setup](https://project-sunbird.atlassian.net/wiki/spaces/SP/pages/3339354113/Portal+Desktop+Application+-+Local+Setup)
* [OpenRAP](https://sunbird.org/explore/articles/16-sunbird-openrap-an-offline-content-distribution-platform)
* [electron](https://www.electronjs.org/)

#### &#x20;<a href="#title-text" id="title-text"></a>


# Mobile


# Component Diagram

The Sunbird Mobile app is the app-based interface for the Sunbird application stack. It provides an app (Android/iOS) through which all functionality of Sunbird can be accessed.

## GitHub Repository

{% embed url="<https://github.com/Sunbird-Ed/SunbirdEd-mobile-app/tree/master>" %}

## Architecture

<figure><img src="/files/CVqNs3cf5x6XVsGG4vSt" alt=""><figcaption></figcaption></figure>

## [Source Code](https://github.com/Sunbird-Ed/SunbirdEd-mobile-app/tree/master)

Sunbird Mobiles app follows a basic angular / Ionic code structure. The top level of the workspace contains workspace-wide configuration files, configuration files for the application, and test files.

<figure><img src="/files/YHrgLQtJnDdixQXKrlyP" alt="" width="375"><figcaption></figcaption></figure>

\
All following primary folders are highlighted in the above screenshot.

* plugins
* [app](https://github.com/Sunbird-Ed/SunbirdEd-mobile-app/tree/master/src/app)
* [directives](https://github.com/Sunbird-Ed/SunbirdEd-mobile-app/tree/master/src/directives)
* [pipes](https://github.com/Sunbird-Ed/SunbirdEd-mobile-app/tree/master/src/pipes)
* [services](https://github.com/Sunbird-Ed/SunbirdEd-mobile-app/tree/master/src/services)

### **plugins**

**plugins** folder contains all the plugins that provide JavaScript interface to native components (Android/iOS) required by Sunbird Mobile App. They allow the app to use native device capabilities beyond what is available to pure web components.

[List of plugins used in the Sunbird Mobile app](/use/source-code/mobile/sunbird-mobile-app-plugins)

### app

This folder contains all the modules and components. It contains the Sunbird Mobile app's logic and data.

#### Modules

As Modules are a great way to organize an application and extend it with capabilities from external libraries so, in the Sunbird-mobile-app, each functionality/page is configured as a Module. Some key modules are given in the below diagram.

<figure><img src="/files/nl7QMmICQLmfGctrCLju" alt=""><figcaption></figcaption></figure>

* [home](https://sunbird-ed.github.io/docs/mobile/modules/HomePageModule.html)
* [qrcoderesult](https://sunbird-ed.github.io/docs/mobile/modules/QrcoderesultPageModule.html)
* [content-details](https://sunbird-ed.github.io/docs/mobile/modules/ContentDetailsPageModule.html)
* [enrolled-course-details](https://sunbird-ed.github.io/docs/mobile/modules/EnrolledCourseDetailsPagePageModule.html)
* [collection-detail-etb](https://sunbird-ed.github.io/docs/mobile/modules/CollectionDetailEtbPageModule.html)
* [discussion-forum](https://sunbird-ed.github.io/docs/mobile/modules/DiscussionForumModule.html)
* [my-groups](https://sunbird-ed.github.io/docs/mobile/modules/MyGroupsPageModule.html)
* [download-manager](https://sunbird-ed.github.io/docs/mobile/modules/DownloadManagerPageModule.html)
* [manage-learn](https://github.com/Sunbird-Ed/Community/blob/release-6.0.0/use-1/source-code/workflows/broken-reference/README.md)

**. . . . . . . . . . . .**

### directives

This folder contains classes that can add new behavior to the elements in the template or modify existing behavior. These classes are used to maneuver the DOM by adding/ removing new elements to the DOM and even changing the appearance of the DOM elements.

Following are a few key directives in the app

* [custom-ion-select](https://sunbird-ed.github.io/docs/mobile/directives/CustomIonSelectDirective.html)
* [read-more](https://sunbird-ed.github.io/docs/mobile/directives/HideHeaderFooterDirective.html)
* [hide-header-foote**r**](https://sunbird-ed.github.io/docs/mobile/directives/ReadMoreDirective.html)

### pipes

This folder contains classes containing simple functions to use in template expressions to accept an input value and return a transformed value.

* [category-key-translator](https://sunbird-ed.github.io/docs/mobile/pipes/CategoryKeyTranslator.html)
* [date-ago](https://sunbird-ed.github.io/docs/mobile/pipes/DateAgoPipe.html)
* [file-size](https://sunbird-ed.github.io/docs/mobile/pipes/FileSizePipe.html)
* [mime-type](https://sunbird-ed.github.io/docs/mobile/pipes/MimeTypePipe.html)
* [translate-html](https://sunbird-ed.github.io/docs/mobile/pipes/TranslateHtmlPipe.html)
* [translate-json](https://sunbird-ed.github.io/docs/mobile/pipes/TranslateJsonPipe.html)

### services

This folder contains classes with the @injectable decorator. This decorator tells angular that the class is a service and can be injected into components that need that service.

* [android-permissions](https://sunbird-ed.github.io/docs/mobile/injectables/AndroidPermissionsService.html)
* [common-form-config-builders](https://sunbird-ed.github.io/docs/mobile/injectables/FrameworkCommonFormConfigBuilder.html)
* [discussion](https://sunbird-ed.github.io/docs/mobile/injectables/DiscussionTelemetryService.html)
* [download-pdf](https://sunbird-ed.github.io/docs/mobile/injectables/DownloadPdfService.html)
* [form-location-factory](https://sunbird-ed.github.io/docs/mobile/injectables/FormAndFrameworkUtilService.html)
* [print-pdf](https://sunbird-ed.github.io/docs/mobile/injectables/PrintPdfService.html)
* [user-groups](https://sunbird-ed.github.io/docs/mobile/injectables/ProfileHandler.html)

### **sunbird-mobile-sdk**

sunbird-mobile-sdk is the heart of Sunbird-mobile-app, which contains all the business logic, starting from API access to offline data management.

<figure><img src="/files/fkbHiClVxuxxXOxgVIp4" alt=""><figcaption></figcaption></figure>

### Configurations required to set up Sunbird-mobile-app

These are the set of files required to set up Sunbird-mobile-app

* [sunbird.properties](https://ed.sunbird.org/use/source-code/mobile/pages/s5RxFIDADOX4WiigaJfO#1.-sunbird.properties)
* [google-service.json](https://ed.sunbird.org/use/source-code/mobile/pages/s5RxFIDADOX4WiigaJfO#2.-google-service.json)

### Forms required to initialize Sunbird-mobile-app

The Form Configurations are a set of pre-defined forms that enable users to modify the UI easily without changing anything in the source code. Also, it allows users to quickly update any type of app attribute even if the app is already available in the Play Store/app store without any app update.

[List of forms available in Sunbird-Mobile-app](/misc/misc-pages/mobile-form-configurations)


# sunbird-mobile-sdk

sunbird-mobile-sdk is the heart of Sunbird-mobile-app which contains all the business logic starting from API access to offline data management.

{% embed url="<https://github.com/Sunbird-Ed/sunbird-mobile-sdk/tree/master>" %}

### Architecture

<figure><img src="/files/YNfflFyOxjUn4oLGpV75" alt=""><figcaption></figcaption></figure>

### Source Code

The sunbird-mobile-sdk follows a basic typescript library code structure that is modular. The following diagram shows the folder structure of the SDK.

<figure><img src="/files/T61ovzODDt1SgoBxKFTO" alt="" width="375"><figcaption></figcaption></figure>

#### plugins

This folder contains the definition file of all the plugins used in the sunbird-mobile-sdk.

<figure><img src="/files/xZQndEBG3ixm2cYQR4kB" alt="" width="375"><figcaption></figcaption></figure>

Each definition file contains the plugin methods and the models. One sample definition file is as follows:

````typescript
```
interface HttpResponse {
    status: number;
    headers: any;
    url: string;
    data?: any;
    error?: string;
}

interface Cordova {
    plugin: {
        http: {
            setDataSerializer: (string) => void;
            setHeader: (host: string, header: string, value: string) => void;
            get: (url: string, parameters: any, headers: { [key: string]: string },
                  successCallback: (response: HttpResponse) => void,
                  errorCallback: (response: HttpResponse) => void) => void;
            patch: (url: string, data: any, headers: { [key: string]: string },
                    successCallback: (response: HttpResponse) => void,
                    errorCallback: (response: HttpResponse) => void) => void;
            post: (url: string, data: any, headers: { [key: string]: string },
                   successCallback: (response: HttpResponse) => void,
                   errorCallback: (response: HttpResponse) => void) => void;
        }
    };
}

```
````

#### src

This folder contains all the modules of sunbird-mobile-sdk. Each module folder contains five sub-folders (config, def, errors, handlers, impl) and one index file.

<figure><img src="/files/DWkANTjZU1uIG2i69mQS" alt=""><figcaption></figcaption></figure>

* **config** - This folder contains an interface that contains information about the server endpoints used by this module. One sample interface is as follows:

````typescript
```
export interface CourseServiceConfig {
    apiPath: string;
}
```
````

* **def** - This folder contains an interface that contains the methods exposed by this module, along with all the model classes used by the module. One sample interface is as follows:

````typescript
```
export interface CourseService {
    
    getBatchDetails(request: CourseBatchDetailsRequest): Observable<Batch>;

    updateContentState(request: UpdateContentStateRequest): Observable<boolean>;

    getCourseBatches(request: CourseBatchesRequest): Observable<Batch[]>;

    getUserEnrolledCourses(request: GetUserEnrolledCoursesRequest): Observable<Course[]>;

    enrollCourse(request: EnrollCourseRequest): Observable<boolean>;

    unenrollCourse(unenrollCourseRequest: UnenrollCourseRequest): Observable<boolean>;

    .......................
}
```
````

* **errors -** This folder contains all the error model classes used by the module.
* **handlers -** This folder contains utility classes used across the module.
* **impl -** This folder contains the class that implements the definition interface, and it is the actual implementation of the methods exposed by this module. One sample class is as follows:

````typescript
```
@injectable()
export class CourseServiceImpl implements CourseService {


    constructor(
        @inject(InjectionTokens.SDK_CONFIG) private sdkConfig: SdkConfig,
        @inject(InjectionTokens.API_SERVICE) private apiService: ApiService,
       ......
    ) {
       
    }


    getBatchDetails(request: CourseBatchDetailsRequest): Observable<Batch> {
        return new GetBatchDetailsHandler(this.apiService, this.courseServiceConfig)
            .handle(request);
    }


    getCourseBatches(request: CourseBatchesRequest): Observable<Batch[]> {
        return new GetCourseBatchesHandler(this.apiService, this.courseServiceConfig).handle(request);
    }


    getUserEnrolledCourses({request, from}: GetUserEnrolledCoursesRequest): Observable<Course[]> {
        return this.cachedItemStore[from === CachedItemRequestSourceFrom.SERVER ? 'get' : 'getCached'](
            request.userId + (request.filters ? '_' + JSON.stringify(request.filters) : ''),
            CourseServiceImpl.USER_ENROLLMENT_LIST_KEY_PREFIX,
            'ttl_' + CourseServiceImpl.USER_ENROLLMENT_LIST_KEY_PREFIX,
            () => this.csCourseService.getUserEnrolledCourses(request, {}, {apiPath: '/api/course/v2', certRegistrationApiPath: ''}),
        );
    }

    enrollCourse(request: EnrollCourseRequest): Observable<boolean> {
        return new EnrollCourseHandler(this.apiService, this.courseServiceConfig)
            .handle(request)
            .pipe(
                mergeMap((isEnrolled) => {
                    if (isEnrolled) {
                        const courseContext: { [key: string]: any } = {};
                        courseContext['userId'] = request.userId;
                        courseContext['batchStatus'] = request.batchStatus;

                        return this.sharedPreferences.putString(ContentKeys.COURSE_CONTEXT, JSON.stringify(courseContext)).pipe(
                            delay(2000),
                            concatMap(() => {
                                return this.getEnrolledCourses({userId: request.userId, returnFreshCourses: true});
                            }),
                            mapTo(isEnrolled)
                        );
                    }

                    return of(isEnrolled);
                })
            );
    }

    ......

```
````

* **index.ts -** This file is the registry of all the classes used by this module.


# Sunbird-mobile-app plugins

**Cordova plugins** provide a JavaScript interface to native components (Android/ iOS) required by the Sunbird Mobile App. They allow the app to use native device capabilities beyond what is available to pure web components.

<table><thead><tr><th width="413">Plugin</th><th>Description</th></tr></thead><tbody><tr><td><a href="https://github.com/Sunbird-Ed/sb-cordova-plugin-downloadmanager.git">cordova-plugin-android-downloadmanager</a></td><td>This plugin helps to download the content ECAR so that it can be consumed in the app.</td></tr><tr><td><a href="https://github.com/Sunbird-Ed/sb-cordova-plugin-fcm.git">cordova-plugin-fcm-with-dependecy-updated</a></td><td>This plugin is used to push notifications with Google Firebase FCM.</td></tr><tr><td><a href="https://github.com/subranil/cordova-plugin-inappupdatemanager.git">cordova-plugin-inappupdatemanager</a></td><td>This plugin is used for checking for updates and auto-updating apps with Google Play Store In-App updates API.</td></tr><tr><td><a href="https://github.com/project-sunbird/cordova-plugin-qr-scanner.git">cordova-plugin-qr-scanner</a></td><td>This is a customizable plugin for QRCode scan.</td></tr><tr><td><a href="https://github.com/Sunbird-Ed/sb-cordova-plugin-customtabs.git">sb-cordova-plugin-customtabs</a></td><td>This plugin is used to provide a way to a way to add a customized browser experience directly within their app.</td></tr><tr><td><a href="https://github.com/Sunbird-Ed/sb-cordova-plugin-db.git">sb-cordova-plugin-db</a></td><td>This plugin is used to communicate with the SQLite database.</td></tr><tr><td><a href="https://github.com/project-sunbird/sb-cordova-plugin-sync.git">sb-cordova-plugin-sync</a></td><td>This plugin is used to sync telemetry events and course progress.</td></tr><tr><td><a href="https://github.com/Sunbird-Ed/sb-cordova-plugin-utility.git">sb-cordova-plugin-utility</a></td><td>This plugin is a utility plugin to resolve various native capabilities for Android and iOS.</td></tr></tbody></table>


# Configurations to setup mobile app

### 1. sunbird.properties

<mark style="color:blue;">**sunbird.properties**</mark> file contains all the necessary configurations to set up the Sunbird mobile app. The following are the configurations inside the <mark style="color:blue;">**sunbird.properties**</mark> file.

#### Note:

The properties can be environment-specific, so the naming convention is \<env\_name>\_\_\<property\_\_name>. For example, suppose **base\_url** is the property, so its dev environment-specific property name is **dev\_base\_url,** and the staging environment-specific property name is **staging\_base\_url.**

| Property name             | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| app\_name                 | Name of the app/instance                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| app\_version\_code        | Version code should be incremented every time a build is uploaded to Play Store.                                                                                                                                                                                                                                                                                                                                                                                                                         |
| app\_id                   | A unique application id that identifies the app.Env specific properties dev\_app\_id, staging\_app\_id                                                                                                                                                                                                                                                                                                                                                                                                   |
| base\_url                 | Base URL of the instance(shouldn't contain "/" at the end). Env specific properties dev\_base\_url, staging\_base\_url                                                                                                                                                                                                                                                                                                                                                                                   |
| producer\_id              | Unique id used to show the origin(app/portal/desktop) of telemetry.Env specific properties dev\_producer\_id, staging\_producer\_id                                                                                                                                                                                                                                                                                                                                                                      |
| channel\_id               | Default channel id.Env specific properties dev\_channel\_id, staging\_channel\_id                                                                                                                                                                                                                                                                                                                                                                                                                        |
| mobile\_app\_key          | The credential is required to generate **mobile\_app\_secret**. This can be a version number Eg. "\<instancename>-0.1". Suppose in the future you want to stop API calls to "\<instancename>-0.1" then change it to "\<instancename>-0.2" and generate a new mobile\_app\_secret and use it in the app. Env specific properties dev\_mobile\_app\_key, staging\_mobile\_app\_key.                                                                                                                        |
| mobile\_app\_secret       | The credentials required for API calls Use [this script](https://github.com/Sunbird-Ed/SunbirdEd-mobile-app/blob/master/mobile_app_key_secret_generator.js) to generate mobile\_app\_secret. The required properties to run the script is domain name, mobile\_app\_key, mobile admin key, and mobile admin secret(Run the **OnboardConsumers** Jenkins Job and take the mobile admin key and secret from Jenkins Output.)Env specific properties dev\_mobile\_app\_secret, staging\_mobile\_app\_secret |
| deeplink\_base\_url       | Base URL used to support deep linking in the app.Env specific properties dev\_deeplink\_base\_url, staging\_deeplink\_base\_url                                                                                                                                                                                                                                                                                                                                                                          |
| support\_email            | Email address of customer support where users can email their queries about the app.                                                                                                                                                                                                                                                                                                                                                                                                                     |
| custom\_scheme            | Custom scheme to support browser-based google login.Env specific properties dev\_custom\_scheme, staging\_custom\_scheme                                                                                                                                                                                                                                                                                                                                                                                 |
| merge\_account\_base\_url | Base URL of merge account feature(shouldn't contain "/" at the end).Env specific properties dev\_merge\_account\_base\_url, staging\_merge\_account\_base\_url                                                                                                                                                                                                                                                                                                                                           |
| oauth\_redirect\_url      | Redirect URL to support browser-based google login.Env specific properties dev\_oauth\_redirect\_url, staging\_oauth\_redirect\_url                                                                                                                                                                                                                                                                                                                                                                      |
| tou\_base\_url            | Terms of use baseurl.Env specific properties dev\_tou\_base\_url, staging\_tou\_base\_url                                                                                                                                                                                                                                                                                                                                                                                                                |
| survey\_base\_url         | Survey feature base URL(Manage Learn Usecase).Env specific properties dev\_survey\_base\_url, staging\_survey\_base\_url                                                                                                                                                                                                                                                                                                                                                                                 |
| projects\_base\_url       | Project feature base URL(Manage Learn Usecase).Env specific properties dev\_projects\_base\_url, staging\_projects\_.base\_url                                                                                                                                                                                                                                                                                                                                                                           |

### 2. google-service.json

Create apps in the firebase console based on the number of variants available for your instance. In the firebase console add the package name equivalent to your variant app\_id. For example, suppose you have a staging variant of your instance and the property is following

```
staging_app_id = org.sunbird.app.staging
```

In the firebase console create an app whose package name should be "org.sunbird.staging.app".

For more reference follow this [google support page](https://support.google.com/firebase/answer/7015592?hl=en#android\&zippy=%2Cin-this-article).


# I18N (Resource Bundles)

Resource bundles provide support to different languages based on the user’s preference.

## To modify existing resource bundle in Mobile App:

* [src->assets->i18n](https://github.com/Sunbird-Ed/SunbirdEd-mobile-app/blob/release-7.0.0/src/assets/i18n) This folder contains .json files that contain the resource bundles array.
* For example [en.json](https://github.com/Sunbird-Ed/SunbirdEd-mobile-app/blob/release-7.0.0/src/assets/i18n/en.json) has,&#x20;

&#x20;     `"ABOUT": "About"`,

&#x20;     If you want to modify the ABOUT text, simply update its value.  For example,&#x20;

&#x20;    `"ABOUT": "New About Text"`

## To add new resource bundle in Mobile App:

* [src->assets->i18n](https://github.com/Sunbird-Ed/SunbirdEd-mobile-app/blob/release-7.0.0/src/assets/i18n) This folder contains .json files that hold the resource bundle arrays. To add a new resource bundle, create a file named {language\_code}.json and add the required values.
* Copy and paste the content of [en.json](https://github.com/Sunbird-Ed/SunbirdEd-mobile-app/blob/release-7.0.0/src/assets/i18n/en.json) into your new file and modify the value. It will display the default(english) value if any of the values are missing.
* A proper format should be followed for example, `"ACCOUNT_MERGE_CONFIRMATION_BTN_MERGE": "Merge"`

<br>


# Form service

**Sunbird-ED Forms API** is primarily used for **configuring and managing forms** within the Sunbird-ED platform. These forms are likely used for various purposes, such as:

* **User registration**
* **Content creation**
* **Feedback collection**
* **Other administrative tasks**

**Key functionalities of the API might include:**

* Creating, updating, and deleting form definitions.
* Managing form fields (text boxes, dropdowns, etc.) and their properties.
* Defining form layouts and structures.
* Handling form submissions and data processing.
* Integrating forms with other Sunbird-ED components.

#### How it Enables Dynamic Configuration

While the specific details of the API might vary, it's reasonable to assume that the Sunbird-ED Forms API provides mechanisms for:

* **Defining form templates:** Creating reusable form structures.
* **Customising form instances:** Populating form templates with specific data and configurations.
* **Managing form submissions and data:** Processing and storing form data.

By allowing for dynamic configuration of forms, the API can be used to create flexible and adaptable user interfaces within the Sunbird-ED platform.


# Component Diagram

## GitHub Repository

{% embed url="<https://github.com/project-sunbird/sunbird-ext-framework>" %}

### Plugin - Form service

The form service is built as an plugin for the above extensible framework.

{% embed url="<https://github.com/project-sunbird/sunbird-ext-framework/tree/master/demo/plugins/FormService>" %}

## Architecture

<figure><img src="/files/AoeUelZkfPFyyPXaAJqX" alt=""><figcaption><p>Form Service plugin Architecture</p></figcaption></figure>

## [From Service Plugin](https://github.com/project-sunbird/sunbird-ext-framework/blob/master/server/README.md)

It's an extensible framework library to create a server side API endpoint.

### [EXT Framework Server](https://github.com/project-sunbird/sunbird-ext-framework/blob/master/demo/plugins/FormService/server/manifest.ts)

During this phase, the framework tries to read the manifest.ts file under the plugin's home directory.

When it finds the manifest.ts file, it will register the plugin in the "plugin registry" and update the status of the plugin as REGISTERED.

The framework tries to locate if any schema files are defined in the manifest.ts file. If the plugin has not defined any schema file, the framework would skip this step.

If there are schema files, then it would try to create a schema (tables/index) on the corresponding database provided based on the schema definition.

### [Framework API /Route](https://github.com/project-sunbird/sunbird-ext-framework/blob/master/demo/plugins/FormService/server/routes.ts)

During this phase, the framework tries to find `routes.ts` files under the plugin home directory. If the file is not found, the plugin fails to load.

The file should export a class named `Router`. The framework registers the routes (endpoint) defined for the plugin with the "prefix" defined in the `manifest.ts` file.

### [Request Validator](https://github.com/project-sunbird/sunbird-ext-framework/blob/master/demo/plugins/FormService/server/RequestValidator/index.ts)

During this phase, the framework will validate the request body that is requested by the client app. If the request doesn't have mandatory data or valid input, it will throw an error in response.

### [Server Method](https://github.com/project-sunbird/sunbird-ext-framework/blob/master/demo/plugins/FormService/server/server.ts)

During this phase, the method retrieves data from a Cassandra database based on the provided query parameters.

It tries to find a matching record by gradually relaxing the constraints on the properties. Once a record is found or all attempts are exhausted, the retrieved data is processed and sent back as a response.

#### Video on Extensibility Framework

{% embed url="<https://youtu.be/QFv5rEv-NXc?si=pTVnWuzj4mvaUrhc>" %}

###


# Data model

Cassandra database used in Form service

| Column Name        | Data Type | Description                                             | Sample Data                                          |
| ------------------ | --------- | ------------------------------------------------------- | ---------------------------------------------------- |
| id                 | string    | Represents an API uniquely                              | api.form.create                                      |
| type\*             | varchar   | Represents the type of form being created               | content, user, forum, app, program-dashboard, config |
| subtype\*          | varchar   | Represents the sub-category of form being created       | course, collection, textbook, resource, login        |
| action\*           | varchar   | Represents the user action on the form                  | ilter, create, get, save, review , search            |
| component\*        | varchar   | Represents the consumption platform for the form        | portal, mobile                                       |
| root\_org          | varchar   | Represents the form accesabilty to all (\*) or specific | \*, 123213232332323                                  |
| framework          | varchar   | Represents the form accesabilty to all (\*) or specific | \*, 121324324274724                                  |
| created\_on        | timestamp | created time                                            | 2023-04-13T11:08:21.260Z                             |
| last\_modified\_on | timestamp | modified time                                           | 2023-04-13T12:35:52.143Z                             |


# API's

Sample API Reference for Form Service Used  in ED Portal

Sunbird-Forms

{% embed url="<https://app.gitbook.com/o/-Mi9QwJlsfb7xuxTBc0J/s/-MkgPDmvKwE_DgYJbvPS/use/apis#sunbird-forms>" %}
[Sample Sunbird-Forms](https://project-sunbird.atlassian.net/wiki/spaces/SBDES/pages/2637725751/Form+API+s)
{% endembed %}

## **Sunbird ED Portal Postman Forms Config Documentation**

{% embed url="<https://app.gitbook.com/o/-Mi9QwJlsfb7xuxTBc0J/s/-MkgPDmvKwE_DgYJbvPS/use/apis#sunbird-ed-portal-postman-forms-config-documentation>" %}


# Manage Learn


# ML Core Service

Introducing ML Core Service a key component within the Manage Learn, tasked with the creation of programs and resources within the Managed Learn ecosystem.


# Overview

The ML Core Service is a pivotal component within the Manage Learn system. Its primary function involves generating resources according to specified roles and locations, in addition to furnishing data based on user particulars. This service is instrumental in producing programs and solutions. Its utility extends beyond mere assistance for support, administration, and users; it also serves as a foundational resource for various other components integrated into the Manage Learn framework.

For further information, please visit the following link: [click here](/learn/functional-capabilities/manage-learn/overview)

For step-by-step instructions on creating programs and solutions, please consult the document provided below:

{% embed url="<https://docs.google.com/document/d/1lpOYKVn7gbzCfNK5QwACUDELY2vk9y97M8STI1_mlPA/edit>" %}


# User Flow Diagram

## User Interaction For Program on Manage Learn

<figure><img src="/files/emV3HLriNWqcOghGrcbG" alt=""><figcaption><p>Program Flow Level 0</p></figcaption></figure>

<figure><img src="/files/QbaXahprNDQrcNNFbTA3" alt=""><figcaption><p>Program Flow Level 1</p></figcaption></figure>

The Program flow diagrams depict user engagement with the [ML Core Service](/use/source-code/manage-learn/ml-core-service), highlighting the step-by-step progression and engagements inherent to its usage. These visual aids offer a lucid representation of the user's path and the procedures intrinsic to the core service.

In the program, Different resources are mapped that users can consume.

Beyond direct user engagements, the [ML Core Service](/use/source-code/manage-learn/ml-core-service) relies upon various auxiliary services to accomplish its functions and provide an uninterrupted user experience.

These services include:

1. [ML Project Service](/use/source-code/manage-learn/ml-project-service)
2. [ML Reports Service](/use/source-code/manage-learn/ml-report-service)
3. [Learner Service](https://lern.sunbird.org/learn/readme)

Collectively, these services forge a unified ecosystem, empowering the [ML Core Service](/use/source-code/manage-learn/ml-core-service) to provide programs, solutions and other core module functionalities. The harmonious interconnections and interdependencies guarantee a seamless user experience and effective management within the broader SunbirdEd platform.\\


# Component Diagram

<figure><img src="/files/JnnnRA2mpGZcwJbz6jCq" alt=""><figcaption><p>ML Core Service Component Diagram</p></figcaption></figure>

The ML Core Service is constructed using a MongoDB, Kafka, and cloud storage technologies. Additionally, it seamlessly collaborates with vital services like [ML Project Service](/use/source-code/manage-learn/ml-project-service), [ML Survey Service](/use/source-code/manage-learn/ml-survey-service), and [Learner Services](https://lern.sunbird.org/learn/readme). This Microservice is composed of ten pivotal Modules, each playing a crucial role.

#### User Role

This module stores essential user role information.

#### Cloud Service

It facilitates communication between ML Core and the Cloud Service for data storage and retrieval.

#### Admin

Providing administrative services within the Manage Learn Building block.

#### Users

Serving user-centric functions, including targeted programs and resources.

#### Solution

Responsible for solution creation and management.

#### Certificate Base Templates

Creating foundational certificate templates used by certificate templates and providing certificate URLs.

#### Certificate Template

Mapping certificates with solutions and associated criteria.

#### Program Users

Managing user enrollment and consent statuses.

#### Program:

Creating and managing programs.

#### User Extension

Storing user details and program-related information for program designers and managers.

These ten modules synergize as the backbone of the [ML Core Service](/use/source-code/manage-learn/ml-core-service), empowering users to enhance and optimize program capabilities within the broader SunbirdEd ecosystem on the App platform.

#### Video on ML core services

{% embed url="<https://youtu.be/7QVvGrQxJGc?list=PLUrm4D0K_7nxlaZZYirokpx5Mo-jMd64M&t=62>" %}


# Data Model

### DB Schema

The schema serves as a blueprint for creating and maintaining the database that supports the ML Core Services data storage and retrieval operations.

![ML-Core Service](https://ml-services-uploads.s3.ap-south-1.amazonaws.com/DBSchema/ML-Core.png)

#### Here are examples of sample data for each collection

#### [program](https://github.com/shikshalokam/ml-core-service/blob/master/DBSchema/programs.json)

Programs collection is tasked with housing high-level program information, encompassing program specifics, resource listings, and program categorizations.

#### [programUser](https://github.com/shikshalokam/ml-core-service/blob/master/DBSchema/programUsers.json)

The programUsers Collection holds user data of those who have become part of the program and have provided their consent status.

#### [certificateBaseTemplates](https://github.com/shikshalokam/ml-core-service/blob/master/DBSchema/certificateBaseTemplates.json)

The certificateBaseTemplates collection is utilized to store URLs and file paths indicating the storage location of certificate files, along with their corresponding certificate types.

#### [certificateTemplates](https://github.com/shikshalokam/ml-core-service/blob/master/DBSchema/certificateTemplates.json)

The certificateTemplates collection will be established for solutions and associated with certificate templates to facilitate the generation of certificates, incorporating predefined criteria.

#### [solutions](https://github.com/shikshalokam/ml-core-service/blob/master/DBSchema/solutions.json)

The solutions collection will serve as a repository for various types of resources, encompassing observations, improvement projects, and surveys, among others.

#### [userExtension](https://github.com/shikshalokam/ml-core-service/blob/master/DBSchema/userExtension.json)

The userExtension collection will be responsible for storing user information, including associated solutionsId and programId, indicating their roles as program managers or designers.

[Click here](https://ml-services-uploads.s3.ap-south-1.amazonaws.com/DBSchema/ML-Core.pdf) for DB schema and corresponding examples in a PDF format.


# Folder Structure

[ML Core Service](/use/source-code/manage-learn/ml-core-service) folder structure is designed to organize the different modules and files that constitute the core service of the Learn application. It follows a modular approach, facilitating easy management and development of the service.

### The structure is as follows

```
.
├── config
│   └── db
├── controllers
│   ├── v1
│   └── v2
├── generics
│   ├── constants
│   ├── helpers
│   ├── http-status-codes
│   ├── kafka
│   ├── middleware
│   │   └── validator
│   └── services
├── healthCheck
├── keycloak-public-keys
├── locales
├── migrations
├── models
├── module
│   ├── admin
│   │   └── validator
│   ├── app-releases
│   │   └── validator
│   ├── apps
│   │   └── validator
│   ├── certificateBaseTemplates
│   │   └── validator
│   ├── certificateTemplates
│   │   └── validator
│   ├── cloud-services
│   │   ├── aws
│   │   │   └── validator
│   │   ├── azure
│   │   │   └── validator
│   │   ├── files
│   │   │   └── validator
│   │   └── gcp
│   │       └── validator
│   ├── email
│   │   └── validator
│   ├── entities
│   │   └── validator
│   ├── entityTypes
│   ├── files
│   ├── forms
│   │   └── validator
│   ├── programUsers
│   ├── programs
│   │   └── validator
│   ├── solutions
│   │   └── validator
│   ├── static-links
│   │   └── validator
│   ├── user-extension
│   │   └── validator
│   ├── user-profile
│   │   └── validator
│   ├── user-roles
│   │   └── validator
│   └── users
│       └── validator
├── release-notes
├── routes
├── template
└── test
```

#### config

Within this folder, you can find configuration files specific to the core service, such as database configuration and other settings.

#### controllers

The controllers folder contains various modules representing the application's endpoints or routes. It is organized into different versions, denoted as "v1" and "v2," to allow for backward compatibility and feature evolution.

#### generics

This folder is dedicated to generic utilities and helper functions utilized throughout the core service. It includes subdirectories for constants, helpers, HTTP status codes, Kafka-related code, middleware (e.g., request validation), and services.

#### healthCheck

This folder is designated to hold files that pertain to health checks or monitoring endpoint, ensuring the service's health and availability is monitored effectively.

#### locales:

The locales folder contains language-specific translation files that enable internationalization and localization for the service.

#### migrations

This folder houses database migration scripts, enabling smooth transitions between different versions of the database schema.

#### models

This folder contains the data models and database schema definitions for the core service.

#### module

The "module" folder consists of individual folders for each controller. Within each controller folder, there is a "helper" file that contains all the business logic for that specific controller. Additionally, there is a "validator" folder dedicated to API validation, ensuring that incoming data meets the required criteria and is sanitized appropriately.

#### release-notes

This folder contains release notes or changelogs that document the changes made in each version of the core service.

#### routes

The "routes" folder contains a single file named "index" that serves as the central location for all routes in the core service. These routes are created dynamically, making it a dynamic and flexible approach to managing the service's endpoints.

#### template

This folder is intended for storing templates


# API's

The [ML Core Service](/use/source-code/manage-learn/ml-core-service) Postman Collection is a comprehensive resource for interacting with the ML Core Service. It includes organized endpoints, detailed documentation, and example workflows, providing a valuable reference for developers. Leverage this collection to enhance productivity and collaboration in ML Services.

#### Public APIs

Public APIs are accessible gateways for apps and portals to access external resources. They require a public URL and user authentication. The provided Postman collection simplifies API interactions for developers.

[Public Postman collection](https://documenter.getpostman.com/view/7997930/2s946chuaT#d9d881f1-2975-4600-89a8-be84468294c2)

{% embed url="<https://documenter.getpostman.com/view/7997930/2s946chuaT#d9d881f1-2975-4600-89a8-be84468294c2>" %}

#### Private APIs

Private APIs facilitate the creation of resources and programs, necessitating authorization and user authentication tokens, as well as a private IP, to access the APIs securely.

[Private APIs Postman collection](https://documenter.getpostman.com/view/7997930/2s946chuaT#ceb67b58-0c4c-4654-9fb0-a2316e95a796)

{% embed url="<https://documenter.getpostman.com/view/7997930/2s946chuaT#ceb67b58-0c4c-4654-9fb0-a2316e95a796>" %}




---

[Next Page](/llms-full.txt/1)

