Skip to content

tanvi-dotcom/LifeLine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LifeLine Full Local System

Production-structured crisis resilience platform for emergency health operations.

What is included

  • Secure authentication (JWT + hashed passwords)
  • Country-aware access control (Lebanon, Palestine, Turkiye, Italy, Spain)
  • Hospital overload prediction dashboard (24-48h horizon)
  • Rapid triage scoring engine
  • Resource referral guidance
  • Gemini-powered operational advice endpoint (optional)
  • Responsive web UI for laptop and mobile
  • Local-first setup with file-backed JSON persistence

Architecture

  • backend/ - Express + TypeScript + file-backed datastore + AI/decision services
  • frontend/ - React + Vite + TypeScript responsive dashboard

Quick start (local)

  1. Install dependencies
npm run install:all
  1. Configure backend env
cp backend/.env.example backend/.env

Set:

  • JWT_SECRET with a strong secret (20+ chars)
  • GEMINI_API_KEY with your private key (optional but recommended for AI advice)
  • CORS_ORIGIN can be a comma-separated list for fixed frontend origins. Localhost ports are allowed automatically for local runs.
  1. Configure frontend env
cp frontend/.env.example frontend/.env
  1. Start backend
npm run dev:backend
  1. Start frontend (new terminal)
npm run dev:frontend
  1. Open
  • Frontend: http://localhost:5173
  • Backend health: http://localhost:4000/health

Production-ish local run

npm run build
npm run start:backend

Serve frontend/dist with any static host if needed.

Auth behavior

  • Register with email + password + country
  • Login requires matching selected country
  • First registered user is auto-promoted to admin
  • Non-admin users are restricted to their assigned country

Important security note

Treat API keys as secrets. Keep them only in local .env files and rotate if exposed.

Demo flow

  1. Register as responder.
  2. Open dashboard and review risk board.
  3. Select a hospital and generate AI action plan.
  4. Run triage with sample patient data.
  5. Click Advance Simulation to simulate incoming crisis pressure.

About

Offline AI Emergency Decision Assistant

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages