🧒
Sunbird ED
  • Learn
    • Overview for Sunbird ED
    • Functional Capabilities
      • Learning Apps
      • Asset Sourcing
      • Organised Collections
      • Discover Content - Digital & Phygital
      • User Engagement
      • Rich and diverse content
      • Versatile Question Bank
      • Observability
      • Launch Course
      • Verifiable Credentials
      • Multi-Channel Chatbot
      • Targeted Programs
      • Manage Learn
        • Overview
        • What is an entity?
        • What is a Program?
        • What is a Project?
        • What is Observation?
        • What is a Survey?
        • What is Observation as a task inside a Project?
    • Product and Developer's Guide
      • Learning apps
        • Workflows
          • Onboarding of Users
          • Discovery of Content
          • Play content
          • Track progress and Earn credentials
          • Interacting / Collaborating
      • Asset Sourcing
      • Organised Collections
      • Discover Content - Digital & Phygital
      • User Engagement
      • Rich and Diverse Content
      • Versatile Question Bank
      • Observability
      • Launch Courses
      • Verifiable Credentials
      • Multi-Channel Chatbot
      • Targeted Programs
      • Manage Learn
        • Overview
        • Component Diagram
        • ML Core Service
        • ML Project Service
        • ML Survey Service
        • ML Report Service
        • ML Analytics Service
    • Adopters
      • DIKSHA
    • Technical Architecture
      • Design Principles
      • Technical Architecture Diagram
      • Tech Stack
    • Roadmap
  • USE
    • Deployment Diagram
    • Deployment Artifacts
      • 4.10
      • 4.10.1, 4.10.2, 4.10.3, & 5.0
    • Installing ED Platform
      • release-4.10.0
        • Prerequisites for your own Sunbird ED Instance
        • Infra Provisioning
        • Jenkins Setup
        • Ansible Variables
        • Build
        • Post Install Steps
      • release-5.0.0
        • Prerequisites for your own Sunbird ED Instance
        • Infra Provisioning
        • Jenkins Setup
        • Ansible Variables
        • Build
        • Post Install Steps
      • release-5.1.0
        • Prerequisites for your own Sunbird ED Instance
        • Infra Provisioning
        • Jenkins Setup
        • Ansible Variables
        • Build
        • Post Install Steps
      • release-5.2.0
        • Prerequisites for your own Sunbird ED Instance
        • Infra Provisioning
        • Jenkins Setup
        • Ansible Variables
        • Build
        • Post Install Steps
      • release-6.0.0 (Draft)
        • Prerequisites for your own Sunbird ED Instance
        • Infra Provisioning
        • Jenkins Setup
        • Ansible Variables
        • Build
        • Post Install Steps
      • Sunbird ED Portal
      • Sunbird ED Mobile
      • Easy installer (Draft)
    • Updating Sunbird Releases
      • 4.10.1, 4.10.2, 4.10.3, & 5.0
      • 5.0.0 to 5.1.0
      • 5.1.0 to 5.2.0
      • 5.2.0 to 6.0.0 [Draft]
    • Learn More
      • Dependencies
      • Specifications
        • SOFIE
        • SOFIE Implementation
    • Releases
      • Release calendars
        • Release Calendar 4.9, 4.10, 5.0
        • Release calendar 5.0.1, 5.0.2, 5.0.3, 5.1.0 (major), 5.1.1, 5.1.2, 5.1.3 &5.2.0 (major)
        • Release Calendar 6.0.0
        • Release Calendar 7.0.0
      • Planned items
        • 4.9, 4.9.1, & 4.10(major)
        • 4.10.1, 4.10.2, 4.10.3, & 5.0(major)
        • 5.0.1, 5.0.2, 5.0.3 & 5.1 (major)
      • Release notes
        • 6.0.0 (Draft)
        • 5.2.0 (Latest)
          • Release-5.1.2
          • Release-5.1.1
        • 5.1.0
        • 5.0.0
        • 4.9.0, 4.9.1, 4.10.0
        • 4.7.0, 4.8.0
      • Release Artifacts
        • 4.10.1, 4.10.2, 4.10.3, & 5.0
        • 5.0.1, 5.0.2, 5.0.3, & 5.1
      • Demo of released items
    • Telemetry
      • Trackable Collection
    • Minimal forms
    • API's
  • Engage
    • Discuss
  • Contribute
    • Extend / Contribute to Sunbird
    • System Requirements
      • Learning Apps
    • Source Code
      • Architecture - Component Diagram
      • Developer Guide
        • Portal
          • Component Diagram
        • Desktop
          • Component Diagram
        • Mobile
          • Component Diagram
          • sunbird-mobile-sdk
          • Sunbird-mobile-app plugins
          • Configurations to setup mobile app
        • Form service
          • Component Diagram
          • Data model
          • API's
        • Manage Learn
          • ML Core Service
            • Overview
            • User Flow Diagram
            • Component Diagram
            • Data Model
            • Folder Structure
            • API's
            • Deployment Overview
            • Local Service Setup Guide
          • ML Project Service
            • Overview
            • User Flow Diagram
            • Component Diagram
            • Data Model
            • Folder Structure
            • API's
            • Deployment Overview
            • Local Service Setup Guide
          • ML Survey Service
            • Overview
            • User Flow Diagram
            • Component Diagram
            • Data Model
            • Folder Structure
            • API's
            • Deployment Overview
            • Local Service Setup Guide
          • ML Report Service
            • Overview
            • User Flow Diagram
            • Component Diagram
            • Data Model
            • Folder Structure
            • API's
            • Deployment Overview
            • Local Service Setup Guide
          • ML Analytics Service
            • Overview
            • Component Diagram
            • Data Model
            • Setup Guide
              • ENV Variables ( Config.ini)
            • Ingestions
            • Folder Structure
            • Report creation and Updation Scripts
            • Deployment Overview
        • UI (User interface) Sunbird-Ed portal
          • Angular Material
          • Component Style Guide Version 1
            • Accordion
            • Buttons
            • Cards
            • Forms
            • Grid & Layout
            • Labels
            • Modals
            • Pagination
            • Rating
            • Search Box
            • Select Box
            • Tables
            • Tabs
            • Toast messages
            • Tooltip
            • Typography
          • SB-Styles: A Comprehensive Design Resource
          • SB-Themes Repository: Unifying Design Across Platforms
            • Classical Theme in Sunbird-Ed portal
            • Joyful Theme in Sunbird-Ed portal:
      • Reference Apps
      • Platform
    • Install Locally
      • SunbirdED Mobile
      • SunbirdED Portal
    • Configuration
      • SunbirdEd Portal
      • Sunbird Mobile
    • Independent Libraries
      • Common Consumption Components
      • SunbirdEd Forms
      • Sunbird Client Services
      • Sunbird Styles
      • Sunbird Themes
      • Sunbird Tag Manager
    • Issue tracker/ Create Issue
    • Contribute to ED
  • Misc
    • Templates
      • Upgrade Sunbird release document
      • Release Notes
    • Archived
      • High Level Capabilities
      • Workflows
      • Where Sunbird ED helps you
      • ED - Mobile App (going to archive)
        • 4.10.3 to 5.0.0
        • 5.0.0 to 5.1.0
      • Setting up Sunbird ED
      • Developer Documentation
      • API Reference Documentation
      • Detailed Documentation
      • Source Code
      • Actors & Actions
      • Detailed Capabilities
      • Data
      • Terminology
      • 5.1.0-hotfix (OCI )
  • Development Resources
    • Misc Pages
      • Portal - Manage Learn - Reports
      • App - Manage Learn - component diagram
        • Projects
        • Observation & Survey
        • Program
      • Portal - Manage Learn - component diagram
      • Mobile form configurations
      • Content Indexing Flow
      • What are multiple databases used for
      • Course completion, reports and certificate issue
      • How to access Flink UI
      • What are all the flink jobs for
      • How does data flow into Druid
      • Minimal build properties
  • Page 1
Powered by GitBook
On this page
  • Getting started
  • Table of contents

Was this helpful?

Edit on GitHub
  1. Contribute
  2. Install Locally

SunbirdED Portal

PreviousSunbirdED MobileNextConfiguration

Last updated 2 years ago

Was this helpful?

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.

Getting started

To get started with the Sunbird portal, please try out our cloud-based demo site at:

Table of contents


Prerequisites

System Requirements

Operating System

MAC OS X 10.0 and above/Linux Windows (not verified). Take it with your own expertise(no community support but open for contribution).

RAM

> 6 Gb

CPU

2 cores, >2 GHz

Software dependencies

> 14.x.x (Install the latest release of LTS version)

> 11.x.x (Install the latest Angular CLI version)

Latest version of yarn: npm install --global yarn

Latest version of nodemon: npm install -g nodemon

Project Setup

  1. Clone project

    git clone https://github.com/Sunbird-Ed/SunbirdEd-portal.git
  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

        |           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

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

https://staging.sunbirded.org
Prerequisites
Project Setup
Running Application
Project Structure
Testing
refer
Node
Angular CLI
yarn
nodemon