Inspiration
Most people have been there — something feels off, it's 11pm, and you're spiraling through WebMD convinced it's the worst case scenario. Or the opposite: you brush something off that actually needed attention. The gap between "something feels wrong" and "I know what to do" is stressful, and for people without medical backgrounds, it can be genuinely dangerous. We built Soma because that gap shouldn't exist. Triage shouldn't require a medical degree.
What it does
Soma is a guided symptom checker that walks you through 6 questions and tells you exactly what to do next. It starts with an interactive body map — you tap where it hurts, describe it in your own words, or both. Every answer is scanned in real time for emergency red flags like chest pain, loss of consciousness, or slurred speech. If anything serious comes up, it stops immediately and directs you to call 911. No AI call. No dismiss button. No way around it. For everything else, Gemini analyzes your symptoms and returns a clear disposition — self-care, monitor at home, see a doctor, or urgent care — always backed by a citation from the CDC, NHS, or Mayo Clinic. Past checks are saved so you can track how symptoms change over time, and one tap pulls up licensed providers near you using live government registry data.
How we built it
The backend is FastAPI with Pydantic for strict response validation. The AI layer runs on Gemini 2.0 Flash, which we prompt to return pure structured JSON — disposition, top causes with confidence scores, rationale, and a source ID that must match our curated list of approved citations. If Gemini returns anything invalid, we fall back to a deterministic rule-based result instead of surfacing a broken response. The frontend is React with Vite and Tailwind, built around a single context that drives the whole encounter flow. The body map is a custom interactive SVG diagram with front and back views. Provider lookup uses the free NPPES NPI Registry — a government-maintained database of every licensed US physician, no API key required. History is stored in a local CSV file — no database, no accounts, no personal data retained.
Challenges we ran into
The hardest problem was the safety layer. A substring match for "chest pain" sounds simple until a user types "I do not have chest pain, just a sore throat" — and you've just sent someone to a fake emergency screen. We built negation-aware detection with a bounded context window that looks back 30 characters before any matched phrase to check for negation words. It correctly handles "no chest pain" as safe while still catching "sharp chest pain but no fever." Getting that logic right before touching any AI code was the constraint we set for ourselves, and it took longer than expected. The other challenge was prompt reliability — getting Gemini to return clean JSON with a valid source ID every single time, without markdown fences or preamble, required careful prompt engineering and a fallback path that never lets a bad model response reach the user.
Accomplishments that we're proud of
We're proud that the safety path works exactly as designed — "chest pain" stops the flow cold every time, and "I do not have chest pain" never triggers a false alarm. We're proud that the app always returns a result, even when the AI fails, because the fallback is deterministic and honest rather than a broken screen. And we're proud of the body map — it started as a quick idea and turned into the most intuitive part of the whole experience. Watching someone tap their knee and have the app immediately understand "left knee pain" felt like the product clicking into place.
What we learned
We learned that in health tech, the failure modes matter more than the happy path. We spent more time designing what happens when things go wrong — model timeouts, invalid JSON, unknown source IDs, negated red flags — than we spent on the core feature. We also learned that restraint is a feature. Every time we were tempted to add something clever, the right answer was usually "does this make the result more trustworthy, or just more complicated?" Soma works because it does one thing and refuses to pretend it does more.
What's next for Checkup
We want to expand the body map with more anatomical detail and symptom layering — letting users mark multiple areas and describe the relationship between them. On the safety side, we want to move from phrase matching toward lightweight semantic detection that can catch colloquial descriptions like "elephant on my chest" that a substring matcher will always miss. Longer term, we see Soma as a triage layer that sits in front of telehealth — not replacing doctors, but making sure people show up to those conversations knowing what to ask and why.
Log in or sign up for Devpost to join the conversation.