← All workCase study / 03

Deployed MSc dissertation prototype · synthetic data

HealthAssist

An AI health & wellness companion exploring contextual conversations, live voice and personal wellness tracking.

A dissertation prototype I revisited to test whether its memory, usage limits, AI scope and safety wording really behaved the way the interface said they did.

Live demo Source is private

Film transcript: Silent 26-second product film showing the deployed prototype's dashboard, contextual conversation, speaking voice state, mood and medication tracking, nutrition information and nearby hospital map. All personal data is synthetic. The film is a visual overview, not evidence of medical effectiveness.

Role
MSc Dissertation / Full-stack AI
Year
2025–2026
Platform
Web application
Status
Deployed MSc dissertation prototype
Stack

01At a glance

The 30‑second version.

Problem

Everyday health tools tend to be isolated features: chat, mood, medication and nutrition rarely share context.

Product

One place for contextual AI chat, live voice, mood and medication tracking, nutrition information, nearby hospitals and an emergency simulation.

Outcome

A deployed prototype, then audited so its memory, limits, AI scope and safety wording match what the interface claims.

88/88

Worker tests passing in the final test run

26/26

Frontend tests passing

32/32

Firestore security-rule tests passing

3min

Live voice sessions, up to 10 exchanges

02Experience

One place for everyday health.

The MSc dissertation explored whether conversational AI and everyday wellness tools could form a more continuous experience instead of isolated features.

Remembers

Contextual chat

Conversations can save structured memories, and relevant ones are brought into later conversations.

Signed in

Live voice

Listening and speaking states, a three-minute session limit and up to 10 exchanges, with clear end states.

Tracking

Wellness tools

Mood history, medication doses and adherence, USDA nutrition information and nearby hospitals on a map.

Synthetic conversation records a penicillin allergy and running goal in HealthAssist text chat.
A synthetic penicillin allergy is stated in one conversation…
A later synthetic conversation refers to a previously stated penicillin allergy, with saved structured context visible.
…and used in a later one. Application behaviour, not clinical advice.
Authenticated HealthAssist live voice session in the listening state, showing a three-minute timer and session allowance.
Live voice: listening, with the session timer.
HealthAssist live voice session in the speaking state after a synthetic spoken question.
Live voice: speaking, after a synthetic spoken question.

Beyond the conversation

Tracking and information, not medical advice.

Mood history and dashboard summaries based on three synthetic entries from one day.
Mood history from three synthetic entries.
Medication adherence display based on one to two synthetic logged doses, not a health outcome.
Adherence from one to two synthetic doses, not a health outcome.
Nutrition tips screen using USDA FoodData Central nutrient information.
Nutrition tips from USDA FoodData Central.
Nearby hospital discovery using OpenStreetMap data and a synthetic Luton location; services are unverified.
Nearby hospitals from OpenStreetMap; services unverified.

03Architecture

The browser stopped being the authority.

A Cloudflare Worker now owns every AI request: model selection, instructions, validation, output limits, credentials and usage quotas.

One AI message · React 19 + TypeScript + Vite 7 frontendDeployed on Vercel · Cloudflare · Firebase

  1. Input

    Chat or voiceTyped or spoken

  2. Frontend

    React appTailwind CSS UI

  3. Identity

    Firebase AuthOr a guest allowance

  4. Boundary

    Cloudflare WorkerValidation, scope, quotas

  5. Text

    OpenAI gpt-5-miniChat replies and memory

    Voice

    OpenAI RealtimeLive voice sessions

  6. Saved

    Cloud FirestorePer-user Security Rules

Other services
The Worker also calls GNews and USDA FoodData Central. Maps use OpenStreetMap Nominatim and Esri tiles from the browser.
Quotas
Durable Object quotas enforce daily allowances per network, per account and for the whole app.

04Challenges

The prototype worked. Then I tested it.

Revisiting HealthAssist meant auditing how its features behaved, not polishing the interface.

Challenge 01 · Memory

Memory that didn't carry over.

Conversation 1A synthetic penicillin allergy is stated

Conversation 2A later reply uses it

symptom
Saved memories were not reliably influencing later conversations.
investigation
Audited the path from a saved memory to a later conversation, instead of trusting that the feature existed.
decision
Structured memories are extracted by the model, saved in Firestore, and relevant ones are selected heuristically for later conversations.
result
In production testing with a synthetic allergy, a later reply used the earlier statement. It is not vector retrieval, and memories are not yet de-duplicated.

Challenge 02 · Cost control

A limit that didn't limit.

20guest messages
  • Counter in browser state
  • Durable Object quotas
symptom
A guest message counter looked like a limit.
investigation
It lived in browser state, so it never protected the paid API boundary.
decision
Moved enforcement into the Worker with Durable Object quotas on UTC-day allowances, plus a burst limit of 20 requests per IP per minute.
result
20 guest messages per network (100 globally), 100 messages and 200 memory operations per account, 10 voice sessions per account. Guest identities are derived daily, not stored as raw IP addresses.

Challenge 03 · AI scope

An assistant that would answer anything.

  • Client-supplied system messages
  • General-assistant requests
  • Health & wellness scope
symptom
AI access could act too much like a general-purpose paid proxy.
investigation
The browser had too much say in what the model was asked to do.
decision
The Worker owns the instructions, rejects client-supplied system messages, and redirects clearly unrelated requests, such as coding, back to health and wellness.
result
Concrete controls on what the AI is used for. Not a claim that prompt injection is impossible.

Challenge 04 · Honest wording

Saying only what it actually does.

0real calls made
  • Ratings and testimonials
  • User-count claims
  • Clear simulation label
symptom
The emergency flow looked convincing, and its wording needed to state the simulation boundary more clearly.
investigation
Reviewed the product and privacy wording against what the prototype actually does.
decision
Labelled the emergency flow as a simulation, and removed unsupported ratings, testimonials, user counts and blanket security or compliance claims.
result
No real call is made and no ambulance is sent. Serious or red-flag symptom statements receive emergency guidance.

05Testing

Testing the behaviour, not just the interface.

Automated suites for the Worker, frontend and security rules, then a production smoke test with synthetic data.

Deployed prototype

The dashboard.

Synthetic dashboard data. The score is a rule-based display, not a clinical measure.

HealthAssist

HealthAssist dashboard greeting and summary cards for synthetic demo activity; its health score is a rule-based display, not a clinical measure.

Production smoke test

Checked with synthetic data.

  • Guest limits
  • Memory in a later conversation
  • Voice states
  • Wellness views
  • Emergency simulation wording

Recorded automated checks

146 tests across three suites.

Typecheck and production build passed, and frontend lint had zero errors. Results from the final test run.

Worker88 / 88
Frontend26 / 26
Rules32 / 32

Emergency simulation

Simulation only.

No real call is made and no ambulance is sent.

HealthAssist · simulation

HealthAssist emergency simulation countdown with an explicit notice that no real call is made and an option to cancel the simulation.

06Status

A prototype, honestly.

It works as a deployed dissertation prototype. It is not a medical product.

Working in the prototype

  • Contextual AI chat
  • Structured memory
  • Live voice
  • Mood tracking
  • Medication adherence
  • Nutrition information
  • Nearby hospitals
  • Emergency simulation
  • Usage quotas
  • Per-user data rules

Known limits

  • Not clinically validated
  • Shared networks share guest allowance
  • Memories not de-duplicated
  • News feed not curated
  • Simulation only, no real calls

HealthAssist is an educational dissertation prototype, not a medical product. AI responses are informational and not clinically validated.

07My role

What I did, and how.

HealthAssist began as my MSc dissertation project, where I developed the original prototype around conversational AI, wellness tracking, medication management, voice interaction and emergency-response simulation. When I revisited the project for my portfolio, I carried out a deeper technical review of how those features actually behaved. My role centred on defining product behaviour, questioning whether features worked as intended, making architecture and scope decisions, validating changes through manual and automated testing, and deciding what was accepted into the final prototype.

✦ Built with AI coding tools

Technical decisions
Moved AI instructions, model selection, request validation, output limits and usage controls into a Cloudflare Worker boundary; reviewed contextual memory and emergency simulation behaviour.
Testing
Checked the deployed prototype with synthetic data and reviewed recorded Worker, frontend and Firestore security-rule test results.
AI-assisted implementation
AI coding tools were used extensively during the later audit and stabilisation work for code investigation, implementation and testing. I remained responsible for requirements, reviewing proposed changes, testing behaviour, challenging incorrect assumptions and accepting the final work.

08Learned

A working interface isn't a working system.

A feature isn't a behaviour

Memory existed, but that did not mean it was influencing later conversations correctly.

A counter isn't a control

A message counter existed, but that did not mean it protected an API boundary.

Convincing needs care

An emergency flow looked convincing, which made it more important to say clearly that it was only a simulation.

09Up next

Up next: a rebuild from research.

HealthAssist validated the direction of the idea, but the dissertation codebase would not simply be extended into a healthcare product.

Planned · not started

HealthAssist, from the ground up.

A future version would begin from scratch, with research before any code. This is future exploration, not work already underway.

Research first
Deeper user and domain research before implementation.
Safety by design
Clearly defined safety boundaries and stronger AI evaluation.
Health data, deliberately
Deliberate health-data modelling, with privacy requirements established before implementation.