Skip to content

Zunairah-k/Fractal

Repository files navigation

Fractal - Health Triage Assistant

Know before you go.

Live App · Report an Issue


What is this?

That moment at 2am when your chest hurts and you don't know if it's anxiety or something serious. When your kid twists their ankle and you can't tell if it's broken. When your mom has a fever and googling symptoms is making everything worse.

Fractal is for that moment.

Describe what you're feeling, answer a few focused questions, and get a clear answer - go to the ER, visit urgent care, or handle it at home. Not a yes or no. A real answer with possible explanations, exactly what to tell your doctor, what to watch for tonight, and what to do right now.


Features

Two assessment paths

  • Emergency - 6 fast, targeted questions when you need help urgently. Every question directly impacts the triage decision. No fluff.
  • Standard - 8 detailed, system-specific questions when you want to understand what's actually going on.

15 symptom categories Chest & Heart · Head & Neurological · Injury & Limbs · Breathing · Stomach & Digestive · Fever & Infection · Skin & Allergic Reaction · Eyes & Vision · Ear Nose & Throat · Mouth & Dental · Back & Spine · Joints & Muscles · Urinary · Mental & Emotional · Something Else

5 triage levels Go to ER · Visit Urgent Care · See a Doctor Soon · Monitor at Home · Treat at Home

What the result tells you

  • A plain-language verdict - not a label, an actual explanation
  • 2-4 possible conditions ranked by likelihood with reasoning
  • What it's probably not, so you stop spiraling
  • A doctor script you can literally read aloud or show on your phone
  • Specific questions to ask when you get there
  • Red flags to watch for in the next 24-48 hours
  • What to do right now, specific to your symptoms and what you've already taken
  • What not to do
  • Medication commentary - whether what you've taken is appropriate, concerning, or needs a pharmacist

Home Care Plan For home-treat results - a day-by-day care plan with evidence-based remedies and one clear line: exactly when this stops being okay to manage at home.

PDF Export For ER, Urgent Care, and See Doctor results, a clean structured summary you can hand to a doctor.

Session History Every assessment saved locally on your device. If your new result is more severe than your last check, Fractal tells you.

Mental Health Safety If you indicate thoughts of self-harm at any point, Fractal stops the assessment immediately and shows crisis helpline numbers. iCall and Vandrevala Foundation — free, confidential, 24/7.

No login. No account. No data sold. Fully anonymous. History stays on your device only.


Tech Stack

Layer Tech
Frontend React, TypeScript, Tailwind CSS, Framer Motion
Backend Supabase (PostgreSQL + Edge Functions)
AI Gemini 2.5 Flash

Getting Started

git clone https://github.com/Zunairah-k/Fractal.git
cd Fractal
npm install
npm run dev

You'll need a .env file with your Supabase credentials.

The AI calls run through a Supabase edge function (supabase/functions/assess/index.ts) using the Lovable AI gateway, so those won't work locally without the right keys, but the full UI flow will.


Project Structure

src/
├── components/
│   ├── AssessmentFlow.tsx    # Full question flow, both paths
│   ├── EmergencyResult.tsx   # Full-screen emergency result
│   ├── LandingPage.tsx       # Landing page
│   ├── LoadingScreen.tsx     # Loading state
│   └── ResultScreen.tsx      # Standard result card
├── lib/
│   ├── history.ts            # localStorage session history
│   ├── pdf-export.ts         # PDF generation
│   └── utils.ts
├── pages/
│   ├── Index.tsx             # App state and routing
│   └── HistoryPage.tsx       # Past assessments
├── types/
│   └── assessment.ts         # Types, body systems, questions
supabase/
└── functions/
    └── assess/
        └── index.ts          # Edge function — AI call + DB

Disclaimer

Fractal is an informational tool only. It is not a substitute for professional medical advice, diagnosis, or treatment. Always consult a qualified healthcare professional. In an emergency, call your local emergency services immediately.


Author

Built by Zunairah

Fractal is the first project I built using Lovable - an AI-powered fullstack builder, to see how far you could take a real idea in a single sitting. Turns out, pretty far. The AI wrote a lot of the scaffolding but the product decisions, the problem framing, what actually matters in a health tool, that part was me.

About

Health triage tool - Describe what you're feeling, answer a few focused questions, and get a clear answer - possible conditions, a doctor script, red flags to watch, and a home care plan if you can treat it at home.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages