Gut Scribe

Inspiration

For years I had the same quiet suspicion: that my body had started keeping a list I was not allowed to read.

Some days a meal sat fine. Other days the exact same meal left me bloated, cramping, and rearranging my afternoon around a bathroom. I was not dramatic about it. I just wanted to know three things:

  • Which foods my body had stopped tolerating.
  • When the reaction actually shows up, because it was almost never right after eating.
  • Why the same food could be harmless on Tuesday and brutal on Friday.

I could not answer any of them. Not because the information did not exist, but because it was scattered across a hundred unrecorded days. My memory was the only database I had, and memory is a terrible witness. By the time I felt bad, the meal that might explain it was already six hours behind me, blurred into everything else I had eaten, skipped, stressed about, or slept badly through. What I needed was not a diet. It was a space to figure it out.

When I finally decided to learn more about it, I found IBS - irritable bowel syndrome. What surprised me was not how common it is, though it is common: roughly 5 to 10 percent of people worldwide, most often between 18 and 45, and around twice as many women as men. What surprised me was that it is not one thing at all:

  • IBS-C leans toward constipation; the story is fibre, hydration, and slow transit.
  • IBS-D leans toward diarrhoea and urgency, often close behind a meal.
  • IBS-M alternates between both, which makes it the hardest to reason about, because any single day contradicts the last one.
  • Post-infectious IBS begins after a gut infection, and people often carry a very clear "before and after" line in their heads.

Then the fellow travellers: SIBO, reflux, coeliac, lactose and fructose intolerance, endometriosis, functional dyspepsia, and inflammatory bowel disease, which is a different illness entirely but shares the same daily burden of tracking and explaining.

I do not claim a diagnosis. I suspect something in that family occasionally visits me, and that is exactly the honest, uncomfortable middle most people are actually standing in: not sick enough to have answers handed to them; not well enough to stop wondering.

So I went looking for people further along the road - in r/ibs, in r/FODMAPS, in chronic illness forums, and above all in the 2 and 3 star reviews of every tracking app I could find. Two star reviews are the most honest writing on the internet; they come from people who wanted the thing to work. The same sentences kept coming back:

  • "It takes too long to log a meal, so I stopped."
  • "It just shows my own data back to me; it never tells me anything."
  • "The AI made something up, so I stopped believing any of it."
  • "I could not give my doctor anything useful."
  • "I cannot use it on a bad day; it is too bright and too busy."
  • "They paywalled the one feature I actually needed."
  • "It lost my history."

Underneath all of it was one wish, said a dozen different ways: help me find what is making me feel awful, and help me prove it to my doctor, without making my worst days harder.

The category had split into camps and left that wish unanswered. Clinical tools were credible but cold and tedious. Friendly trackers were warm but shallow, offering encouragement where an explanation was needed. Intervention apps treated without ever tracking. Very few combined effortless logging, explainable insight, genuine calm, real privacy, and something a clinician would accept. That was the opening.

What it does

Gut Scribe is a calm, local-first IBS companion that turns scattered daily logs into explained patterns.

Logging costs seconds. Friction is the single biggest reason people quit, so nothing starts from a blank form. Voice, photo, barcode, free text, favourites, templates, and one-tap repeats; a symptom is a severity tap, not a questionnaire. One line is plenty.

It works where you actually need it. The diary is SQLite on the device, so logging in a restaurant, on the metro, or mid-flare with no signal is instant. Nothing waits on a network except the OCR technology(can't be helped - for now).

The pattern engine is statistics, not vibes. Every food is scored by how often eating it is followed by symptoms, relative to your own baseline reaction rate, across three non-overlapping attribution bands: same day, a day or so later, and two to three days later. Each band is compared against its own baseline, with a minimum exposure count before anything is classified at all. Foods come back as trigger, watch, safe, or unknown, each with a confidence score that grows with sample size and consistency, and a plain-English explanation: "symptoms followed 7 of 9 onion-containing meals, usually within 4 to 6 hours." Safe foods matter as much as triggers: "zero flare days in 14 exposures" is a sentence that gives somebody their dinner back.

Flare Detective is the investigation surface on top of that engine. It ranks the suspects behind your recent bad days, shows the evidence ramp, the average lag between eating and reacting, which symptom kinds tend to follow, and whether the pattern is worsening, easing, or steady. You can open the actual entries behind any factor, and mark it helpful or wrong.

Comfort Mode is the flare-day interface: dimmed warm palette, less to parse, reminders hushed, no streak pressure, a breathing player, water and a gentle note, plus an affirmation card you can rewrite in your own words. Your log is a tool, not a taskmaster.

Gentle gut movement is eleven evidence-linked routines drawn from the gastroenterology literature rather than a wellness blog: toilet posture and footstool positioning, wind-relieving pose, child's pose, seated twists, cat-cow, diaphragmatic belly breathing, abdominal massage, pelvic floor release, an easy walk, easy cycling, and a gentle flow. Each one carries its sources, its own hand-drawn SVG figure so nothing is hotlinked and everything works offline, and a guided timer with rounds and sides where a held interval makes sense.

A daily gut fact, drawn from a curated set sourced to NIDDK, the NHS, and Monash University, each linked back to the original page. Small, true, and never a scare tactic.

Doctor-ready reports: a written summary, Bristol and symptom charts, and suspected patterns linked to the entries behind them, plus an encrypted share link for a clinician.

Privacy as architecture. Local-first by default, no account needed to start, full CSV and PDF export of your own data, one-tap delete, and cloud sync that is end-to-end encrypted and entirely opt-in.

How we built it

The app is Expo SDK 56 with React Native 0.85, React 19, and Expo Router. The diary is expo-sqlite with Drizzle ORM, Zustand for the store layer, and Reanimated 4 for motion. The marketing site and API are Next 16 on Neon Postgres with better-auth; billing is RevenueCat.

The insights engine is a pure module. It has no database or React Native imports at all, so it runs under bun test in isolation. The repository layer feeds it plain arrays of exposures and symptom events; it returns scored foods with human-readable evidence. That separation is the whole reason we can trust it: the statistics are unit-testable and deterministic, and the AI only narrates what the engine already found. It cannot invent a trigger.

Bowel logs are normalised onto the same 1 to 5 outcome scale as symptoms, with Bristol 1 and 7 scoring highest and blood escalating immediately. Odour is deliberately excluded; it is context, not evidence of a flare.

End-to-end encrypted sync is zero-knowledge against our own server. A random 256-bit sync key encrypts every record with AES-GCM. That key is itself wrapped under a key-encryption key derived from the user's passphrase with PBKDF2-SHA256 at 200,000 iterations, the OWASP floor, paid once per cold start rather than per record. The server stores only ciphertext plus a recovery bundle - the wrapped key, the salt, and the KDF parameters - so a new device re-derives the KEK from the passphrase, unwraps the key, and decrypts. The passphrase never leaves the device, which means we genuinely cannot read anyone's diary. A rotatable vault generation lets a user fence previously trusted devices. Everything is hex on the wire, because a base64 polyfill on Hermes was a dependency we did not want.

The movement routines are illustrated with our own SVG figure set rather than stock art, so they are consistent, themeable, and available offline. Sources are chosen for stability: peer-reviewed landing pages where they exist, plain-language references as an accessible second read.

Pro gating lives in exactly one file. Free covers all core logging, the timeline, basic insights, a deterministic pattern watch, and full CSV export of your own data. Plus covers the doctor PDF, durable encrypted clinician share links, deep correlations, forecasting, cloud sync, health-platform integrations, community insights, and location context.

Challenges we ran into

The attribution bug that made everything look guilty. The first engine credited a symptom to every meal in the preceding 24 hours, so one bad dinner made every chicken lunch that week look like a trigger. The fix was nearest-meal attribution inside each band, scored independently, with a delayed band only earning a label when it out-signals the same-day band. Without that rule, a plain same-day trigger also gets reported as a slow one, and the user stops believing any of it.

Proving a negative on a small diary. Confidence has to grow with sample size and consistency, and the app has to be willing to say "there is not enough history yet; keep logging only what you can." Saying nothing is much harder to design than saying something.

Encryption a real person can recover from. Zero-knowledge means we cannot reset a forgotten passphrase, so the recovery bundle, the key rotation story, and the copy explaining that trade-off took as long as the cryptography itself.

Expo SDK 56 moved under us. Edge-to-edge rendering broke Android's adjustResize, so every input screen needed an explicit keyboard-avoiding strategy. The new native global fetch rejects Headers instances outright, which surfaced as a baffling auth cast error until we supplied a custom fetch implementation. Health Connect on Android 14 needed an activity-alias the library plugin omits, and since the native project is regenerated by prebuild, the fix had to become a local config plugin. Native modals needed their own gesture root or Android users would rage-tap buttons that never fired.

Making a flare-day interface that is genuinely usable. Comfort Mode is not a dark theme. Dimming the palette while keeping contrast accessible, cutting motion without the screen feeling dead, and hushing notifications without hiding anything the user needs took several passes.

Accomplishments that we're proud of

  • The end-to-end encrypted sync structure. Multi-device history with a server that holds nothing but ciphertext. The privacy promise is enforced by mathematics rather than by a policy page.
  • Comfort Mode. A real, designed answer to "I cannot use this app on a bad day," which is the complaint almost nobody in the category had bothered to solve.
  • A pattern engine built on statistics, not AI summaries. Baselines, lift, lag bands, confidence, and classification are all deterministic and unit-tested. Language models narrate; they never adjudicate. That ordering is the most important architectural decision in the product.
  • Flare Detective. It represents the thing a person with IBS is already doing in their head every day, done properly: ranked suspects, evidence you can open and inspect, typical lag, the symptom kinds that follow, and a trend arrow saying whether it is getting worse. It says "association, not diagnosis" and it means it.
  • The gentle exercises. I have not seen another IBS app ship guided, source-linked gut routines with original illustrations that work offline. Toilet posture alone has decades of clinical literature behind it and almost no consumer app mentions it.
  • Non-predatory pricing. Core logging, your own timeline, and export of your own data are free forever. There is a lifetime plan, capped at 50 slots, for people exhausted by subscriptions - and its availability logic is deliberately asymmetric: "sold out" is sticky and cached so we never advertise a plan we have stopped honouring, while an unknown answer stays optimistic so a network hiccup does not hide a purchase from somebody who wants it.

What we learned

Consistency and relevance are the same problem. A design system that repeats itself is only calming if each repetition carries its own weight. The discipline was making every card, tile, and metric look like it belongs to the same family while earning its place on that particular screen.

Ask for input only where it changes the answer. Every field is a tax on somebody having a bad day. A severity tap and a food name buy almost all of the statistical power; portion sizes, brands, and exhaustive macros buy very little and cost you the habit. We cut relentlessly, and asked properly only for what the engine genuinely needs.

How much is actually known about the gut. Researching the daily fact set meant reading NIDDK, the NHS, and Monash end to end: the gut-brain axis, why IBS shows no visible damage, why subtypes are classified by stool form, why soluble fibre behaves differently from insoluble, why portion size changes FODMAP tolerance, why low FODMAP is a three-phase process ending in personalisation rather than permanent restriction. That reading changed the product, not just the copy. It is the reason the app refuses a universal blacklist and insists that your pattern is yours.

Trust is lost in one sentence. A single fabricated or over-confident insight would undo months of careful work, which is why explainability and confidence scoring stopped being features and became constraints.

Needs have to be met on every front at once. People do not only need answers. They need a bad day made smaller, a body they feel less at war with, something to show a doctor, and a price that does not punish them for having a chronic condition. Any one of those missing makes the others worth less.

What's next for Gut Scribe

  • More movement, better evidence. Expanding the routine library under the same rule: a citation, or it does not ship.
  • Feature Requests model Hear what the end user has to say about how well the product helps them and let it shape the long-term vision.
  • Axle Axolotl mascot I've been considering for the app. It's a hypersensitive, yet resilient creature that perfectly sums up what gut health entails. Sensitive through the hard days but resilient enough to withstand the pressure.

Built With

Share this project:

Updates

Submission history