-
-
Remote Config sets each AI step's routing live. Look for prefer_on_device vs prefer_in_cloud, and Nano status: available.
-
Every AI step shows its source: on_device = Gemini Nano, in_cloud = Gemini. "Fallback" explains why a step moved to the cloud.
-
Device Configuration Screen: the hospital admin can the user of a device
-
Kinyarwanda (Rwandan Language) version of the Patient Kiosk-Patient Device
-
Patient version of the Patient Kiosk-Patient Device
-
Example screen of the system giving the patient direction and next steps
-
Eleza confirms if the patient gave the correct identity before continuing with pre-consultation
Eleza
A voice-first hospital check-in for Rwanda. Patients speak in Kinyarwanda (Rwandan Language) or English, doctors receive a structured brief, and the AI runs on the kiosk through Firebase AI Logic, using the cloud only when it needs to.
Inspiration
Rwanda has fewer than 2 physicians for every 10,000 people, and the public and referral hospitals most of us depend on are always over-crowded (World Health Organization, 2024). I grew up with this. You can queue for hours, sometimes four, to see a doctor for five minutes, and that doctor starts the consultation knowing nothing about you. With so little time, important symptoms often go unmentioned.
There are digital intake tools, but almost all of them are text-based. They expect people to read, type and have a good connection. According to the National Institute of Statistics of Rwanda's 2022 Population and Housing Census (published 2023), 78.8% of Rwandans aged 15 and above are literate, while about 98% of the population speaks Kinyarwanda, so a form leaves out many of the people who wait the longest. That is why Eleza listens to patients instead of asking them to type.
A hospital kiosk also turned out to be a very good fit for hybrid AI. What patients say about their health is about as sensitive as text gets, a public hospital can't pay per request for every answer from every patient, and kiosks run on whatever hardware is available. This hackathon gave me the chance to move Eleza's AI onto the kiosk itself and keep the cloud as a fallback.
Value proposition
- For patients: they don't need to read or type. They answer in their own language, and Eleza asks the questions a short consultation usually leaves out.
- For doctors: they get a structured brief before the patient walks in, so the five minutes go to the consultation rather than to basic intake questions.
- For hospitals: urgent patients are flagged and routed at the entrance, and hospital staff manage doctors, rooms and patients in the same app. Patient speech is processed on the kiosk whenever possible, on-device AI adds no per-request cost, and the cloud covers the cases the device can't handle. All of this can be adjusted from Firebase without redeploying.
What it does (features and functionality)
Patient kiosk: At the hospital entrance, the patient presses one button and talks, in Kinyarwanda or English. Eleza greets them, asks for their name, age, gender, phone number and location, and then asks follow-up questions about their symptoms, out loud and in their language. The patient never has to read or type anything.
Triage and routing: Once Eleza has enough information, it scores the urgency (HIGH, MEDIUM or LOW), assigns a department and a queue number, and tells the patient where to go, both by voice and on screen. The patient also receives an SMS with their queue assignment.
Doctor dashboard: Before the consultation, the doctor sees their hospital's patients and, for each one, a structured brief with the chief complaint, symptoms, duration, severity, red flags, a short factual summary and key findings, along with the full transcript and the audio. From there, the doctor can assign the patient to a consultation room.
Hospital admin dashboard: Each hospital has its own admin, who sees the hospital's doctors, patients and rooms in one place. The admin adds and edits doctors (new doctors receive their login details by email), adds rooms, and marks rooms as active, inactive or under maintenance.
Platform admin dashboard: Platform admin dashboard. The platform admin oversees every hospital using Eleza. They create and edit facilities and add each hospital's admin. They can also see how each session's AI steps ran, on the device or in the cloud, which is how the system is monitored without showing that technical detail to doctors.
Who can create accounts: Except the platform admin, nobody can sign themselves up, and each role can only create the accounts below it. The platform admin creates facilities and hospital admins. A hospital admin can only add doctors to their own hospital. Finally, new doctors receive their login details by email.
Built-in safety: A red flag or a high self-reported severity always results in an emergency priority, regardless of what a model scores. Patients never receive a diagnosis or medical advice. Eleza supports clinicians rather than replacing them, and a clinician reviews every brief.
How I used Firebase AI Logic
Seven AI steps run in the browser through Firebase AI Logic hybrid inference: translating Kinyarwanda into English, extracting symptoms, choosing the next follow-up question, scoring triage, suggesting a department when the issue is unclear, writing the patient's guidance message and writing the doctor's brief. Speech-to-text stays on my backend, where Whisper runs alongside a model fine-tuned for Kinyarwanda.
I decided where each step runs based on what it handles:
| Step | Default | Why |
|---|---|---|
| Symptom extraction, doctor brief | prefer on-device | This is the most sensitive text, so it stays on the kiosk when possible |
| Follow-up question, patient message | on-device in English, always cloud in Kinyarwanda | Short, single-turn tasks suit Gemini Nano, which only supports English |
| Translation | always cloud | Nano can't read Kinyarwanda |
| Triage score, department suggestion | prefer cloud | These are safety-critical, so the stronger model goes first |
A fallback that doesn't keep patients waiting. With prefer_on_device on its own, the app would wait for Gemini Nano for as long as it takes. Eleza gives Nano a time limit instead. If Nano goes over it, the on-device request is cancelled and the same request is answered in the cloud. After a timeout, Nano is skipped for a short cool-down, and the kiosk sends Nano a small warm-up prompt while the greeting plays so the first real step doesn't have to wait for the model to load. Every step records whether it ran on-device or in the cloud, how long it took and why it fell back, and the kiosk can show this live as On-device and Cloud badges.
Structured output either way. Symptom extraction, triage scoring and the doctor's brief return JSON that follows a fixed schema, whether Nano or the cloud model answers.
The backend has the final say. Because the AI runs in the patient's browser, the backend checks every result before using it. It validates the fields, checks the patient's own words again for red flags, raises the priority to HIGH for red flags or high severity (and shows the doctor why), and replaces any patient message that mentions a diagnosis or treatment with a safe template.
The other Firebase products I used:
- App Check protects every AI Logic call, using the debug provider during development and reCAPTCHA on the hosted app.
- Remote Config (client template) controls where each step runs, the on-device time limit and cool-down, every prompt, and whether patients see the AI indicators. Changes apply without a redeploy. On my 8 GB test laptop, for example, I moved symptom extraction to the cloud, since it re-reads the whole conversation after every answer, and kept the shorter steps on Nano.
- Remote Config (server template) holds the triage safety thresholds, which the backend reads with the Firebase Admin SDK. Keeping them on the server means a browser can't change them, and the backend keeps them within safe limits.
- Firebase Hosting serves the web app.
Implementation note. The FlutterFire firebase_ai package doesn't support hybrid inference yet, so the Flutter web app calls the Firebase JS SDK (firebase/ai) through a small dart:js_interop bridge. The bridge uses the same SDK version and the same Firebase app as FlutterFire, which means App Check covers these calls too.
How I built it
- Frontend: Flutter for web, with a JavaScript bridge to the Firebase AI Logic JS SDK.
- AI: Firebase AI Logic hybrid inference (Gemini Nano in Chrome and Gemini in the cloud), plus Whisper large-v3 for English and a community fine-tuned Whisper model for Kinyarwanda speech-to-text.
- Backend: Python and FastAPI, PostgreSQL on Neon, and the Firebase Admin SDK for server-side Remote Config.
- Voice and messaging: ElevenLabs text-to-speech through a backend proxy, so the API key never reaches the browser, and Twilio for SMS.
- Firebase: AI Logic, App Check, Remote Config and Hosting.
I built Eleza on my own, with feedback from people in my community, my academic supervisor and two Rwandan doctors.
What I built during the submission period
Before this hackathon, Eleza was a working voice pre-consultation prototype: a Flutter kiosk with doctor, hospital-admin and platform-admin dashboards, a FastAPI backend, Whisper speech-to-text, Gemini calls made from the server, PostgreSQL and Twilio SMS. During the submission period I rebuilt its AI layer around Firebase AI Logic hybrid inference. The main changes:
- All language AI moved from the server into the browser, with on-device or cloud routing for each of the seven steps.
- A cloud translation step, so the on-device steps also serve Kinyarwanda speakers.
- A time limit, cancellation, cool-down and warm-up around on-device inference, with On-device and Cloud indicators.
- A backend that treats AI results as untrusted, plus Firebase App Check and Remote Config on both the client and the server.
The Whisper models, ElevenLabs, Twilio and the open-source libraries I use are third-party work, and I used AI coding assistants during development.
Challenges I ran into
- Flutter doesn't support hybrid inference yet. I connected Flutter to the Firebase JS SDK through a bridge that shares FlutterFire's Firebase app, so App Check and configuration stay in one place.
- Gemini Nano on modest hardware. On my 8 GB laptop, the first on-device prompt took about a minute, which is far too long for a patient standing at a kiosk. That's what led me to the time limit with cancellation, the cool-down and the warm-up, and to making the routing of each step configurable in Remote Config rather than fixed in code.
- Nano only supports English, and most of my users speak Kinyarwanda. I translate to English in the cloud, keep an English copy of the conversation for the on-device steps, and always generate patient-facing Kinyarwanda in the cloud.
- Running AI in the patient's browser. The browser can't be fully trusted, so I moved every safety decision to the backend and the safety thresholds to server-side Remote Config.
- Working with free infrastructure. The two Whisper models need a GPU, and the free database pauses when it isn't used. I run the backend from a Colab notebook, and the backend reconnects on its own when the database wakes up.
Accomplishments that I'm proud of
- A complete voice flow in Kinyarwanda and English that people can use without reading or typing.
- Hybrid AI where the routing of each step is a deliberate choice based on what it handles, which hospitals can change from the Firebase console.
- Safety rules that no model, on-device or in the cloud, can override.
- Building the whole system myself, from speech recognition and the API to the kiosk, the dashboards and the infrastructure.
What I learned
Healthcare tools have to fit the infrastructure and literacy of the people using them. On the technical side, I learned that hybrid AI involves many small decisions rather than one: which data should stay on the device, which tasks a small model handles well, and how long a patient can reasonably be asked to wait. The answers change from step to step and from device to device, which is why I put them in configuration instead of code.
What's next for Eleza
The people Eleza is built for include older patients, people who can't read comfortably, and people who are seriously ill and need to be seen quickly. My next steps focus on making the system faster, clearer and more reliable for them, and on getting it into hospitals.
- Shorter waits between questions. Right now there is a noticeable pause between a patient's answer and the next question, while their speech is transcribed and processed. I want to bring that down with faster speech recognition, more steps running on-device, and processing that starts while the patient is still speaking. For someone who is very ill, every second of waiting matters.
- A more natural Kinyarwanda voice. The current voice is understandable, but its Kinyarwanda doesn't always sound natural. Older patients especially should hear a voice that sounds familiar and is easy to follow, so I want to use a text-to-speech model trained specifically on Kinyarwanda.
- Patient-friendly pacing. I want to add slower speech and an option to repeat a question, give patients more time to answer, and skip straight to an emergency route as soon as someone describes a red-flag symptom.
- Speech recognition on the device. Running speech-to-text on the kiosk would keep Eleza working during internet outages and keep more patient data on the device.
- Reliable hosting. The backend currently runs on free GPU time that sleeps when it isn't used. Paid hosting for the speech models and a production database would keep Eleza available at all times, which I need before I can demonstrate it to hospitals and run a pilot.
- Better kiosk hardware. Gemini Nano runs much faster on devices with more memory. Kiosk machines suited to on-device AI would let more of each conversation stay on the device and make the whole flow quicker.
- A hospital pilot. I'm already talking with my college's leadership about real-world deployment. The next step is a pilot at a Rwandan referral hospital, with more doctors reviewing the question flows.
- More platforms, starting with Android through Firebase AI Logic's hybrid support.
- "Hospital confirmation for new doctors:" When the platform admin adds a doctor, the hospital will confirm by email before the account is created.
How the prize would help. The prize would support me in expanding the team and pay for the tools that stand between this prototype and a real pilot. I can get more reliable hosting for the speech models, a better Kinyarwanda voice that even elders would understand easily, and kiosk hardware that can run more of the AI on-device. It would also let me bring in an experienced machine-learning engineer and a healthcare-facilities consultant, so that a pilot is safer and more accurate to Rwandan hospital processes.
Built With
- dart
- elevenlabs
- fastapi
- firebase-admin
- firebase-ai-logic
- firebase-app-check
- firebase-hosting
- firebase-remote-config
- flutter
- gemini
- gemini-nano
- google-colab
- hugging-face-transformers
- neon
- postgresql
- python
- twilio
- whisper