LifeLine+ — Real-time Emergency Response Platform for India
██╗ ██╗███████╗███████╗ ██╗ ██╗███╗ ██╗███████╗+
██║ ██║██╔════╝██╔════╝ ██║ ██║████╗ ██║██╔════╝+
██║ ██║█████╗ █████╗ ██║ ██║██╔██╗ ██║█████╗ +
██║ ██║██╔══╝ ██╔══╝ ██║ ██║██║╚██╗██║██╔══╝ +
███████╗██║██║ ███████╗ ███████╗██║██║ ╚████║███████╗+
╚══════╝╚═╝╚═╝ ╚══════╝ ╚══════╝╚═╝╚═╝ ╚═══╝╚══════╝+
"Saving minutes. Saving lives."
LifeLine+ is a high-fidelity, production-grade Demonstration Platform built for the Google Solution Challenge 2026. It serves as a comprehensive showcase of how modern AI, real-time geolocation, and cloud-native architecture can revolutionize emergency response in India.
Note
This platform is currently in Demo Mode, optimized for presentation and speed. Timeouts, driver acceptances, and AI verifications are tuned for immediate feedback during live demonstrations.
The platform is successfully deployed on two different cloud stacks:
- Frontend: LifeLine+
- Backend: LifeLine+ Backend
- Frontend (Vercel): LifeLine+ (Vercel)
- Backend (Render): LifeLine+ (Render)
[Rapid Crisis Response] Accelerated Emergency Response and Crisis Coordination in Hospitality
This project is our submission for the Google Solution Challenge 2026, hosted on the Hack2Skill platform.
Emergency response often breaks down because nearby services, traffic-aware routes, ambulance availability, and police coordination are disconnected. LifeLine+ turns those fragmented steps into one live, mobile-first emergency workflow.
| Area | Implementation |
|---|---|
| 📍 Smart Discovery | Browser geolocation + Google Places API with Distance-first fallback logic to ensure 10+ results for hospitals, doctors, police, and pharmacies |
| 🗺️ Maps | Google Maps JS API with AdvancedMarkerElement, route polylines, traffic layer, dark mode, 2D/tilted satellite 3D toggle |
| 🚑 Emergency Flow | Auto-select nearest open hospital, fetch alternate Directions API routes, rank fastest by traffic ETA |
| 🚐 Ambulance Booking | Stable zone-based ambulance fleet, distance-based simulation timers (1-4 min), Socket.io live GPS simulation with unique unit IDs |
| 📊 Activity Reports | High-fidelity PDF generation with brand branding, user details, and persistent digital verification logic on every page |
| 🤖 AI Health v2.0 | Advanced triage chatbot with session persistence (LocalStorage), robust error handling, transcript export (.txt), and copy-to-clipboard |
| 🚓 Police Alerts | Google Places police station detection around route points, alert broadcast through Socket.io |
| 🏥 Doctors | Google Places-backed nearby doctor/clinic discovery, specialty filter, slots, booking confirmation |
| 🔐 Auth | Enterprise-grade security with failover Google OAuth and Firebase dual-verification logic |
| ⚡ Unified UX | Persistent TopNav/Footer visibility during tracking, minimalist single-column layout, and premium borderless aesthetic |
| 🏆 Gamification | Silver, Gold, and Platinum user levels based on verified emergency service contributions |
| 🖼️ Branded Assets | High-resolution favicon.png and professional SVG-based map markers with "LifeLine+ Service" branding |
| Layer | Tools |
|---|---|
| Frontend | React 18, Vite, React Router, Tailwind CSS, Vite PWA, Firebase Web SDK |
| Maps | Google Maps JavaScript API, Places API, Directions API, Distance Matrix API |
| Realtime | Socket.io client/server |
| Backend | Node.js, Express, Helmet, CORS, Compression, Morgan |
| AI | Gemini 1.5 Flash through backend API |
| Persistence | Optional Firebase Admin Firestore writes with in-memory fallback |
| Deploy | Successfully deployed on Google Cloud Run and Vercel+Render |
Life_Line/
├── backend/
│ ├── lib/
│ │ ├── firebaseAdmin.js
│ │ └── googleMaps.js
│ ├── routes/
│ │ ├── ambulance.js
│ │ ├── booking.js
│ │ ├── police.js
│ │ ├── routes.js
│ │ ├── services.js
│ │ └── verify.js
│ ├── sockets/
│ │ └── handlers.js
│ ├── .env
│ ├── .env.example
│ ├── package.json
│ └── server.js
├── frontend/
│ ├── public/
│ │ └── lifeline.svg
│ ├── src/
│ │ ├── components/
│ │ ├── context/
│ │ ├── hooks/
│ │ ├── lib/
│ │ ├── pages/
│ │ ├── App.jsx
│ │ ├── index.css
│ │ └── main.jsx
│ ├── .env
│ ├── .env.example
│ ├── package.json
│ └── vite.config.js
├── ARCHITECTURE.md
├── CORE_LOGIC.md
├── INSTRUCTIONS.md
├── LICENSE
└── README.md
cd backend
cp .env.example .env
npm install
npm run devBackend runs on http://localhost:5000.
cd frontend
cp .env.example .env
npm install
npm run devFrontend runs on http://localhost:5173.
curl http://localhost:5000/api/healthPrivate secrets belong only in .env. The committed .env.example files use placeholders.
PORT=5000
GOOGLE_MAPS_API_KEY=your_google_maps_api_key
GEMINI_API_KEY=your_gemini_api_key
FIREBASE_PROJECT_ID=your_firebase_project_id
FIREBASE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\nyour_key\n-----END PRIVATE KEY-----\n"
FIREBASE_CLIENT_EMAIL=your_service_account_email
FRONTEND_URL=http://localhost:5173
NODE_ENV=development
DRIVER_RESPONSE_TIMEOUT_MS=5000VITE_GOOGLE_MAPS_API_KEY=your_google_maps_api_key
VITE_GEMINI_API_KEY=your_gemini_api_key
VITE_FIREBASE_API_KEY=your_firebase_web_api_key
VITE_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your_project_id
VITE_FIREBASE_STORAGE_BUCKET=your_project.firebasestorage.app
VITE_FIREBASE_MESSAGING_SENDER_ID=000000000000
VITE_FIREBASE_APP_ID=1:000000000000:web:0000000000000000000000
VITE_FIREBASE_MEASUREMENT_ID=G-XXXXXXXXXX
VITE_BACKEND_URL=http://localhost:5000| Method | Endpoint | Purpose |
|---|---|---|
GET |
/api/health |
Server, Firebase, Maps, Gemini status |
GET |
/api/nearest-services |
Google Places nearby hospitals, police, doctors, pharmacies |
GET |
/api/nearest-services/details/:placeId |
Place details |
GET |
/api/routes/emergency |
Directions API routes with traffic ETA |
GET |
/api/routes/traffic |
Distance Matrix traffic probe |
GET |
/api/ambulance-request/nearby |
Nearby ambulances from live fleet state |
POST |
/api/ambulance-request/request |
Create emergency ambulance request |
GET |
/api/ambulance-request/request/:requestId |
Request status |
POST |
/api/ambulance-request/location-update |
Driver GPS update |
POST |
/api/verify/chat |
Gemini emergency assistant through backend |
GET |
/api/booking/doctors |
Places-backed doctor discovery |
GET |
/api/booking/slots/:doctorId |
Appointment slots |
POST |
/api/booking/appointment |
Book doctor appointment |
GET |
/api/police/stations |
Nearby police stations from Places API |
POST |
/api/police/alert |
Police alert with route context |
cd frontend
npm run buildSet every VITE_* variable in Vercel Project Settings before deploying.
cd backend
npm startSet backend env variables in Render. Use NODE_ENV=production for the real 5-minute ambulance response window.
Recommended checks before deployment:
cd backend && npm start
cd frontend && npm run buildManual flow to validate:
- Open
http://localhost:5173. - Allow location access.
- Sign in with Firebase Google or email fallback.
- Open Emergency Mode.
- Confirm nearest hospital route and route alternatives.
- Book ambulance and watch Socket.io tracking updates.
- Book a doctor appointment and test police alert activation.
- Book a doctor appointment.
LifeLine+ is fully deployable on Google Cloud Run with auto-scaling, HTTPS, and full WebSocket support.
- Install Google Cloud SDK
- Authenticate:
gcloud auth login - Set project:
gcloud config set project YOUR_PROJECT_ID
# Build and deploy backend
gcloud run deploy lifeline-backend \
--source ./backend \
--platform managed \
--region asia-south1 \
--allow-unauthenticated \
--set-env-vars "GOOGLE_MAPS_API_KEY=your_key,GEMINI_API_KEY=your_key,FIREBASE_PROJECT_ID=your_id,FRONTEND_URL=https://your-frontend-url.run.app,NODE_ENV=production"# Build and deploy frontend
gcloud run deploy lifeline-frontend \
--source ./frontend \
--platform managed \
--region asia-south1 \
--allow-unauthenticated \
--set-env-vars "VITE_BACKEND_URL=https://your-backend-url.run.app"Backend:
GOOGLE_MAPS_API_KEY- Google Maps API keyGEMINI_API_KEY- Gemini AI API keyFIREBASE_PROJECT_ID- Firebase project IDFIREBASE_PRIVATE_KEY- Firebase service account private keyFIREBASE_CLIENT_EMAIL- Firebase service account emailFRONTEND_URL- Frontend Cloud Run URL (for CORS)NODE_ENV=production- Production mode
Frontend:
VITE_BACKEND_URL- Backend Cloud Run URL
Both services include health check endpoints:
- Backend:
https://your-backend-url.run.app/health - Frontend:
https://your-frontend-url.run.app/health
| File | Purpose |
|---|---|
| INSTRUCTIONS.md | File-by-file working principles and runbook |
| ARCHITECTURE.md | Mermaid architecture diagrams |
| CORE_LOGIC.md | Emergency pipelines and process flows |
| LICENSE | Project license |
We are the LifeLine+ team, participating in the Google Solution Challenge 2026 hosted by Hack2Skill.
Note: This project was built for hackathon purposes as part of the Google Solution Challenge 2026.
| Member | Role |
|---|---|
| Babin Bid | Team Lead, Full Stack Developer |
| Atanu Saha | Frontend Developer |
| Rohit Kumar Adak | Idea Provider, Tech Architect & Backend Developer |
| Sagnik Bachhar | Researcher |
LifeLine+ is built for rapid coordination, but life-threatening emergencies should still call official Indian emergency numbers such as 108 or 112 immediately.
- Ambulance Acceptance: In production, drivers have several minutes to accept. In Demo Mode, the backend simulates a nearby driver acceptance in exactly 5 seconds, allowing for an immediate transition to the live tracking view.
- Distance-Based Timer: The ETA simulation is no longer fixed. It calculates simulation speed based on the actual road distance—ensuring a realistic flow between 1 to 4 minutes depending on the route.
- Real-time Map Movement: The ambulance marker on the map uses a smooth animation library to simulate actual driving speeds, following the actual road path from the Google Directions API.
Faster response. Safer India.
This project is licensed under the LICENSE file.