import React, { useState, useEffect } from 'react';
import {
Sun,
ArrowRight,
ArrowLeft,
Heart,
Brain,
Activity,
Home,
CheckCircle2,
FileText,
Clock,
Zap,
Shield,
Dna,
Printer,
ChevronRight,
AlertTriangle,
MoveUp,
Sparkles,
Timer,
Thermometer,
Eye,
Microscope,
Info,
ChevronDown,
Droplets,
Scale
} from 'lucide-react';
// --- DATA: RESEARCH DATABASE (Comprehensive Citations from PDFs) ---
const researchDB = {
// Personalized Logic Mappings
"Insulin Resistance": { title: "Glycemic Kinetic Restoration", text: "Movement acts as 'invisible insulin,' bypassing resistance via GLUT4 translocation to lower blood sugar by 58%.", cite: "DPP Research Group (2002). NEJM." },
"Elevated HbA1c": { title: "Metabolic Barrier Offset", text: "Structured activity reduces the risk of Type 2 Diabetes by 58%, nearly doubling the efficacy of Metformin.", cite: "Diabetes Prevention Program (2002)." },
"Knee Osteoarthritis": { title: "Synovial Mechanotransduction", text: "Exercise therapy is clinically superior to NSAIDs for pain reduction (SMD 0.54) by lubricating joint cartilage.", cite: "JOSPT (2022)." },
"Lumbar/L4-L5 Pain": { title: "Threat Signal Modulation", text: "Strength training reduces the brain's 'threat' output, effectively acting as a natural analgesic for chronic back pain.", cite: "JOSPT (2022)." },
"Brain Fog": { title: "Hippocampal Neurogenesis", text: "Aerobic activity increases brain blood flow by 20% and can reverse age-related memory loss by 1-2 years.", cite: "Erickson et al. (2011). PNAS." },
"Memory Lapses": { title: "White Matter Preservation", text: "Intentional movement triggers BDNF release, which acts as 'fertilizer' for new neurons in memory centers.", cite: "Erickson et al. (2011)." },
"Fear of Falling": { title: "Neuromotor Resilience", text: "Targeted balance and power interventions reduce the rate of multiple falls by 55%.", cite: "CDC / Stevens & Burns (2015)." },
"Balance Instability": { title: "Rate of Force Development", text: "Power training improves step-velocity by up to 4.5% per session, preventing trips from becoming fractures.", cite: "Stevens & Burns (2015)." },
"Sit-to-Stand Weakness": { title: "Functional Agency Protection", text: "Improving physical 'power' reduces the hazard of developing activities of daily living disability by 53.6%.", cite: "Wang et al. (2024). PubMed Central." },
"Stair Ascent Difficulty": { title: "Independence Stewardship", text: "Combined physical and mental activity reduces ADL disability risk by 53.6% in the oldest-old populations.", cite: "Wang et al. (2024)." },
"Vascular Stiffness": { title: "Endothelial Elasticity", text: "Meeting movement guidelines reduces cardiovascular death risk by 20-30% by keeping artery walls elastic.", cite: "Lee et al. (2022). Circulation." },
"Hypertension": { title: "Vascular De-Stiffening", text: "Aerobic training releases Nitric Oxide, a potent vasodilator that lowers resting blood pressure by 5-8 mmHg.", cite: "AHA Circulation (2022)." },
// Nutrition & Hydration Specifics
"anabolic_low": { title: "Anabolic Resistance Override", text: "Senior muscle requires 1.2g/kg of protein combined with resistance to trigger synthesis pathways blunted by age.", cite: "ESPEN (2014)." },
"dehydration": { title: "Thirst Signal Re-Calibration", text: "Age blunts the thirst reflex. Scheduled hydration is critical for adenosine clearance and cognitive acuity.", cite: "Kline et al. (2011)." },
"low_fiber": { title: "Glycemic Buffering", text: "Fiber reduces systemic inflammatory triggers and works alongside movement to stabilize insulin kinetics.", cite: "Bird & Hawley (2017)." },
// Global/Universal
longevity: { title: "Life Expectancy Extension", text: "Transitioning to activity adds 0.4 to 4.2 years of life. Every hour moved adds hours of future energy back to you.", cite: "Strain et al. (2024). BJSM.", icon: },
anxiety: { title: "Emotional Resilience", text: "Physically active individuals have a 60% lower risk of developing anxiety disorders over the long term.", cite: "Svensson et al. (2021). Frontiers in Psychiatry.", icon: },
telomeres: { title: "9-Year DNA Reset", text: "Active adults possess telomeres equating to a biological age 9 years younger than sedentary peers.", cite: "Tucker (2017). Preventive Medicine.", icon: },
vascular: { title: "Vascular Elasticity", text: "Meeting guidelines reduces heart disease death risk by 20-30% by keeping artery walls elastic.", cite: "Lee et al. (2022). Circulation.", icon: }
};
export default function App() {
const [step, setStep] = useState(0);
const [user, setUser] = useState({ track: '', health: [], habits: {}, nutrition: [] });
const [progress, setProgress] = useState(0);
useEffect(() => {
setProgress((step / 5) * 100);
}, [step]);
const toggleHealth = (h) => {
setUser(prev => ({
...prev,
health: prev.health.includes(h) ? prev.health.filter(x => x !== h) : [...prev.health, h]
}));
};
const selectHabit = (key, val, label) => {
setUser(prev => ({ ...prev, habits: { ...prev.habits, [key]: { val, label } } }));
};
const toggleNutri = (n) => {
setUser(prev => ({
...prev,
nutrition: prev.nutrition.includes(n) ? prev.nutrition.filter(x => x !== n) : [...prev.nutrition, n]
}));
};
// --- VIEW: THE IMPACT LANDING ---
const LandingPage = () => (
{/* SIDE A: THE COST (DECAY) */}
The Cost of Stagnation.
The CDC and WHO classify inactivity as a Global Emergency.
Without movement, the body enters a state of rapid decay:
#3 Leading Cause of Premature Death
$117 Billion in annual healthcare waste
Increased risk of Nursing Home Admission
{/* SIDE B: THE CATALYST (RECLAMATION) */}
The Clinical Catalyst
The Power of Intent.
Intentional activity is the most potent intervention in modern medicine.
A few targeted minutes can Reverse the Clock:
+4.2 Years of high-quality life gained
58% Reduction in Diabetes onset
9-Year biological DNA reset
{/* STRIKING PIVOT BUTTON */}
);
const StepCard = ({ tag, title, desc, children, onNext, onBack }) => (
{tag}
{title}
{desc}
{children}
);
// --- SELECTION SCREENS ---
const PrioritySelection = () => (
user.track && setStep(2)} onBack={() => setStep(0)}>
{[
{ id: 'metabolic', label: 'Metabolic & Cardiovascular Health' },
{ id: 'ortho', label: 'Orthopedic & Pain Restoration' },
{ id: 'neuro', label: 'Cognitive & Neurological Vitality' },
{ id: 'independence', label: 'Independence & Kinetic Power' }
].map(t => (
))}
);
const HealthSnapshot = () => {
const options = {
metabolic: ["Insulin Resistance", "Elevated HbA1c", "Visceral Adiposity", "Statin Dependency", "PM Fatigue", "Vascular Stiffness", "Hypertension", "Dyslipidemia"],
ortho: ["Knee Osteoarthritis", "Lumbar/L4-L5 Pain", "Morning Stiffness", "NSAID Dependency", "Shoulder Impingement", "Hip Labral Issues", "Bilateral Foot Pain", "Reduced Grip Strength"],
neuro: ["Brain Fog", "Memory Lapses", "Mild Cognitive Diagnosis", "Balance Instability", "Fear of Falling", "Poor Sleep Architecture", "Neural Fatigue", "Dizziness on Standing"],
independence: ["Stair Ascent Difficulty", "Sit-to-Stand Weakness", "Reduced Walking Velocity", "Grip Strength Decline", "Housework Fatigue", "Sarcopenic Indicators", "Unsteady Ground Issues"]
};
return (
setStep(3)} onBack={() => setStep(1)}>
{options[user.track]?.map(opt => (
))}
);
};
const NutritionAudit = () => (
setStep(4)} onBack={() => setStep(2)}>
{["Cereal/Toast dominant meals", "Struggle with protein intake", "Protein with every meal"].map(o => (
))}
{["Absent thirst signals", "Drink < 3 glasses daily", "Consistent 8+ glasses daily"].map(o => (
))}
{["Processed food focus", "Rarely eat plants/fiber", "Daily whole foods", "Targeted fiber intake"].map(o => (
))}
);
const HabitsHub = () => (
setStep(5)} onBack={() => setStep(3)}>
);
// --- VIEW: RESULTS MAP ---
const ResultsMap = () => {
// Generate results safely
const blocks = [];
user.health.forEach(h => {
if(researchDB[h]) blocks.push({ label: h, data: researchDB[h] });
});
if(user.nutrition.includes("Cereal/Toast dominant meals") && researchDB.anabolic_low) {
blocks.push({ label: "Anabolic Resistance", data: researchDB.anabolic_low });
}
if(user.nutrition.includes("Absent thirst signals") && researchDB.dehydration) {
blocks.push({ label: "Hydration", data: researchDB.dehydration });
}
if(user.nutrition.includes("Rarely eat plants/fiber") && researchDB.low_fiber) {
blocks.push({ label: "Fiber", data: researchDB.low_fiber });
}
// Universal list (ensuring items exist in DB)
const universal = [
researchDB.longevity,
researchDB.anxiety,
researchDB.telomeres,
researchDB.vascular
].filter(Boolean);
return (
Your Physiological Map
Analysis ID: OHS-{Math.floor(Math.random()*90000)}
Surveillance Ledger: Research-Set-V2
{new Date().toLocaleDateString()}
{/* Top Outcomes Grid */}
+4.2y
Added Life quality extension
+2%
Hippocampal volume recovery
58%
Metabolic risk offset
Personalized Research Correlations
{blocks.length > 0 ? blocks.map((b, i) => (
Target: {b.label}
{b.data.title}
{b.data.text}
Ref: {b.data.cite}
)) : (
No specific hurdles selected. Universal benefits applied.
)}
Universal Vitality Surveillance
{universal.map((c, i) => (
{c.icon}
{c.title}
{c.text}
{c.cite}
))}
Patient Assessment Input Summary
Clinical Markers Identified:
{user.health.length > 0 ? user.health.map((h, i) => (
-
{h}
)) : - None identified
}
Lifestyle & Nutrition Context:
{user.nutrition.map((n, i) => (
-
{n}
))}
{Object.entries(user.habits).map(([k, o], i) => (
-
{o.label}
))}
Clinical Reference Registry (Works Cited)
- • Strain, T., et al. (2024). BJSM. All-Cause Mortality Advantage.
- • DPP Research Group. (2002). NEJM. Metabolic risk mitigation.
- • Erickson, K. I., et al. (2011). PNAS. Brain regeneration metrics.
- • Wang, Y., et al. (2024). PMC. Functional disability avoidance.
- • Stevens, J. A., & Burns, E. R. (2015). CDC Compendium of Falls.
- • Tucker, L. A. (2017). Preventive Med. Telomere length & DNA Age.
- • Lee, D. H., et al. (2022). Circulation. Cardiovascular Mortality.
- • Svensson, M., et al. (2021). Frontiers. Anxiety long-term risk.
- • JOSPT. (2022). Exercise vs Pharmacology for Osteoarthritis.
- • ESPEN. (2014). Clinical Nutrition and Metabolic guidelines.
Secure Priority Consultation
);
};
return (
{step > 0 && step < 5 && (
)}
{step === 0 &&
}
{step === 1 &&
}
{step === 2 &&
}
{step === 3 &&
}
{step === 4 &&
}
{step === 5 &&
}
);
}