💡 Inspiration In Morocco, finding urgent medication is often a race against time. We have all witnessed a family member or friend running from one pharmacy to another, looking for a specific drug, only to find them out of stock.

This disconnection between patient needs and pharmacy inventory isn't just an inconvenience; in critical situations, it can be life-threatening. The inspiration for FinDawa came from a simple question: "Why can we track a pizza delivery in real-time, but not life-saving medication?" We wanted to bridge this gap using the power of AI to create a unified, transparent healthcare ecosystem.

💊 What it does FinDawa is a dual-interface platform powered by Google Gemini 3:

For Patients (The Seeker):

Natural Language Search: Patients can type "I need something for a migraine" or specific drug names.

3D Geolocation: Results are displayed on an interactive 3D map, showing only pharmacies currently in stock and open.

Instant Routing: Calculates the fastest path to the medication.

For Pharmacists (The Provider):

The "Winbox" Dashboard: An AI-powered command center.

Stock Prediction: Instead of just reacting to shortages, FinDawa predicts them. It analyzes sales trends and alerts the pharmacist: "Warning: Doliprane stock likely to run out in 48 hours based on current flu trends."

🛠️ How we built it We adopted an AI-First development approach, leveraging Google Gemini both as the core intelligence engine and as a coding assistant to accelerate the build.

Frontend: Built with React.js and Tailwind CSS for a responsive UI. We used Three.js to render the interactive 3D map components.

Backend & Database: Firebase (Firestore) handles real-time data synchronization between patients and pharmacists.

The Brain (AI): We integrated the Google Gemini 3 Multimodal API.

We send JSON logs of pharmacy sales to Gemini.

Gemini processes this data against seasonal context to output predictive alerts.

We also use Gemini for semantic search, allowing it to understand medical queries (e.g., mapping "headache" to "Paracetamol").

🚧 Challenges we ran into Gemini Integration: Getting the LLM to output structured JSON data consistently for the dashboard was tricky. We had to refine our system instructions and prompts to ensure Gemini acted as a strict data analyst rather than a conversational bot.

3D Optimization: Rendering a 3D map within a React app without causing lag was a performance challenge. We had to optimize the Three.js rendering loop to ensure a smooth experience on mobile devices.

Data Simulation: Since we couldn't access real-time private pharmacy data for the hackathon, we had to generate realistic synthetic datasets to train and demonstrate Gemini's predictive capabilities effectively.

🏆 Accomplishments that we're proud of Functional Stock Prediction: Seeing the "Winbox" actually flag a potential shortage based on the data we fed it was a huge "Aha!" moment. It proved that Gemini can be used for logistics, not just text generation.

The 3D Experience: Successfully integrating Three.js to make the pharmacy map look immersive and modern.

Solo Development: Building a Full-Stack application (Frontend, Backend, and AI integration) within the hackathon timeframe.

🧠 What we learned AI is a Backend Engine: We learned that Large Language Models like Gemini are incredibly powerful when treated as a reasoning engine for backend logic (logistics, prediction) rather than just a frontend chatbot.

The Importance of Context: The quality of Gemini's predictions depended heavily on the context we provided (time of year, location, historical data).

Rapid Prototyping: Using AI coding assistants allowed us to move from an idea to a working MVP much faster than traditional coding methods.

🚀 What's next for FinDawa: The AI-Powered Health Ecosystem FinDawa is just getting started. Our roadmap includes:

WhatsApp Integration: Allowing patients to query FinDawa directly via WhatsApp (widely used in Morocco).

Visual Recognition: Using Gemini's vision capabilities to let patients scan a prescription paper and automatically find all listed medicines.

Government Partnership: Pitching the data insights to the Ministry of Health to help prevent national drug shortages on a macro scale.

Built With

Share this project:

Updates