Project Name: Medicina Consulta
Inspiration
The inspiration for "Medicina Consulta" stemmed from a critical observation: many individuals struggle to understand their symptoms and navigate the complex healthcare system. This uncertainty and lack of clear information often lead to anxiety and delays in seeking appropriate care. We saw the immense potential of Artificial Intelligence, particularly through a ubiquitous platform like WhatsApp, to democratize access to initial health guidance. Our core mission became to empower users with a reliable, accessible, and preventive first point of contact, enabling them to make informed decisions about their health and seek medical help more efficiently—especially in scenarios where rapid access to healthcare professionals is a challenge. The idea of leveraging technology to make health more understandable, proactive, and accessible for everyone was our driving force, shifting the paradigm from reactive treatment to proactive prevention.
What You Learned
Throughout the development of "Medicina Consulta," especially under the pressure of this hackathon, our learning curve was steep and multifaceted:
- Advanced Conversational AI: We significantly deepened our understanding of Natural Language Processing (NLP) and the practical application of Large Language Models like Google Gemini via Langchain. We learned to design intuitive conversational flows for anamnesis and user engagement on WhatsApp, processing not just text but also the potential for images (like exam results) and audio.
- Workflow Automation & Integration: Mastering n8n for orchestrating complex workflows was crucial. We learned how to seamlessly integrate WhatsApp Business API, AI models, our Postgres database, and even external services like Hotmart (for our existing subscription model), creating a robust and scalable backend.
- Responsible AI in Healthcare: We grappled with the ethical imperatives of AI in health. This involved a constant focus on communicating the tool's limitations (it's for guidance, not diagnosis), ensuring data privacy (LGPD/HIPAA compliance in our full vision), and designing interactions to be empathetic yet clear about when to seek professional medical help.
- Rapid Prototyping & MVP Focus: The hackathon environment reinforced the importance of agile development, prioritizing core features for a Minimum Viable Product (MVP). We learned to make quick, decisive architectural choices to deliver a functional prototype that showcases our core value proposition: AI-driven preventive health on WhatsApp.
- Cloud Infrastructure for Scalability: We solidified our understanding of leveraging cloud services (specifically AWS, which hosts our current infrastructure: EC2 for n8n, RDS for Postgres) to build a solution designed for scale and reliability from day one.
- User-Centric Design for a Real-World Problem: Validating our idea with initial paying users (as per our pitch deck) provided invaluable insights into user needs and the real-world demand for accessible preventive health solutions.
How You Built Your Project
"Medicina Consulta" was architected as an AI-powered health assistant on WhatsApp, focusing on accessibility and proactive care. Here's a breakdown of our build process and stack:
- Conceptualization & Core Problem: We defined our focus on preventive health, addressing the gap in accessible, continuous health guidance. WhatsApp was chosen as the primary channel for its ubiquity.
- Conversational AI Engine:
- Language Models: We leveraged Google Gemini (and potentially Claude, as per our stack) orchestrated via Langchain to create a sophisticated conversational AI. This allows for natural language understanding, intelligent symptom triage, personalized advice, and even simplified analysis of user-provided information (like PDF exam results in our full version).
- Prompt Engineering: Significant effort went into crafting prompts that guide the AI to perform tasks like anamnesis, provide health tips, and generate user health summaries responsibly.
- Backend Orchestration & Logic:
- n8n: This is the central nervous system of our application. n8n workflows manage incoming WhatsApp messages, route them to the appropriate Langchain/Gemini processes, interact with our database, and send responses back to the user. It also handles logic for features like medication reminders and proactive follow-ups.
- Database: We used PostgreSQL (hosted on AWS RDS) to store user interaction history, preferences, and anonymized health data points, enabling personalized and continuous care.
- User Interface (Channel):
- WhatsApp Business API: This is our primary user interface, allowing for direct, familiar, and accessible interaction for users worldwide.
- Integrations (for MVP & Future):
- While our current commercial version uses Hotmart for subscription management, for this hackathon, we focused on the core AI interaction. The architecture allows for easy integration with payment gateways and other third-party services (e.g., wearables APIs for future data input).
- Cloud Infrastructure:
- The entire backend (n8n, AI model access, database) is designed to run on Amazon Web Services (AWS), utilizing services like EC2 for compute (running n8n and Langchain applications) and RDS for our PostgreSQL database. This provides scalability, reliability, and security.
- Prototyping & Iteration: We rapidly prototyped conversational flows and AI responses, simulating user interactions to refine the system within the hackathon's timeframe. Our existing 12 paying users and 711 leads provided early validation for the core concept.
Challenges You Faced
Building "Medicina Consulta" for this hackathon presented several significant challenges:
- Time Constraints: The classic hackathon challenge. We had to ruthlessly prioritize features, focusing on a core, demonstrable MVP of the AI-driven WhatsApp interaction for preventive guidance, rather than implementing the full suite of features from our pitch deck (like full exam PDF analysis or advanced wearable integrations).
- Complex AI for Nuanced Health Queries: Developing AI that can interpret health-related user input accurately, empathetically, and safely is inherently complex. Our main challenge was ensuring the AI provides helpful, preventive information without ever crossing into medical diagnosis, clearly signposting users to professional medical advice when necessary.
- Data Simulation for Robustness: While we have experience with real (anonymized) user data in our live product, for the specific AI training and testing during the hackathon, we relied on carefully crafted simulated datasets and open-source medical information to train/test our triage logic. Access to comprehensive, diverse, and privacy-compliant health data for training is a broader industry challenge we are navigating.
- Seamless Integration of Multiple Services: Orchestrating WhatsApp API, Langchain, Google Gemini, n8n, and our database into a fluid, real-time conversational experience within a short timeframe required meticulous planning and rapid debugging. Ensuring low latency and reliable message processing was key.
- Balancing Innovation with Responsibility: While pushing the boundaries of AI in preventive health, we were constantly mindful of the ethical responsibilities. This meant building in safeguards, clear disclaimers, and focusing on empowerment and information, not replacement of doctors.
- Scope Definition for Hackathon MVP: With a feature-rich vision, a key challenge was to distill it down to an impactful MVP that could be built and demonstrated effectively within the hackathon period, showcasing the core innovation: accessible, AI-powered preventive health on WhatsApp.
Built With
- amazon-web-services
- gemini
- google-cloud
- health
- hotmart
- javascript
- n8n
- node.js
- postgresql
Log in or sign up for Devpost to join the conversation.