Case study · iOS · 2026

Fasting, in phase with the body it's for.

Most fasting and fitness research was done on men. Phasely adjusts fasting windows, food and movement to five phases of the menstrual cycle, and its AI coach tells you where the experts disagree instead of pretending they don't.

Role
Design, code, brand, launch
Team
Solo
Platform
iOS, Expo React Native
Build phase detail: estrogen, progesterone and testosterone curves with today's position marked
Today screen in the Soften phase, suggesting a 12–13 hour fast with a Start fast button
AI coach answering whether to fast in the late luteal phase by laying out two expert camps

The five phases · 28-day reference cycle

Boundaries scale with your own cycle length

ResetMenstrual · days 1–5
BuildFollicular · days 6–10
PeakOvulatory · days 11–15
SustainEarly luteal · 16–19
SoftenLate luteal · days 20–28

The problem

One protocol, every day of the month.

Generic 16:8 apps

Fasting apps hand everyone the same window. Insulin sensitivity, stress tolerance and energy shift across the cycle, so the same fast that suits Build can work against you in Soften.

Confident, contradictory advice

Experts genuinely disagree on cycle-synced fasting. Some say fast less in the luteal phase, others say the effect is smaller than claimed. Most products pick one voice and present it as fact.

Health advice without guardrails

Fasting is not safe for everyone. Pregnancy, a history of eating disorders, medicated diabetes and untreated thyroid conditions all need a clear no, not a gentle nudge.

The AI coach

A coach that shows both sides.

The coach answers from a knowledge base I sourced and structured by hand, not from the model's memory. Every question takes one of four paths, decided by how closely it matches what the knowledge base holds.

Auth→Rate limit→Embed · text-embedding-3-small→
  1. 1 · safety_routingRed-flag symptoms. The coach responds with care, recommends a doctor and never diagnoses.≥ 0.40 · top 3
  2. 2 · disagreement_mapA known contested question. Each expert camp's answer is laid out and the disagreement is named.≥ 0.70 · best 1
  3. 3 · standardEverything else. Up to eight passages go to Claude Haiku 4.5, which cites each claim by source id.≥ 0.45 · top 8
  4. 4 · no_retrievalNothing relevant in the knowledge base. The coach says so instead of guessing.no match

Paths are checked in this order; the first that matches wins. Today's phase and cycle day are added to the prompt at generation, not used to filter retrieval. Answers stream token by token, and the last four messages of a session carry over as memory.

Coach answering a question about fasting in the late luteal phase: experts genuinely disagree, then each camp's position

The knowledge base

172 retrieval units, six expert camps.

I mapped the field into six camps, from strongly pro cycle-synced fasting to openly sceptical, and wrote each position as one claim per chunk with its author attached. Two flags travel with every chunk into the prompt: contested, and harm reduction, which tells the model never to amplify restriction.

172retrieval units in the live index
145 expert positions 15 peer-reviewed studies with DOIs 12 disagreement maps

Disagreement maps pre-answer the questions people actually ask, such as "Should I fast during my period?" or "I have PCOS, should I try fasting for it?", with every camp's view side by side.

Expert positions by camp

Pro cycle-synced fasting
45
Anti-fasting, cycle-synced
27
Anti-fasting for athletes
20
Glucose-centric
20
Evidence-based middle
18
Scientific sceptics
15

Bars to scale. Post-menopausal users get a retrieval boost on the peer-reviewed studies.

Meal insight: a photo of sliced veal with tuna sauce, the detected foods as chips, low inflammation and a Build-phase comment

Meal photos

Two models, one honest answer.

Snap a meal and the coach reads it against your current phase. A larger model does the looking, a fast one does the talking, and the same knowledge base grounds the comment.

  1. 01Check ownershipThe photo path must belong to the signed-in user before anything is read from storage.
  2. 02See the plateClaude Sonnet 4.6 returns strict JSON: foods, an inflammation score from 1 to 10 and rough macros. A parse failure falls back gracefully instead of crashing.
  3. 03Ground itThe food list is embedded and matched against the knowledge base, top eight passages.
  4. 04Say it kindlyClaude Haiku 4.5 streams a phase-aware comment. Its prompt forbids being alarmist about inflammation.

sliced veal tuna sauce (tonnato) capers Low inflammation

Safety and privacy

Conservative by default.

Phasely suggests, it doesn't instruct. The guardrails are part of the product, built into onboarding, the coach and the backend.

Onboarding screens people out

  • An 18+ age gate with a clean exit
  • Exclusion screening for nine conditions, including pregnancy, breastfeeding, eating disorder history, medicated diabetes and untreated thyroid disorders
  • Perimenopause gets an honest "not a fit yet" with no promises, and post-menopause its own phase template

The coach knows its limits

  • Explicit consent before any question or meal photo reaches Anthropic
  • Safety routing sends red-flag symptoms to a doctor
  • Free tier capped at 10 lifetime questions, enforced in a Postgres function, not in the app

Health data stays minimal

  • Apple Health: reads menstrual flow history, writes only mindful sessions, and only when you opt in
  • Row-level security on every user table, EU-region Supabase
  • Export your data or delete your account from Settings

Shipping it

App Review, and the bugs only real phones find.

Getting from a working simulator build to a stable App Store app took longer than building the features. Each round taught me something the docs didn't say.

  1. v1.0First review

    Three guideline questions, one rebuild

    Review asked where the HealthKit integration lived (2.5.1) and how to find the disclosures (2.1), answered with a walkthrough and a screen recording. Guideline 5.1.2(i) needed real work: a consent screen before the coach that names what is sent, and to whom.

    Approved
  2. v1.0.2July 2026

    Rejected as "a pre-release with a limited feature set"

    Guideline 2.2. The reviewer had screenshotted the perimenopause exit screen, whose "come back in a few months" read as an admission of an unfinished feature. I rewrote it as a deliberate scope decision, kept guest mode so reviewers see the real app without an account, and fixed a chain of offline and cold-start traps on the way: unguarded awaits during onboarding, a profile overwrite race and an infinite coach spinner.

    Guideline 2.2
  3. v1.0.4Sept–Oct 2026

    The app froze after an hour in the background

    The root cause was a deadlock inside Supabase's auth library: the auth state listener awaited a profile fetch while the client was still initialising, and each waited on the other. The fix was upgrading supabase-js and making the listener synchronous, then a full day of real-world cold starts before resubmitting.

    Root cause, not a timeout

The store listing

Marketing visuals, made by an agent.

The App Store screenshots are real app screens, composed headlessly in PhotoCraft, an open-source Photoshop rebuild, by an AI agent from a script: gradient, phase-coloured haze, Lora headline, drawn device frame. Fourteen commands per image, re-rendered in seconds when the app changes.

Store screenshot: Fasting that follows your cycle Store screenshot: See where your hormones are today Store screenshot: A coach that shows both sides Store screenshot: Five phases. One clear calendar. Store screenshot: Eat and move, in phase.

Under the hood

Small stack, sharp edges handled.

87 unit tests cover the phase calculator, the meal pipeline, citation stripping, data export, account deletion and privacy compliance.

App
Expo SDK 54, React Native, TypeScript, Expo Router
State
Zustand, TanStack Query
Backend
Supabase: Postgres with row-level security, pgvector, Auth, Storage
Edge functions
coach-respond, analyze-meal, export-user-data, delete-account
Models
Claude Haiku 4.5 (coach, meal comments), Claude Sonnet 4.6 (meal vision), OpenAI text-embedding-3-small
Health
HealthKit via react-native-healthkit
Site
Astro on Vercel, phasely.today

What it taught me

The hardest part of an AI health app isn't the model. It's deciding what it should refuse to say, and proving it holds up on a real phone.