• hackathon
  • 2026
  • Team of four
  • Bedrock
  • SQS
  • Finalist, top 24

We built HyperPersona in a week as a team of four for Cognizant Technoverse 2.0, and it reached the finals: one of 24 teams of 5,600+ (22,000+ students).

It learns why a shopper buys, not just what. The browser streams consented events, agents on Bedrock turn them into facts, and a recommender ranks those facts, drafts an offer and checks every claim against its sources before showing it. I built the web app and its tracking, the pipeline from a click to a fact, the recommender tool the agents call, the catalogue it recommends from, and the deployment on AWS; the architecture we designed together.

The HyperPersona storefront: a folded throw on a product hero, with colour swatches and an add to bag button.
the storefront
A new collection section: an editorial portrait beside four products with prices.
editorial product rails
The profile lab: pick a shopper profile and see what the engine infers from their signals.
what it infers, live
The integration page: drop HyperPersona into any storefront with one thin client layer.
one thin client layer
Type
hackathon
Role
The web app, the event pipeline, the recommender tool and the deployment
When
One week, May 2026
Team
Four of us
Stack
React 19, TypeScript, FastAPI, SQS, ECS Fargate, Docker, CloudFront, DynamoDB, OpenSearch Serverless, Bedrock, Redis, GitHub Actions
Links
hyperpersona-web.vercel.app

My part

  • The web app, with tracking

    The React 19 storefront the engine personalises, every view, search and click tracked through the event SDK.

  • Batching and retries

    Events stored first, sent in batches of 50 or every 3 s, retried with jittered backoff under an idempotency key, and flushed on the way out.

    How it works
  • The ingestion pipeline

    Consent scopes kept per event, one atomic Redis budget per shopper, SQS to workers on ECS Fargate, and a noise gate before the model.

    How it works
  • The recommender tool

    What the recommender agent calls for related products: nearest neighbours in the product index within a 20% price band, rated 3.5 or more, widening the search when fewer than five match.

  • The creation pipeline

    621 products across 45 categories from a seeded generator, every image link checked, embedded into OpenSearch and deduped by slug.

  • Search that knows when to stop

    A relevance cutoff, so a search for “towel” stopped returning 48 shirts, on OpenSearch Serverless.

  • The deployment

    The API and four workers on ECS Fargate behind a load balancer and CloudFront, SQS between them, images shipped from GitHub Actions through OIDC.

    How it works

Divyansh Sharma built the agents' supervisor, the fact ranking and the chain-of-verification; Anamika Aggarwal the shop backend.

How it fits together

StorefrontReact 19Event SDKIndexedDB firstIngest APIFastAPI on ECS · consentWorkers ×4SQS · noise gateAgents on Bedrockfacts about why they buyOpenSearchServerless · SigV4Recommenderrank · draft · verifyembeddingsoffersin colour: what I built
A click is queued in the browser, sent in a batch, scoped by consent and budgeted in Redis, then waits in SQS for workers on ECS that turn it into facts on Bedrock.

Events that survive the tab closing

Recommendations are only as good as the signals that reach them, and a browser loses signals all the time: tabs close, pages reload, phones drop off the network. So every view and click is saved in the browser first and sent in small batches, and whatever is left leaves as the page closes. Nothing is lost to a reload, and nothing arrives twice.

Underneath: events wait in IndexedDB with an idempotency key, go every 3 s or at 50, retry with backoff from 1 to 30 s plus jitter so open tabs don't retry together, and the last batch rides out with keepalive, trimmed under the browser’s ~64 KB budget.

Eventview · cart · buyIndexedDB queueidempotency keyBatch3 s or 50IngestOn page hidekeepalive · < 64 KBNew customerqueue deletedretry, jitterednothing is lost on a crash or a reload, and nothing leaks across customers
Events queued under a different customer are deleted, not sent: sending them would be a privacy leak.

From a click to a fact

A batch lands on a FastAPI endpoint that does as little as it can before answering. Duplicates in the batch are dropped by event id, the shopper's consent is read once and each event keeps only the scopes they granted, and one atomic Redis INCRBY claims the shopper's budget of 100 events a minute, refunding whatever goes over.

Events are written to DynamoDB in batches of 25, and a job for each goes onto SQS in batches of ten, keyed by its event, so a retry can't make a second job. Past 10,000 waiting, the endpoint answers 429 and the browser backs off.

Workers on ECS pull from the queue. Six low-signal event types are counted, not modelled; the rest go to agents on Bedrock that pull out up to five facts, each with a stance, embed them with Titan and store them in OpenSearch: the memory the recommender reads.

Deploying it on AWS

The API and four workers run as tasks on ECS Fargate behind an application load balancer and CloudFront. Images go to ECR from GitHub Actions through OIDC, so no AWS key is stored anywhere, and the storefront is on Vercel, passing /api through to CloudFront.

SQS sits between the API and the workers with a 90 s visibility timeout, long enough for an agent run, and 20 s long polling, so idle workers cost nothing. ElastiCache Redis holds offers, budgets and each job's result channel; DynamoDB the events and jobs; OpenSearch Serverless the vectors.

What breaks first at 10× the traffic

We sized it for a hackathon's traffic, so the queue is SQS and every job runs at least once. At ten times the shoppers, the event stream moves to Kafka, partitioned by shopper so one shopper's events stay in order and can be replayed into a new model; failed jobs go to a dead-letter queue instead of a status row; and agent calls are cached by fact, since they are the most expensive thing in the system.

Keyboard shortcuts

Anywhere on the site, while you are not typing.

M
Weather sound on or off
E
Copy my email
T
Day or night
S
Change the season
D
Portfolio
?
These shortcuts
Esc
Close what is open