📄
Sunbird Saral
  • Sunbird Saral Overview
  • Saral Quick Guide
  • Saral Implementation Manual
    • OMR led scanning - Assessments
    • OCR led scanning - Admissions
  • Saral Transformation Story
  • LEARN
    • Software Requirement
    • Application Architecture
    • Features
      • Configurable Branding
      • Capture AI/ML Training Data
      • Support
      • Share App data
      • Auto Sync
      • Multi-Page support
      • Profile Menu
      • Dynamic Validations
      • Dynamic Tagging
      • Minimal Mode
      • Offline mode
      • App Force Update
      • Review results/marks
      • Firebase Analytics and Crashlytics
      • ML model deployment using Firebase
      • Improved Low light Performance - Manual Edit
      • Vertical Forms Scanning Support
      • Improve Processing Speed for big layouts
      • Admissions Data Capture
      • Securing PII Data Capture - Admissions
    • Specifications
      • Layout specification
      • Backend API Swagger Doc
    • Videos
      • Feature Explanation
        • OMR Layout scanning
        • Auto-Sync
        • Share scan app data
        • Skip feature
        • Support feature
        • Validation feature
        • Incorrect scanning
        • Multi-page feature
        • Branding feature
        • Offline mode
        • Review results/marks
      • Usage by States
        • Gujarat Implementation - Between 39:00 - 40:00 mins
        • Uttar Pradesh(U.P) , Gorakhpur Implementation
    • ML Model Accuracy/Results
  • USE
    • Roadmap
    • Workspace Setup - Playbook
    • Saral App Reference Backend
    • Generating APK from source code
    • Generate AAB(App bundle) from source code
    • Sign already generated APK file with private Key
    • Layout configuration
    • Debug/Run Saral App from Android Studio
    • Saral App Debug Tips
    • Saral App Usage Guidelines
    • Update BASE_URL,apkURL in APK
    • Update BASE_URL,apkURL in AAB
    • Sign already generated AAB(Android App Bundle) file with private key
    • Google Play Store App Publish Considerations
    • Layout Design Guidelines
    • Saral OCR Assets
    • Firebase setup for Saral App Telemetry
    • Firebase setup for TFLite model deployment
    • Alternatives for Saral components
  • ENGAGE
    • Source Code Repository
    • Saral SDK Source Code Repository
    • Tracker
    • Releases
      • v1.0.0-beta.1
      • v1.0.0-beta.2
      • v1.0.0-beta.3
      • v1.0.0-beta.4
      • v1.0.0-beta5
      • v1.5.0
      • v1.5.1
      • v1.5.2
      • v1.5.3
      • v1.5.4
      • v1.5.5
      • v1.5.6
      • v1.5.7
      • v1.5.9
      • v1.6.0
      • v1.6.1
      • v1.6.2
      • v1.7.0
    • Saral - Solution Providers
    • Discuss
  • Experience Saral
  • Dev Environment - Installation & Maintenance
    • Saral Installation Guide (Non-Prod)
    • Saral - Sandbox Maintenance Guide (Non-Prod)
  • Saral Easy Installer
    • Saral Production-Environment User Installation Guide
      • Manual Installation for Prod
      • Automating the Infra provisioning and install of the Saral application
        • Prerequisites
        • What automation does
        • Run installer
        • Post install steps
        • Monitoring-Stack
    • Reference Documents
      • SARAL Infra Requirements & Associated Cost
      • Saral Infra Cost Benefit Analysis
  • Tool for Saral Easy Layout generation and Auto generate ROI json
Powered by GitBook
On this page
  • Software Prerequisites
  • Optional software
  • Other tools used
  • Source Code references
  • Frontend Setup
  • Backend Setup
  • Backend DevOps
  • Backend Data Load
  • Useful Developer Tools

Was this helpful?

Edit on GitHub
  1. USE

Workspace Setup - Playbook

Developer Environment Setup - Playbook

PreviousRoadmapNextSaral App Reference Backend

Last updated 2 years ago

Was this helpful?

Software Prerequisites

  • NodeJs (Recommended version v16.9.1 LTS)

  • NPM

  • OpenJDK 8

  • NDK old Version 20.0.5594570 needed to be compatible. Use command sdkmanager 'ndk;20.0.5594570' to switch to ndk 20.0.5594570. (This command is handy on Mac or Linux)

  • Saral SDK (This SDK is embedded in Saral App code base). Refer Saral SDK Source Code Repository

Optional software

  • Docker to bring up reference backend as a container ()

Other tools used

  • for transforming VoTT raw json to Saral ROI json. Refer to source repository path specs\v1\README.md file for more details. You may consider installing the extension in MS Visual Studio Code.

  • PostMan or any other REST client tool to invoke/test Rest APIs.

Source Code references

Open Terminal and clone source code git clone https://github.com/Sunbird-Saral/Project-Saral.git.

For latest repo refer Source Code Repository

Change Directory to Project-Saral/ folder and switch to release tag as per release notes. git checkout tags/<tag_name>

$FRONTEND_FOLDER = Project-Saral/v1.0/frontend

$BACKEND_FOLDER = Project-Saral/v1.0/backend

Frontend Setup

  • In Android Studio, navigate to File\Project Structure\SDK Location and set Android NDK location to $ANDROID_HOME\ndk\android-ndk-r20 (extracted in the last step).

  • Once Vysor and AVD are configured as per the instructions, follow the below steps to bring up the application.

  • cd android && ./gradlew clean && cd ..

  • npx react-native run-android

  • Successful frontend deployment should show Saral OCR login screen on AVD or USB connected Android device.

Backend Setup

  • Install node and MongoDB in your local machine.

cp ../../specs/v1.5/swagger-saral-maintenance.yaml ./src

cp ../../specs/v1.5/swagger-saral-frontend.yaml ./src

cp ../../specs/v1.5/swagger-saral-apidoc.yaml ./src

  • Create a subfolder inside the backend folder name it as configuration.

  • Now create a file in config\dev.env and paste the below commands

PORT=3000

MONGODB_URL=mongodb://localhost:27017/saraldata_dev

JWT_SECRET=SARALDATA_NODE

  • Successful backend local deployment should show Server is up on port 3000

Backend DevOps

Backend Data Load

  • Make sure the backend server is running

  • Command to delete/clean existing data:

    node ./data/import-data.js --delete

  • Command to load data from data files in ./backend/data folder.

    node ./data/import-data.js --import

Useful Developer Tools

https://www.npmjs.com/package/react-devtools Note: For the current version of Saral execute npm i -g react-devtools@"<4.11.0"

Note: Choose React Native CLI Quick Start tab for setup instructions.

Download and extract archive to $ANDROID_HOME\ndk folder.

Make sure sdk.dir paths are set properly in \SaralApp\android\local.properties.

Register on , add the Saral project on the firebase dashboard and download the corresponding google-services.json.

Place downloaded google-services.json under /SaralApp/android/app folder.

Open a terminal in /SaralApp and run npm i the command.

Make sure backend BASE_URL is configured in /SaralApp/src/configs/config.js file.

From Saral release v1.5.4 and above, please execute below commands from in a terminal.

Install npm packages by running npm i from .

Run npm run dev command from a terminal in .

Dockerfile is available under folder.

Build docker image using docker build . -t saral-backend:1.0-latest the command from folder in a Terminal.

Docker swarm stack reference file available at /saralbackend-stack.yml

Docker-compose reference file available at /docker-compose.yml

React Native
Android Studio Dowload
Vysor
https://docs.docker.com/desktop/
Microsoft VoTT(Visual Object Tagging Tool)
VoTT Project Setup Video
Jupyter Notebook
Setting up the React Native development environment
NDK 20.0.5594570
Google Firebase
$FRONTEND_FOLDER
$FRONTEND_FOLDER
$FRONTEND_FOLDER
$FRONTEND_FOLDER
$BACKEND_FOLDER
$BACKEND_FOLDER
$BACKEND_FOLDER
$BACKEND_FOLDER
$BACKEND_FOLDER
$BACKEND_FOLDER
$BACKEND_FOLDER