How charanachanta2/lifelinkai works
LifeLink is an Expo mobile app for civilians and public-service agencies. Its visible crash-alert flow runs from the home screen through sensor monitoring and crash detection to an emergency callback and emergency screen. Other major product areas in the tree include nearby emergency discovery, blood-bank services, health records, analytics, agency incident handling, and account/profile management. Several of those screens were not sampled, so their internal calls and backend relationships are not inferred here.
Main entry points: AuthContext.tsx Session and authentication · index.tsx Home and monitoring · AIEngine.ts Crash processing · emergency.tsx Emergency response
Components 23
Crash alerts
- Home and monitoring
app/(tabs)/index.tsx - Sensor manager
utils/SensorManager.ts - Crash processing
utils/AIEngine.ts - Crash detection
utils/CrashDetection.ts - Crash detector
utils/CrashDetector.ts - Crash model
utils/CrashModel.ts - Emergency callback
utils/EmergencyManager.ts
Civilian services
- Emergency response
app/emergency.tsx - Emergency countdown
components/CountdownCircle.tsx - Find emergency help
app/(tabs)/find-emergency.tsx - Blood-bank services
app/(tabs)/blood-bank.tsx - Health records
app/(tabs)/index.tsx - Activity map
app/(tabs)/map-activity.tsx - Analytics
app/(tabs)/analytics.tsx
Agency operations
- Agency home
components/AgencyHomeScreen.tsx - Agency map
components/AgencyMapScreen.tsx - Incident reports
components/AgencyReportsScreen.tsx - Agency presentation
constants/agency.ts
Identity and account
- Session and authentication
context/AuthContext.tsx - Profile management
app/profile.tsx - Push registration
utils/pushNotifications.ts
Other components
- App user
- LifeLink backend
Connections 29
- App user → Home and monitoring: uses
- Home and monitoring → Sensor manager: starts sensors
app/(tabs)/index.tsx - Home and monitoring → Crash model: loads model
app/(tabs)/index.tsx - Home and monitoring → Emergency callback: registers callback
app/(tabs)/index.tsx - Sensor manager → Crash processing: sends readings
utils/SensorManager.ts - Crash processing → Crash detection: checks crash
utils/AIEngine.ts - Crash detection → Crash detector: uses detector
utils/CrashDetection.ts - Crash processing → Emergency callback: triggers alert
utils/AIEngine.ts - Emergency callback → Emergency response: fires callback
app/emergency.tsx - Emergency response → Emergency countdown: renders countdown
app/emergency.tsx - App user → Find emergency help: finds nearby help
- App user → Blood-bank services: uses blood bank
- App user → Activity map: views activity
- App user → Analytics: views analytics
- App user → Agency home: uses agency tools
- Agency home → Agency presentation: gets role theme
components/AgencyHomeScreen.tsx - App user → Agency map: views agency map
- App user → Incident reports: handles incidents
- Incident reports → LifeLink backend: fetches incidents
components/AgencyReportsScreen.tsx - App user → Session and authentication: signs in
- Session and authentication → Push registration: registers push
context/AuthContext.tsx - Session and authentication → LifeLink backend: auth requests
context/AuthContext.tsx - App user → Profile management: manages account
- Profile management → Session and authentication: reads session
app/profile.tsx - Profile management → LifeLink backend: updates account
app/profile.tsx - Emergency response → Session and authentication: uses session
app/emergency.tsx - Blood-bank services → Session and authentication: uses session
app/(tabs)/blood-bank.tsx - Find emergency help → Session and authentication: uses session
app/(tabs)/find-emergency.tsx - Activity map → Session and authentication: uses session
app/(tabs)/map-activity.tsx