Project Factory

Overview

Project-factory assists users in generating the seed data essential for the campaign creation process in DIGIT HCM and in establishing relationships between all resources. The Project Factory Service manages project-type campaigns by handling the creation, updating, searching, and campaign setup processes. This documentation details the available APIs, their endpoints, request and response structures, and internal processing flows.

Pre-requisites

  • Knowledge of JavaScript (preferably ES6).

  • Knowledge of Git or any version control system.

  • Knowledge of RESTful web services.

  • Knowledge of the Kafka and Postgres.

  • Knowledge of eGov-mdms service, eGov-persister, eGov-idgen, eGov-indexer, and eGov-user will be helpful.

Base URL

project-factory/v1/

APIs Overview

Create Campaign

TO DO add other information

DB DIAGRAM

Swagger :

Configs and helm chart details :

API EndPoints

Roles

/project-factory/v1/project-type/create

  • CAMPAIGN_MANAGER

/project-factory/v1/project-type/update

  • CAMPAIGN_MANAGER

/project-factory/v1/project-type/search

  • CAMPAIGN_MANAGER

/project-factory/v1/data/_create

  • CAMPAIGN_MANAGER

/project-factory/v1/data/_search

  • CAMPAIGN_MANAGER

/project-factory/v1/data/_generate

  • CAMPAIGN_MANAGER

/project-factory/v1/data/_download

  • CAMPAIGN_MANAGER

Additional APIs being used are:

API EndPoints

Roles

/boundary-service/boundary-hierarchy-definition/_search

  • CAMPAIGN_MANAGER

boundary-service/boundary-relationships/_search

  • CAMPAIGN_MANAGER

/product/variant/v1/_search

  • CAMPAIGN_MANAGER

/product/v1/_search

  • CAMPAIGN_MANAGER

/product/v1/_create

  • CAMPAIGN_MANAGER

/product/variant/v1/_create

  • CAMPAIGN_MANAGER

  • Configure all the MDMS data for project factory service as done in the QA environment.

Data to configure :

  • Attribute Config

  • Boundary Schema

  • Delivery Config

  • Facility Schema

  • Gender Config

  • Mail Config

  • Operator Config

  • Product Type

  • User Schema

Refer to the following:

https://github.com/egovernments/egov-mdms-data/tree/UNIFIED-QA/data/mz/health/hcm-admin-console

IdGen Config:

Make sure the id format is configured in the ‘IdFormat.json’ file of the ‘common-masters’ module.

Below is what is currently configured in the QA environment.

{
    "format": "CMP-[cy:yyyy-MM-dd]-[SEQ_EG_CMP_ID]",
    "idname": "campaign.number"
}

Environment variables Below are the variables that should be configured well before deployment of the project factory service build image.

heap: "-Xmx256m -Xms256m"
memory_limits: 512Mi
  • Make sure to add the DB(Postgres and flyway) username & password in the respective environment secret yaml file the way it's done here.

  • Make sure to add the digit core services related secrets are configured in the respective environment secret file the way it's done here.

  • Click here for localisation details.

  • Click here to get the Postman Collection

Last updated

All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.