Inspiration

The idea stems from the real-world issue of "The Golden Hour" in medical emergencies. When witnessing someone collapse or suffer a heart attack, people tend to panic, forget how to perform first aid, and waste precious time just searching for the nearest hospital's contact number. We wanted to create a solution like an autonomous 911 system that is ready to guide users instantly.

What it does

S!GAP acts as an AI-powered Autonomous Emergency Medical Dispatcher. Users simply press a single button and describe the victim's emergency situation via voice. Our AI provides real-time first aid instructions through voice (Text-to-Speech), and if the condition is deemed critical, the app automatically triggers an emergency call to the nearest healthcare facility without the need to type anything.

To make the emergency response even faster, we also built a dedicated Android home-screen widget. This allows users to trigger the AI voice assistant with a single tap right from their home screen without having to open the main app, saving crucial seconds during a panic situation.

How we built it

We divided the system into two main components that work in real-time:

  • Mobile Frontend: Built natively using Android (Kotlin & Jetpack Compose) to ensure smooth performance and stable hardware integration (microphone and dialer).
  • Backend & AI: Uses Node.js (Express) hosted on an IDCloudHost VPS. Data communication is handled via Socket.io. For the AI brain, we use the Gemini 3.1 Flash-Lite API, instructed with JSON Mode deterministically.

Challenges we ran into

Our biggest challenge was designing strict Prompt Engineering so the AI would not hallucinate and would always return a consistent JSON state. We also had to synchronize the Socket.io state with the Jetpack Compose UI on Android so the app remains responsive even during momentary connection drops. Additionally, managing the network latency and synchronizing the AI's response with the native Text-to-Speech (TTS) engine was a significant hurdle to ensure the audio instructions played back seamlessly without awkward delays.

Accomplishments that we're proud of

We are incredibly proud to have integrated such a seamless flow in a short amount of time. From the user speaking, the text being processed by AI, to the Android app responding with voice instructions and automatically opening the phone screen to the referral hospital. Taking it a step further, we successfully built a native home-screen widget that cuts down the response time to just a single tap, ensuring immediate life-saving action without manual intervention.

What we learned

During these 30 hours, we learned a lot about independent server infrastructure management, optimizing LLM models to produce structured data (not just text), and diving deep into declarative UI architecture using Jetpack Compose.

What's next for S!GAP: Autonomous Medical Dispatcher

Moving forward, we want to integrate a mapping API so hospital detection can be much more accurate based on GPS radius. We also plan to add a dedicated dashboard for hospitals so they can receive patient triage alerts before the ambulance arrives. Furthermore, we aim to implement an automatic crash detection feature that runs securely in the background, ensuring the system can trigger emergency responses even when the app is closed or the phone is locked.

Built With

Share this project:

Updates

Submission history