SlytherIN Final delivery

THE NUMBER 1. BEST SELLING HOWLER 

Our solution is a fix to all those award conversations you might have with friends, family or employees. The howler is a message delivery service sending what you wish to send, in the desired tone of voice straight to the physical howler on their desk.

Technical Architecture

Our flow is pretty simple, yet elegant, if we might say so ourselves: 

  1. Flow starts with the input from your chosen Wizard/Witch. Input whatever you want, to who you want, in the tone of voice you want. In one of two possible ways:  
    • Into our seamless React Static Web Application. The app fetches secrets from Github secrets to ensure that no messages get out of hand 
    • Use our public API directly if you are more of a hacker-witch 
  1. The message is posted to our Power Automate flow and stored for archivation in Dataverse 
  1. A Python Flask app accepts the incoming letter. Processes it to add a magical touch tone of voice and transforms it to text-to-speech though Azure Speech Services and OpenAI APIs. 
  1. Audio file is played on a Bluetooth speaker and the Arduino makes the letter physically move. 
  1. Confirmation message is sent on SMS 

Public API
Our solution is available through a public API as follows:
 https://prod-28.northeurope.logic.azure.com:443/workflows/04b4f8ce0faa4298bcba5cba6bb86101/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=qD6agazpaRT_AP1IMD2fJIIxQRfcmwgkn_gSJD-zK-w

Example of body:

{
“sender”: “Bellatrix”,
“recipient”: “Sirius”,
“sentiment”: “Angry but polite”,
“subject”: “The end”,
“body”: “You’re definitely fired.”
}

Fabric Fera Verto

  • Set up of a Fabric instance, but sadly we ran into region problems
  • For the future we would like to add the data from Dataverse through a Fabric Link to prepare our data for our analyst department
  • The data platform team can use Howler data to gain valuable insights combining it with other business data 

Low-Code Charms

Half of our solution is built on low-code.

  • Power Automate is the skeleton of the solution, and Dataverse is the brain and blood. The rest of the body is made in Python and React. 
  • Without low-code, it would have been impossible to deliver such a good solution in such a short time. This helps us greatly to shorten the distance from design to finished product. 
  • We also have a Model-driven app for Howler support that helps our magical advisors if something goes wrong during message delivery

Pro-Code Potions

  • For the frontend, we’ve created a React Router app, with hot-reloading for DX, sass for styling and react-scripts providing the necessary scripts for running, building, and testing the project 
  • For the backend, we are using Flask, written in Python (aka. Parselmouth). We’re doing the following:  
  • Use Azure Cognitive services to enchant the input message in the form of a letter appropriate for reading aloud, and adjusting the tone of voice etc. 
  • We use the same service to create a audio file with the enchanted-message  
  • Send commands to the Arduino in order to start and stop the physical motor in the howler-letter while the audio is playing.  



Digital transformation

  • Our solution provides value to any business that wants to shorten the time it takes for awkward conversations or long messages.
  • We streamline everyday life by allowing users to enter a short message, which is read out to the recipient as a longer, more appropriate text. This will save everyone a lot of time and awkward moments. 

ALM Magic

  • Using GitHub actions for CI/CD; we are building the application, and then deploying the build/image to our Azure Static Web app.  
  • We were planning to set up Github security for code scanning and dependabot to ensure updated dependancies; but did’nt have the budget for GitHub Advanced Security.  

Magic Matrix 

  • As this is primarily designed for the Hogwarts school, we also were planning to archive the messages and audio-files in Sharepoint, with proper access control and governance; done through Power Automate.  
  • As well as SMS notifications, we were planning to send teams notifications as an additional service.  




We truly had a blast,

SlytherIN out

SMS Reciept

You can now recieve a SMS reciept on delivery of your Howler message. Thanks to our Link Mobility integration

Just add sms to the post message to our api:
{
“sender”: “Bellatrix”,
“recipient”: “Sirius”,
“sentiment”: “Angry but polite”,
“subject”: “The end”,
“body”: “You’re definitely fired.”
“sms”: “+47[your number here]”
}

Reactive simplicity

In addition to our API, the nr. 1 howler service also has a website. It is built using React Router, with an impeccable developer-experience with hot-reloading, react hooks, sass, and more!

Using GitHub Secrets and Workflows ensures secure handling of sensitive information through encryption and access control. As an example from the github-actions yml-file: azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_THANKFUL_HILL_0CC449203 }}

Thieving Ssslytherins on a stairway to HELL

Thieving bastards

As true Slytherins we of course have to steal, and steal we did!

  • ngrok
    We used third party ngrok to expose our local endpoint our local development server to the Internet!
  • SASS + REACT = <3
    Clever clogs utilize existing frameworks for simplifying styling: Sass – CSS with superpowers in combination with React makes a perfect match.
  • Link Mobility
    It’s good to know that your message has been delivered. Therefore you get a confirmation when your message has been delivered to the Howler!

Stairway to HELL

In our solution we combine these three Cloud APIs to make our solution floooow through the cloud!

  • Azure Speech Services through SpeechSDK
  • Azure OpenAI API
  • Dataverse Web-API

Sharing is Scaring

Everyone can send a Howler! It is up to you. Post a message to our public API and it will be read out loud. Do note that the content of your message will be altered by our magical services. So please be careful of what type of sentiment you use.

API url: https://prod-28.northeurope.logic.azure.com:443/workflows/04b4f8ce0faa4298bcba5cba6bb86101/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=qD6agazpaRT_AP1IMD2fJIIxQRfcmwgkn_gSJD-zK-w

Example of body:

{
“sender”: “Bellatrix”,
“recipient”: “Sirius”,
“sentiment”: “Angry but polite”,
“subject”: “The end”,
“body”: “You’re definitely fired.”
}

The endpoint triggers a Power Automate flow that adds a new row to our Dataverse. A new flow triggers and sends it to our Python Flask app. And it connects to the Howler and reads out the message.har hurtigmeny

API flow
send-to-howler-flow

Rubber snaking is the new black!

Stuck on code? Feeling down? Forget rubber ducking, rubber snaking is the new thing!Instead of explaining your code to a rubber duck, use a rubber snake, in true Slytherin ssssstyle.

#HouseOfSlytherin #RubberSnaking

Honouring one of the inspirations behind Parseltongue

One of the inspirations behind the Parselthounge language (aka. Python), and closely related to the language used to write Python itself; is the C++ language written in 1985, the same year Barty Crouch Jr.’s was imprisoned in Azkaban :O

We are using Arduino to control the physical howler, using code written in the classical language of C++:

And as Snape instructed us, we wrote the code in snake_case, of course! #HouseOfSlytherin

Nasty hackers

Bits edition: 01101110 01100001 01110011 01110100 01111001 00100000 01101000 01100001 01100011 01101011 01100101 01110010 01110011

In addition to our letter, glue stick “strikk og binders” hack, we had to resort to another hack..

We had wanted to run our Python Flask app in Cloud, but turns out it’s not that easy to control an Arduino from Azure.. So we had to resort to running it locally, but exposing our endpoint through a third party called ngrok to get it to work:

This hack makes it possible to call a local API from the outside!

No room for code with low ambition!

Does the code contain lines with low ambition? No worries, we’ll catch those nasty lines in a PR from a feature-branch into the main-branch, with a proper peer review process.

Commits on the main-branch will trigger a GitHub Actions workflow, using GitHub Secrets to retrieve tokens used in the build-process; and automagically deploying the finished build to our Azure Static Web App.

We love existential risks!

The existential risk is real! As Slytherins there is nothing we would love more than a bit of chaos. So of course we take all risks and use AI!

We use Azure service APIs for both prompting and text-too-speech combined with pro-code run in our Python Flask app:

The chat completion prompt goes as follow:

You are an assistant that helps transform a text to a specific tone of voice.
It is supposed to be a letter read out loud.
Start with greeting the recipient and end with goodbye from the sender.
If appropriate, add references to the Harry Potter universe.
Keep it short.

This prompts adds a dazzle of Hogwarts magic to each message;

Original message:
I don’t like you anymore. You have proven to be untrustful!

Magically transformed message:
Oh, how the tides have turned! I find myself in a whirlwind of emotions, and I must confess, I don’t like you anymore. Your betrayal stings like a Cruciatus curse, and it’s clear you’ve proven to be utterly untrustworthy!

After obtaining the magically bedazzled message, we run text-to-speech from Speech Services to magically transform the written message to speech in your preferred tone: