Sift — Hackathon Submission
Inspiration
Disasters often take down connectivity first. We wanted one app that fetches real disaster data when online and shares it device-to-device over Bluetooth when the network is out.
What it does
Sift aggregates live disaster alerts from USGS, NOAA, NASA EONET, and GDACS. A server-side AI agent deduplicates and stores them; connected phones get alerts in real time over WebSocket. When there’s no internet, phones form a BLE mesh: they advertise and scan for other Sift devices and relay alerts and chat locally. Alerts are shown in a list and on a map.
How we built it
Backend: FastAPI + Uvicorn, scheduled AI agent hitting the above APIs plus Tavily, WebSockets for push, JSON storage. Client: React Native (Android/iOS) with react-native-ble-plx and react-native-multi-ble-peripheral for central + peripheral BLE. One WebSocket per device on client and server to avoid duplicate connections.
Challenges we ran into
The client was opening multiple WebSockets (re-renders/Strict Mode), causing duplicate registrations and status flicker—we fixed it by closing the previous socket before opening a new one and only treating the “current” socket’s close as a disconnect. We also hit 404 on /ws because the client was hitting port 80 (nginx) instead of the FastAPI port; we fixed the URL and documented firewall rules. On the server we used a venv to work around externally-managed Python and added logic to close old connections when the same device reconnects.
Accomplishments that we're proud of
End-to-end flow from multiple APIs and AI to real-time push and BLE relay. Offline-capable alerts and chat. One React Native codebase for both platforms with a clear split between server (aggregation, push) and client (UI, local storage, mesh).
What we learned
WebSocket lifecycle needs one active socket per client and careful handling of “current” vs replaced sockets. BLE central + peripheral in one app works with the right RN libraries. Firewall and port config are easy to miss when moving off localhost.
What's next for Sift
Multi-hop BLE relay, backend, location-based alert filtering, simple history/trends, and native push when the app is in the background.
Built With
- amd
- android-studio
- fastapi
- ios
- react-native
- xcode
Log in or sign up for Devpost to join the conversation.