Sunbird UCI
  • Overview of Sunbird UCI
  • 📙Learn
    • UCI use cases
    • UCI for Education(Case study)
    • Tech Overview
      • Glossary
      • High-level Architecture Design
      • Design Principles
      • Standards
  • 🚀Use
    • Choose your Persona
    • Adopter - Install and use UCI
      • Pre-requisites, Installation Setup, Post Setup
      • Setting up your very first conversation
      • API Documentation
      • Data Exhaust and Analytics
      • Posthog Event
      • Whatsapp (Netcore)
      • Environment Variables
    • Developer - Contribute to UCI
      • UCI Basics
        • XMessage Specification
        • Transformers
          • ODK Transformer
            • Interactive-Messages
            • Media Messages
            • Location
          • Broadcast Transformer
        • Adapters
          • Firebase Notification Adapter
        • User Segment
        • Schema Overview
          • UCI Core Schema
            • XMessage Schema
            • Assessment DB Schema
          • UCI API Schema
      • Development environment
        • Backend Setup
        • Setting up IDE
        • Environment variable setup
        • Debug services
        • Build and Execute UCI
        • Frontend Setup (Admin Console)
        • Frontend Setup (PWA)
        • Transport Socket
      • API Documentation
        • Bot Setup APIs
        • History APIs
        • Direct Message APIs
        • Vault APIs
      • Database Schema
        • Cassandra Xmessage Database
        • Postgres Forms Database
        • Postgres User Analytics Database
        • Postgres Comms Database
      • Contribution Guide
        • Your first PR
        • Contribute an Adapter
        • Adapter Implementation
        • Create a Transformer
    • Contact the administrator
  • ✅Releases
    • Release V2
  • 🤝Engage
    • Software License
    • Acceptable Use Policy
    • Terms of Service
    • Source Code
    • Discussion Forum
Powered by GitBook
On this page
  • 1. Overview
  • 2. Build Flow
  • 2.1. Utils
  • 2.2. Message Rosa
  • 2.3. Dao
  • 2.4. Adapter
  • 2.5. Inbound
  • 2.6. Orchestrator
  • 2.7. Transformer
  • 2.8. Broadcast Transformer
  • 2.9. Outbound

Was this helpful?

Edit on GitHub
  1. Use
  2. Developer - Contribute to UCI
  3. Development environment

Build and Execute UCI

PreviousDebug servicesNextFrontend Setup (Admin Console)

Last updated 2 years ago

Was this helpful?

1. Overview

UCI has a total of 9 repositories which are being used to process the bot messages from inbound to outbound. We have 4 main repositories who will process the messages from receiving the messages from channel(Sms/Whatsapp), converting the message to xmessage, authenticating the user, producing the next message, converting it back to message format for channel and sending it to the channel(Sms/Whatsapp). The other repositories are the helper repositories with each doing different jobs.

2. Build Flow

The repositories should be built & then executed in the sequence mentioned below.

2.1. Utils

Utils communicate with the federation service via apis. It holds all the utility/helper classes which will be used in other repositories. To clone this git repository use . Once the repository is cloned, build it using the command below.

    mvn clean install -DskipTests

2.2. Message Rosa

Message Rosa holds all the core models for XMessage & its property fields. To clone this git repository use . Once the repository is cloned, build it using the command below.

    mvn clean install -DskipTests

2.3. Dao

Dao holds the dao & repository classes for XMessage. To clone this git repository use . Once the repository is cloned, build it using the command below.

    mvn clean install -DskipTests

2.4. Adapter

    mvn clean install -DskipTests

2.5. Inbound

    mvn clean install -DskipTests

We can use any IDE tool to run it on a local machine or we can also run this service on terminal using below command.

    mvn spring-boot:run

We can also create its docker image & run the service on any server/local machine.

Create docker image

    docker build -t samagragovernance/inbound:${CURRENT_VERSION} .

Push docker image to docker hub

    docker push samagragovernance/inbound:${CURRENT_VERSION}

Run docker image

    docker-compose -f docker-compose.yml up -d inbound

2.6. Orchestrator

    mvn clean install -DskipTests

We can use any IDE tool to run it on a local machine or we can also run this service on terminal using below command.

    mvn spring-boot:run

We can also create its docker image & run the service on any server/local machine.

Create docker image

    docker build -t samagragovernance/orchestrator:${CURRENT_VERSION} .

Push docker image to docker hub

    docker push samagragovernance/orchestrator:${CURRENT_VERSION}

Run docker image

    docker-compose -f docker-compose.yml up -d orchestrator

2.7. Transformer

    mvn clean install -DskipTests

We can use any IDE tool to run it on a local machine or we can also run this service on terminal using below command.

    mvn spring-boot:run

We can also create its docker image & run the service on any server/local machine.

Create docker image

    docker build -t samagragovernance/transformer:${CURRENT_VERSION} .

Push docker image to docker hub

    docker push samagragovernance/transformer:${CURRENT_VERSION}

Run docker image

    docker-compose -f docker-compose.yml up -d transformer

2.8. Broadcast Transformer

    mvn clean install -DskipTests

We can use any IDE tool to run it on a local machine or we can also run this service on terminal using below command.

    mvn spring-boot:run

We can also create its docker image & run the service on any server/local machine.

Create docker image

    docker build -t samagragovernance/broadcast-transformer:${CURRENT_VERSION} .

Push docker image to docker hub

    docker push samagragovernance/broadcast-transformer:${CURRENT_VERSION}

Run docker image

    docker-compose -f docker-compose.yml up -d broadcast-transformer

2.9. Outbound

    mvn clean install -DskipTests

We can use any IDE tool to run it on a local machine or we can also run this service on terminal using below command.

    mvn spring-boot:run

We can also create its docker image & run the service on any server/local machine.

Create docker image

    docker build -t samagragovernance/outbound:${CURRENT_VERSION} .

Push docker image to docker hub

    docker push samagragovernance/outbound:${CURRENT_VERSION}

Run docker image

    docker-compose -f docker-compose.yml up -d outbound

Adapters convert information provided by channels (SMS, Whatsapp) for each specific provider to xMessages and vice versa. Adapters are gateway to the external services and are responsible for receiving user response and sending the response to users. To clone this git repository use . Once the repository is cloned, build it using the command below.

Inbound receives the messages from a channel, and uses the channel adapter to convert it to XMessage format. Once the message is converted, it will be pushed to the kafka topic, the orchestrator will listen to this topic to further process it. To clone this git repository use . Once the repository is cloned, build it using the command below.

Orchestrator authenticates & processes the user data from whom the message is received. The XMessage will then be pushed to the transformers topic based on the conversation configuration, the corresponding transformer(transformer/broadcast-transformer) will listen to this topic to further process it. To clone this git repository use . Once the repository is cloned, build it using the command below.

This is a ODK transformer, which transforms the previous xMessage from the user to one that needs to be sent next. It is a microservice that returns a new xMessage based on the previous user action, which will then be shown to the user. The XMessage will be pushed to the process-outbound topic, orchestrator listens to this topic and will further process it to & send it to outbound topic. To clone this git repository use . Once the repository is cloned, build it using the command below.

Broadcast transformer transforms the single message to multiple messages for each user segment associated with a conversation. It is a micro service that generated multiple XMessage and push it to process-outbound topic, orchestrator listens to this topic and will further process it to & send it to outbound topic. To clone this git repository use . Once the repository is cloned, build it using the command below.

Outbound converts the xMessage to the one that will be sent to the channel(sms/whatsapp). It will then be sent to the network provider(Netcore/Gupshup) who will send it to the channel. To clone this git repository use . Once the repository is cloned, build it using the command below.

🚀
link
link
link
link
link
link
link
link
link