Young Living Common Docs
Filuet IntegrationTestingBuildingDatabasesInfrastructure

Filuet Integration

Filuet Integration is a service designed for integration with Filuet - provider of trading and logistics services.
More details you can find in the confluence Filuet Integration API

Usage

Filuet 1C system getting necessary data from YL using FiluetIntegration endpoint.

Development and Testing

The main language of the application?

Main language of this service is C#

What libraries and modules does it require?

What should a new developer and SRE resource need to know about this application?

A push/merge to master will automatically deploy to the Prod environment.
A push/merge to develop will automatically deploy to the Dev environment.

A creation of a pull-request from a branch prefixed with release/ will automatically trigger a build. To deploy to the Stage environment, you need to click the "Run" button on the BitBucket pipeline containing your build.

A push to any branch other than master and develop will trigger a build. To
deploy to the Test environment, you need to click the "Run" button
on the BitBucket pipeline containing your build.

Testing

  • How is this application tested? There is a Yleo.FiluetIntegration.Specs project that contains tests and they run on every build.
  • What tests are available? There are unit and integration tests for this project.
  • How can the tests be manually executed? You can run tests from VS. To have an ablity manually call endpoint on test environment you should claim an access token first.
curl -sS -X POST "https://auth-stage.youngliving.com/connect/token" \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'grant_type=client_credentials&client_id=<non-prod-client>&client_secret=<non-prod-secret>&scope=filuet'

After that you should use provided token within your request to a service

curl --location --request GET 'https://filuet-stage.youngliving.com/api/v1/customers/<customerid>' \
--header 'Authorization: Bearer <provided_token>'

Building

How to build it localy you can find in the Yleo.FiluetIntegration.Web/Dockerfile

To build docker image use next example:

docker build \
    -f Yleo.FiluetIntegration.Web/Dockerfile \
    -t $IMAGE_NAME \
    --build-arg version=$VERSION \
    --target 'release-build' \
    --no-cache \
    --pull \
    .

Databases

  • database used: vo_accounts

Infrastructure

This service in the AWS.

The following are the origins used by the API Gateway. These are not used by Filuet directly, but are accessible internally.