Inspiration

Going for medical checks and started an unrelated conversation with the doctor about early detection of respiratory diseases and how it could save lives. I told him to imagine a world where ‘breath-checks' are part of routine vital assessments. He said, and I quote, “Did you know that nasal allergies and the common cold could lead to surgery if not managed well?" I didn't expect to hear that, but that statement added to the list of things that keep me up at night. The doctor explained that there has been a surge in nasal complications, with or without surgery, over the past decade, even before and after the COVID-19 pandemic. Personally, this is understandable because such issues are linked to poor air quality, illegal mining, gas flaring, deforestation, illegal dumping, oil spillage, unethical disposal of medical and industrial waste, climate change, and other factors. Whether you are a smoker or a non-smoker, everyone should care about their respiratory health, which is why BreathAlert was created.

What it does

BreathAlert is an offline-first, privacy-focused Progressive Web App (PWA) designed for resource-constrained environments. It serves as a preliminary health screening tool that allows users to analyse their respiratory sounds, such as coughs or wheezing, directly on their device. The application provides instant, AI-powered feedback on potential respiratory conditions, helping users better understand their symptoms. Crucially, it operates entirely without an internet connection and never uploads any sensitive audio data, ensuring complete user privacy. Offering immediate insights and a clear "next step" to consult a professional, it aims to close the gap between noticing a symptom and seeking medical advice, especially in communities with limited access to healthcare and internet connectivity. Breathalert offers privacy-preserving, contactless screening for classrooms, health centres, elder care homes, and remote clinics. No wearable devices or external equipment are required.

How we built it

BreathAlert was built using a modern, efficient, and mobile-first tech stack, with every tool chosen to support our core goals of offline capability, privacy, and performance.

Application Framework: We used React and TypeScript to build a robust, type-safe, and component-based user interface that is both maintainable and easy to scale.

Offline-First Architecture: The entire application is a Progressive Web App (PWA). Vite was used as the build tool along with the vite-plugin-pwa package, which automatically generates a service worker. This service worker caches the entire application, allowing it to load and run instantly on subsequent visits, even with no internet.

AI Engine (On-Device Simulation): The core analysis is handled by a simulated on-device model created in geminiService. Instead of making a network call to a real AI, this service uses local logic to provide a realistic result based on the user's input. This was a deliberate choice to guarantee offline functionality and absolute privacy.

Styling & UI: Tailwind CSS for rapid, utility-first styling to create a clean and responsive design, and react-icons for a lightweight and consistent set of interface icons.

Challenges we ran into

The biggest challenge was reconciling the desire for powerful AI analysis with the non-negotiable requirement for offline accessibility and user privacy.

The Cloud AI vs. Offline-First Dilemma: The initial idea was to use a powerful cloud AI; however, this would make the app unusable for our target audience due to connectivity issues and would require users to upload sensitive audio, which was a privacy deal-breaker.

The Feasibility of a Real On-Device Model: Building a true, custom-trained on-device ML model is a massive undertaking that requires a large, labelled dataset and significant expertise, which was beyond the scope of a hackathon.

Ensuring a Meaningful User Experience: The challenge became: "How might I provide a valuable and complete user experience if it were to be on-device?" The solution was to create a high-fidelity simulation that allows for demonstrating the full potential and user flow of the application.

Accomplishments that we're proud of

Solo female hacker This is an accomplishment I am proud of because this will encourage other African solo female hackers to join hackathons even if they cannot find a team.

Creating a Truly Offline and Private Health App: Breath Alert successfully built, an application whose core functionality is 100% available without an internet connection, a critical achievement for target users.incredibly proud that the design guarantees no user audio ever leaves their device.

High-Quality User Experience: The clean, intuitive UI and the thoughtful features, like the network-aware "Talk to a Doctor" button, which adapts to the user's connectivity status to prevent a broken experience.

Excellent Technical Performance: The application achieves near-perfect Lighthouse scores (Performance: 98, Accessibility: 100) and loads almost instantly in offline conditions, proving the architecture is highly efficient.

What we learned

Constraint-Driven Design is a Superpower: The project's constraints (especially the lack of connectivity) were not limitations but a creative force. This pushed me to abandon a conventional cloud-based approach and innovate toward a more practical and user-centric offline solution.

The Power of PWAs for Accessibility: Although I have used PWAs in the past, I gained a deep appreciation for Progressive Web Apps as the key technology for delivering accessible, reliable, and app-like experiences to anyone with a web browser, regardless of their device or network quality.

Leveraging a Phased Approach for IoT/TinyML: Tackling a complex IoT/TinyML project is best done in phases. Building the user-facing software first is a highly effective strategy to validate the concept and user experience before committing to hardware and ML development.

What's next for BreathAlert

To ensure responsible use and prevent the risks of self-medication or incorrect self-diagnosis, the future of BreathAlert is not as a direct-to-consumer app, but as a powerful B2B clinical decision-support tool for medical professionals. BreathAlert will transition from a software to a fully-realised, low-cost clinical device powered by TinyML, designed for use by healthcare professionals.

Hardware Prototyping & Clinical Triage: The immediate next step is to build the physical hardware prototype. This device will be designed for use by community health workers and clinicians to perform rapid, on-the-spot respiratory screenings in low-resource settings, helping them to triage patients effectively.BreathAlert will be positioned as a tool for use by healthcare professionals (doctors, nurses, community health workers) to perform rapid, on-the-spot initial screenings. This helps them prioritise patient cases in clinics or during field visits, especially in crowded or remote settings.

Data Collection & TinyML Model Training: In partnership with medical institutions, the hardware prototypes will launch an ethically-approved data collection initiative. This clinical data will be used to train a highly accurate and compact classification model using a framework like Edge Impulse or TensorFlow.

On-Device Inference with TinyML: Trained mode will be deployed to the device's microcontroller using the TensorFlow Lite for Microcontrollers (TFLM) framework. The device itself will then run all audio preprocessing and AI inference, a true TinyML implementation where all computation happens at the extreme edge.

Integration with Telehealth and EMR Systems: Develop a B2B strategy to integrate BreathAlert with existing Electronic Medical Record (EMR) and telehealth platforms. This would allow a doctor to guide a patient through the screening remotely, with the results instantly logged in the patient's file, streamlining the diagnostic workflow.

PWA-to-Hardware Integration(add-on): Web Bluetooth or Web Serial API in the PWA. The app will then be able to discover and connect to the BreathAlert device, allowing a healthcare professional to operate the device using their phone and instantly see the results.

Founding Africa's First Respiratory Health Data Initiative: The most ambitious goal is to launch a major research initiative. With explicit patient consent and robust anonymisation protocols, I aim to start the first large-scale, open dataset of respiratory sounds from African populations.

This "common good" dataset will be used to train more accurate and demographically relevant AI models, establishing a leading medical AI research hub on the continent and improving global health equity. We all breathe in and out all the time; why not donate those to research instead of letting them go to waste?

Hopefully, I can return to the doctor with a device or a potential solution.

Built With

Share this project:

Updates