Onboarding

Hello and welcome to the Hungerrush on-boarding documentation. Feel free to add any missing documentation if need be.

Prerequisites

To get started on the Designer backend, you need an understanding of C# and .NET. For more information on the tech stack please see Backend Architecture.

Technologies you need to install

We encountered an error while setting up the project with Visual Stuido and VS Code on Mac.

Visual Studio: When making a http request through postman, it does not connect to the api endpoint. Error: connect ECONNREFUSED 127.0.0.1:7075

Visual Studio Code: Could not get the debugger to work. There seems to be something wrong with the code signing of vsdbg and/or vsdbg-ui.

Access you need

Please request access to the following from the Hunger Rush team:

  • Microsoft Azure portal login details and permissions
  • VPN for frontend testing purposes
  • Designer workspace on Postman

How to open Designer project folder (if you are new to c# and .NET )

To open the Designer project; go to the file location on your computer -> find the Themeservice.sln file -> right click -> open with the editor of choice

How to run and test hungerrush services locally

To run hungerrush service locally, make sure to have Azure emulator installed on your computer.

To test service locally;

  • download the local.settings.json file for the hungerrush service you want to run from the iiimpact google drive, ie Publish Service.
  • open the terminal in the project folder and run azurite to start the blog service.
  • If Azurite was successful, Build and Run the project to get started with the local API service.
  • To test the service locally on Postman, Change the environment to local before sending a http request to the service. for more infiormation checkout “Running Azure Function Locally”

How to test services on Azure

The Hungerrush services have been setup on Azure cloud. It has three environments: development, staging, and production. Note: when testing the Azure application, do use the developemnt environment. pay close attention not to set the environment to PRODUCTION.

To test the service on Azure;

  • Log into the Azure Portal with IIIMpact organisation details
  • Click on Function App and search for the service you want to test. In this example, I will use Notification Service Development.
  • Click on Functions -> select Azure function you want to test, e.g.,get notifications.
  • Click on monitor -> logs -> wait till it shows connected on the terminal.
  • Navigate to Postman -> make sure it is set to the environment you want to test, e.g., development
  • Send a get notification HTTP request on Postma, e.g., get notification.
  • Navigate back to the Azure cloud terminal, the request details are displayed on the terminal.

Designer architecture overview

An overview of the designer architecture overview can be found here: Architecture

Testing event grid functionality

We use Postman to test API endpoints on the local environment. If you do not have access to the Designer workspace, please request access from the Hungerrush team.

To test EventGrid functionality on Postman, you need to simulate the call and pass the data through.

Example call:

URL (POST): http://{{ServiceEndpoint}}/runtime/webhooks/EventGrid?functionName={{FunctionName}}

{
   "id": "14728493827498743",
   "eventType": "yourEventType",
   "eventTime": "10:59:00.000",
   "subject": "yourSubject",
   "data": {
       {{BodyContent}}
   }
}

NB: When posting for an EventGrid function, you need to add a special header:

“aeg-event-type” -> “Notification”

Infrastructure as code

Designer’s Terraform Infrastructure can be found here. To modify any infrastructure, you need to log in via the Azure cli and authenticate using any Azure web console user details that exist and are available to the team.