All B-Agent apps Home
Case study · B-Agent

B-Agent HYPE

An AI marketing studio for campaigns, content, email and automation.

Built it end to end: the React app, the Azure Functions backend, social publishing and the automation timers.

9integration services configurable in the app
25backend security tests
5 minmail scheduler interval
4workspace roles
The problem

Small marketing teams juggle separate tools for campaigns, content, email and social posting, and the numbers never agree between them.

The approach

One React workspace per company, with a campaign store that every dashboard, report and the chatbot compute from. A small Azure Functions backend holds the secrets, publishes to social accounts and runs the timers that send scheduled mail.

How it works

From request to answer, step by step.

  1. 01Entra sign-inCompany workspace with owner, admin, editor and viewer roles
  2. 02Functions backendVerifies the token, rate-limits each user, holds every API key
  3. 03Campaign storeOne numeric source for KPIs, reports and the chatbot
  4. 04AI contentCopy and images, falling back across four image providers
  5. 05Asset storageImages saved as blobs with a long-lived read URL
  6. 06Publish and automateSocial posts, seven workflow actions, timed birthday and renewal emails

What it does

  • Plan campaigns and track KPIs and channel mix on one dashboard.
  • Write posts and generate images with AI, then publish to social accounts.
  • Turn a product link into a short vertical video ad with script and voiceover.
  • Design emails with drag and drop and schedule them to contact lists.
  • Automate birthday, renewal and follow-up emails.

Under the hood

  • One campaign store feeds the dashboard, reports and chatbot, so the numbers always agree.
  • A backend keeps API keys out of the browser, rate-limits each user and encrypts social tokens.
  • Seven server-side workflow actions, from SendGrid to HubSpot. Images fall back across 4 providers.
Hard problems

What took real engineering.

Problem 1

A duplicate route that silently 404'd

Three Azure Functions registrations shared one route template, one per HTTP verb, and the host bound only one of them. Every other call answered 404 with nothing in the build or the logs, so document sync failed and each workspace quietly ran on browser storage. I merged them into one registration that branches on the verb, and a test now scans the source and fails on any duplicate template or missing OPTIONS handler.

Problem 2

One store behind every number

Campaign fields used to be display strings, so nothing could be summed and each page showed its own figures. Making them numeric let the dashboard, the performance page and the chatbot all compute from one store, so the numbers always agree. The company scope is set during render, not in an effect, because pages read scoped storage in their state initialisers, which run first.

Problem 3

Making scheduled actually mean scheduled

At first, a scheduled mailing only meant someone still had to press Send now, and generated images lived in browser storage that could be cleared. Mailings now live on the server, and a five-minute timer sends whatever is due. Images are stored as blobs with a long-lived read URL, so Instagram and X can fetch them and email clients don't strip them.

Built with
ReactTypeScriptAzure FunctionsAzure StorageAzure OpenAIFFmpeg