Inspiration

Lifeline was born from the critical need for communication during emergencies when traditional infrastructure fails. We were inspired by disaster scenarios where cell towers go down but people still need to coordinate, share locations, and reach loved ones—whether it's during natural disasters, power outages, or in remote areas with no connectivity.

What it does

Lifeline creates a decentralized mesh network that allows nearby phones to communicate directly via Bluetooth/WiFi without internet, while also bridging isolated groups through a region server when any device has connectivity. Users can send messages, share GPS locations with friends on a live map, and the system automatically routes messages across different WiFi networks (regions) to reach people even when they're not in direct range.

How we built it

We built a Flutter mobile app using Wifi Direct and BLE API for local mesh networking, combined with a Python/aiohttp region server running on Tailscale for cross-network message routing. The app uses SQLite for persistent storage, WebSockets for real-time delivery, and we created an admin dashboard with Leaflet.js maps and heatmap visualization to monitor the entire network in real-time.

Challenges we ran into

Message encoding and parsing proved tricky—we battled UTF-16 encoding errors when handling emoji-prefixed system messages across the mesh network. Handling the constant connect/disconnect nature of mesh networks while maintaining message delivery reliability and keeping the UI responsive required careful state management and robust error handling throughout.

Accomplishments that we're proud of

We successfully built a working cross-region messaging system where messages automatically route through the server when direct mesh connections aren't available, with a beautiful dark red-themed UI. The admin dashboard with live device mapping, heatmap visualization, and message history gives complete visibility into the mesh network—it's genuinely useful for monitoring a real emergency communication system.

What we learned

We learned the complexities of building reliable P2P communication systems—from deterministic region ID generation using SHA256 hashes of WiFi networks, to handling the edge cases of devices constantly joining and leaving the mesh. We also gained experience bridging Flutter's Dart ecosystem with a Python backend and creating real-time monitoring dashboards.

What's next for Lifeline

Next steps include implementing end-to-end encryption for private messages, adding offline message queuing with guaranteed delivery, and building out emergency broadcast capabilities for authorities. We'd also like to add mesh network visualization showing connection topology, battery-aware routing to preserve device power, and potentially integrate with emergency services APIs.

Share this project:

Updates