Inspiration
Ghana loses a mother every 6 hours. Not to rare diseases or unavoidable complications — to preeclampsia, hemorrhage, and sepsis. Conditions with warning signs that arrive days before the crisis. Signs like a persistent headache, swollen feet, blurred vision — symptoms that women across rural Ghana are told are "just part of pregnancy."
The statistic that stopped us: 3 out of 4 Ghanaian women deliver far from a clinic. By the time danger is recognized, it is often too late to reach care. Community health workers are the last line of defense — but they triage hundreds of patients a week with no decision-support tools, no triage system, and no way to flag who needs urgent attention.
We built MomAlert because the gap is not medical. The medicine exists. The problem is recognition — and that is exactly what AI is built to solve. A woman should not need a midwife present to know that her symptoms are serious. She should be able to describe how she feels, in her own language, and get a clear answer: go now, or wait and monitor.
What it does
MomAlert is an AI-powered maternal health triage companion that works like a conversation. A pregnant woman or new mother describes her symptoms in plain English or Twi — no forms, no medical jargon, no account required. MomAlert responds instantly in warm, human language, ending every message with one of four risk levels:
- ✅ LOW — Reassurance and education
- ⚠️ MEDIUM — Monitor; follow up with a health worker
- 🔶 HIGH — Seek care today
- 🚨 CRITICAL — Go to emergency now (pulsing red alert)
For users who cannot type easily, 12 pre-built symptom chips — fully translated into Twi — let them tap their symptoms instead. The language toggle switches the entire conversation to Twi mid-session.
On the other side, community health workers access a live dashboard that shows every session, filtered by risk level, auto-refreshing every 30 seconds. HIGH and CRITICAL sessions are flagged automatically, giving CHWs real-time visibility into high-risk cases across the women in their community — without requiring any patient to share personal information.
How we built it
MomAlert is a full-stack Next.js 16 application built for mobile-first use on the kinds of low-end Android devices common in Ghana.
The AI core uses a carefully engineered two-stage system prompt. The first stage generates a warm, plain-language response with a clear action step. The second stage appends a structured [RISK: LEVEL] tag that is parsed client-side to drive the live risk badge. The prompt enforces conservative clinical escalation — anything ambiguous goes up the risk scale, never down. CRITICAL and HIGH responses are required by the prompt to include explicit referral language.
Responses are streamed token-by-token using Server-Sent Events (SSE), so users on slow connections see the answer appearing in real time rather than waiting for a full round trip. The CRITICAL badge pulses with a CSS animation that creates genuine visual urgency — something that registers even before the text is read. Every session is saved to a SQLite database via Prisma, storing the risk level, language, flagged status, and conversation history — with no PII collected by default.
The Twi implementation required translating not just the UI but the system prompt itself, with a language-detection addon that instructs the model to respond fully in Akan when the user switches. The 12 symptom chips were hand-translated and validated as a reliable fallback for users who prefer to tap rather than type.
Challenges we ran into
Prompt engineering for clinical safety is nothing like prompt engineering for helpfulness. A helpful AI optimizes for user satisfaction. A safe triage AI must sometimes tell users things they do not want to hear, and must never comfort them into ignoring a dangerous symptom. Getting the model to be warm and conservative — to reassure about normal discomforts while escalating ambiguous symptoms — required many iterations and deliberate red-teaming with preeclampsia and hemorrhage scenarios.
Streaming with structured output. Parsing the [RISK: LEVEL] tag from a live streaming response while displaying tokens in real time is not straightforward. The tag arrives at the end of the response, so the client must buffer the full text while rendering partial text simultaneously, then parse the risk level only after the stream closes. We built this as two separate SSE event types: delta for live display, and done carrying the parsed risk object and session ID.
Mobile layout on Safari. Using h-screen breaks fixed-bottom input bars on iOS Safari because of the dynamic browser chrome. Switching to h-dvh (dynamic viewport height) fixed the layout — but this is not obvious and cost real debugging time.
Twi is a low-resource language. Smaller local models are inconsistent in Akan. We addressed this with a stricter system prompt, pre-translated symptom chips as a reliable input layer, and conservative fallback behavior.
Accomplishments that we're proud of
We are proud that MomAlert is genuinely usable — not a demo that only works with ideal input, but a system that handles fragmented, emotional, non-clinical descriptions and still produces safe, actionable guidance.
We are proud of the bilingual implementation. Switching to Twi mid-session, having symptom chips in Akan, and receiving a full response in Akan — that is meaningful for a first-generation smartphone user in Kumasi or Tamale who has never used an AI product before.
We are proud of the CRITICAL alert design. A pulsing red badge is a small thing technically, but in a demo it creates the visceral recognition that this is not normal — which is the entire purpose of the product.
And we are proud that the ethics are built into the product, not bolted on. MomAlert never diagnoses. It never claims certainty. Every response ends with a reminder that it does not replace professional care. The CHW dashboard exists precisely so that AI triage feeds into human decision-making, not around it.
What we learned
We learned that designing for low-resource health contexts forces a clarity that typical product development never demands. Every design decision had to answer: will a first-generation smartphone user in a rural community understand this immediately, under stress, on a small screen? That constraint eliminated half our initial ideas and made the remaining ones much stronger.
We learned that the system prompt is the most important piece of code in the entire application. A poorly designed prompt does not just produce bad responses — in a health context, it produces dangerous ones. The investment in prompt engineering, red-teaming, and conservative escalation logic was not optional; it was the product.
We also learned that the CHW dashboard is not a secondary feature — it is what
transforms MomAlert from a consumer tool into a community health
infrastructure. Individual triage is valuable. But giving a health worker
real-time visibility into 50 flagged sessions in her community is a different
order of impact entirely.
What's next for MomAlert
Video triage is the immediate next feature. Users upload a 5-second video of a visible symptom — swollen ankles, skin discoloration, visible distress — and Claude's vision API analyzes the frames alongside the text description. No other maternal health tool does this. It also works for users who struggle to articulate symptoms in text.
SMS and USSD support would extend MomAlert to feature phones with no data plan — which still represent the majority of devices in deep rural Ghana. A woman should not need a smartphone to access triage.
CHW authentication and case management would let workers annotate sessions,
mark follow-ups, and track outcomes over time — turning the dashboard from a
notification surface into a longitudinal care tool.
Supervised community pilot with the Ghana Health Service — deploying MomAlert with a cohort of real CHWs, collecting outcome data, and using that to improve both the prompt and the risk classification thresholds.
The goal is not to stay a hackathon project. The goal is to find out whether
AI can meaningfully reduce the 6-hour number — and we think it can.
Built With
- anthropic
- api
- claude
- i18next
- next.js
- nextauth.js
- sqlite
- tailwindcss
- vercel
- zustand
Log in or sign up for Devpost to join the conversation.