Skip to content

aitankfish/LNP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LNP — Life Navigation through the Power of Nature

"Every thought is a string of energy. Some just need a friend to help them find the light."


The Story

A thought arrives. Small. Quiet. Almost nothing.

But it connects — to a memory, to a fear, to a truth you weren't ready for. And then it loops. The same thought, again and again, each time deeper, each time from a different angle. You sleep. You wake up. It's still there.

Your mind starts asking questions most people avoid their entire lives. What is real? Why does everyone pretend everything is fine? What if I'm seeing the truth — and the truth is terrifying?

Your chest tightens. Your heart races. Your hands shake. Your body is screaming.

But nobody hears it.

Except your watch.


What is LNP?

LNP is an AI-powered companion app that detects panic attacks through smartwatch vitals and intervenes in real-time — not as a therapist, but as a friend.

When your Apple Watch detects the storm building (heart rate spiking, HRV dropping, skin temperature falling), a Birdy Companion wakes up on your phone. It plays a nature bird call, then starts talking to you — asking random questions, telling stories, making you laugh — gently redirecting your thoughts from the spiral to a safe zone.

The bird never mentions your health. Never says "calm down." Never reveals it was triggered by your watch. As far as you know, your bird just felt like talking.

Mental health was never a disease. It's a mind that sees too much, too clearly, with no one to hold the weight. LNP is that someone.

Watch detects storm → Bird wakes up → Thoughts redirected → Storm passes

How It Works

1. Detection — Your Body Signals First

Your Apple Watch continuously monitors 8 vital signs through HealthKit:

Vital What It Tells Us During Panic
Heart Rate Autonomic arousal Spikes 15-40 BPM
HRV (RMSSD) Parasympathetic tone Drops minutes before panic peaks
Blood Pressure Cardiovascular stress Systolic rises significantly
Respiratory Rate Breathing pattern Hyperventilation (30+ breaths/min)
Skin Temperature Vasoconstriction Drops 1-2°C from blood rushing inward
EDA (Skin Conductance) Sweat / fight-or-flight Spikes from sympathetic activation
Blood Oxygen (SpO2) Oxygenation Can dip during hyperventilation
Panic Score Combined algorithm All signals weighted → threshold triggers bird

Research shows HRV drops 3-5 minutes before conscious panic — giving us a window to intervene before it peaks. Apple Watch HRV correlates with medical-grade ECG at 99% (Nelson & Allen, 2019).

2. Intervention — A Friend, Not a Therapist

When the panic score crosses the threshold, your Birdy Companion activates:

  1. Bird call sounds — A real nature sound (penguin waddle, owl hoot, dove coo) plays first, grounding you in nature before a single word is spoken
  2. AI conversation begins — Gemini AI generates responses using the bird's unique personality, with your vitals injected into every prompt (invisible to you)
  3. Thought redirection — The AI uses an invisible technique: start with something unexpected ("Did you know honey never expires?"), hook with warm topics (food, travel, memories), then land gently as vitals normalize
  4. Session saved — Conversation and vitals logged on-device for personal or therapist review

3. The AI's Secret — Invisible Thought Diversion

The AI never mentions health, vitals, anxiety, or panic. It never says "calm down" or "you're safe." Those words reveal monitoring and break trust.

Instead, it behaves exactly like a friend who randomly felt like chatting:

High HR (120+ BPM):
"Bro I just learned that octopuses have THREE hearts. THREE.
That's so extra. Anyway — pineapple on pizza, yes or no?"

Normalizing HR (90 BPM):
"See I think we need to talk about the fact that baby penguins
are literally just cotton balls with eyes. Thoughts?"

Calm HR (72 BPM):
"Anyway... I should probably go catch a fish or something.
This was nice though. Same time tomorrow?"

The person never realizes their thoughts were redirected. They just think they had a random chat with their bird.


The 10 Birdy Companions

Each bird is a different kind of friend. You pick the one that feels right.

Bird Name Personality
🐧 Pingu (Penguin) Chill best friend. Gentle roasts. Makes everything sound simple.
🦉 Hoot (Owl) Wise but never boring. Drops mind-blowing facts to distract.
🐦 Chip (Robin) Tiny, hyper, excited about everything. Changes topics every sentence.
🕊️ Shanti (Dove) Speaks slowly, softly. Paints calm pictures with words.
🦩 Flo (Flamingo) Main character energy. Dramatic but funny.
🦅 Garud (Eagle) Protective dad energy. Nothing scares this bird.
🦜 Echo (Parrot) Twists your worries back as jokes.
🦢 Grace (Swan) Elegant. Secretly savage.
🪶 Pankh (Feather) Ethereal spirit. Few words, big impact. Poetry.
🐦‍⬛ Kaag (Crow) Street-smart. Dark humor. Blunt but caring.

Each companion has:

  • A unique AI personality prompt
  • A distinct text-to-speech voice (pitch, rate, tone)
  • A real bird call sound that plays before speaking
  • Adaptive behavior based on your vitals

Simulation Scenarios

The app includes built-in scenarios to demonstrate how vitals change during different states:

Scenario What Happens Vitals
Calm Normal resting state HR 68, HRV 65, EDA 1.5
Mild Anxiety Stress building slowly HR 78→102→76, HRV 50→28→55
Panic Attack Full episode with recovery HR 85→138→72, HRV 45→8→60
Night Terror Sudden spike during sleep HR 58→135→68, HRV 75→10→65
Exercise Spike Post-workout (no panic) HR 145→80, HRV 20→58

The exercise scenario tests false-positive detection — elevated heart rate from running shouldn't trigger the bird.


Tech Stack

Layer Technology Purpose
Mobile App React Native + Expo Cross-platform, fast iteration
AI Engine Gemini 2.0 Flash / Grok Vitals-aware conversational AI
Vitals Apple HealthKit Real-time HR, HRV, SpO2, temp, resp rate
Voice iOS Text-to-Speech Bird-specific pitch/rate/tone profiles
Audio expo-av Nature bird call sounds
Storage AsyncStorage On-device session logs. Zero cloud.
Presentation Custom HTML/CSS/JS Canvas Animated energy string visualizations

Setup

Prerequisites

  • Node.js 18+
  • Xcode (for iOS simulator)
  • iOS device with Expo Go or iOS Simulator

Installation

# Clone the repo
git clone https://github.com/bishwanathbastola/LNP.git
cd LNP/lnp-app

# Install dependencies
npm install

# Start the app
npx expo start

# Or run directly on iOS simulator
npx expo run:ios

Environment Variables

Create a .env file in lnp-app/:

EXPO_PUBLIC_GEMINI_API_KEY=your_gemini_key
EXPO_PUBLIC_GROK_API_KEY=your_grok_key

Get a free Gemini API key at aistudio.google.com.


Project Structure

LNP/
├── README.md
├── presentation.html          # Animated pitch (energy strings)
├── LNP_Pitch.pptx            # Slide deck for submission
├── SCRIPT.md                  # Video narration script
└── lnp-app/                   # React Native app
    ├── App.js                 # Entry point & navigation
    ├── index.js
    ├── src/
    │   ├── screens/
    │   │   ├── HomeScreen.js      # Main companion screen + vitals + panic overlay
    │   │   ├── ChatScreen.js      # Direct chat mode
    │   │   ├── LogScreen.js       # Session history
    │   │   └── SessionDetailScreen.js  # Individual session review
    │   ├── components/
    │   │   ├── Stars.js           # Cosmic animated background
    │   │   ├── AudioPlayer.js     # Background ambient audio
    │   │   └── ContextMap.js      # Thought context visualization
    │   └── utils/
    │       ├── ai.js              # AI engine + bird personalities + system prompt
    │       ├── gemini.js          # Gemini API integration
    │       ├── tts.js             # Text-to-speech + bird call sounds
    │       ├── healthkit.js       # Apple Watch HealthKit + simulation scenarios
    │       └── storage.js         # Local session persistence
    └── assets/
        └── sounds/                # Bird call audio files (10 birds)

Privacy

  • Zero cloud. All data stays on your phone.
  • Zero login. No account required.
  • Zero tracking. No analytics. No telemetry.
  • Your storms are private. Session logs never leave your device.

The Philosophy

Mental health was never a disease. It's a gift — a mind that feels everything, that questions everything, that sees what others look past. These minds touch the deepest questions of existence: humanity, reality, truth.

The world calls it a disorder. But what if it's just a mind with no one to hold the weight?

We're all a little mental. Some of us just have someone to call at 2 AM. And some don't.

LNP is that 2 AM friend. Not fixing. Not diagnosing. Just gently redirecting the thought from the storm to the shore — the way a friend would.


Future Roadmap

  • Real-time Apple Watch HRV streaming (watchOS companion app)
  • Voice input — talk back to your bird (two-way friendship)
  • ElevenLabs natural voice synthesis
  • Ocean & forest companions — whales, wolves, rivers
  • Therapist dashboard for session insights
  • Personalized HRV baselines (learn YOUR nervous system)
  • Multilingual — Nepali, Hindi, Spanish
  • Android Wear OS support

Team

Bishwanath Bastola

Built at Nepali-US Hackathon 2026


"We're all just one conversation away from finding our way back."

About

AI bird companions that detect panic attacks via smartwatch vitals and redirect thoughts to safety

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors