💡 Inspiration
Most mainstream health platforms and AI tools are inherently biased toward a Western context. They assume immediate access to primary care physicians and analyze lifestyle habits based on foreign nutritional models. They don’t understand the realities of navigating healthcare on the ground in Nigeria—from evaluating the impact of local staple foods like instant noodles, rice, or pounded yam, to recognizing what is practically available at a local pharmacy or chemist.
I was inspired to build Alaafia (the Yoruba word for complete wellness and peace of mind) to bridge this gap. I wanted to create a warm, professional, yet deeply grounded AI companion that translates complex clinical medical jargon into plain, culturally sensitive health literacy.
🌿 What it does
Alaafia is a context-aware health information platform that allows users to ask questions about symptoms, medications, and local wellness habits in natural language.
- Cultural Context Tracking: It accurately processes regional variables, dietary habits, and local public health scenarios across Nigeria.
- Pre-flight Emergency Triaging: It contains built-in client-side safety guardrails that instantly flag critical medical red flags (e.g., chest pain, severe bleeding, breathing difficulties) and safely direct users to immediate professional emergency services.
- Persistent User Console: Users can create secure accounts to manage persistent historical chat logs, with full privacy autonomy to delete individual threads instantly.
- Minimalist & Accessible UI: A premium, distraction-free interface built to scale fluidly from desktop workspaces down to smartphone screens.
🛠️ How I built it
Alaafia is built on a minimalist UI philosophy, ensuring high performance, responsive mobile screens, and clean, readable code:
- Frontend Core: Engineered using React.js with functional components, custom hooks, and state-based layout lifecycle routing.
- Design & Styling: Formulated with Tailwind CSS to establish structured design tokens, pairing premium typography (Cormorant Garamond and Outfit) with an adaptive user interface.
- Backend-as-a-Service (BaaS): Integrated Appwrite to manage secure user account authentication, persistent session cookie tracking, and relational document database collections.
- AI Processing Pipeline: Connected the Groq API to stream live conversation history through a specialized, context-aware public health prompt framework.
🛑 Challenges I ran into
- Relational State and Privacy Deletion: Health queries are deeply confidential. Designing a sidebar history that dynamically syncs with Appwrite while giving users total autonomy to permanently drop or purge entire conversation documents instantly from active database nodes required precise state management.
- Mobile Overlays & Responsiveness: Transforming a robust desktop chat workspace into a fluid, responsive mobile experience—complete with an overlaying slide-out drawer menu—without layout crowding or text compression.
- Production Security Blocks: Shifting from
localhostto a live Netlify domain introduced cross-origin resource blocks (NetworkError). I solved this securely by aligning the Web Platform constraints directly inside the Appwrite project configuration.
🏆 Accomplishments that I'm proud of
- Successfully engineering a comprehensive, multi-step pipeline combining custom web logic, secure database management, and asynchronous AI inference.
- Creating an interface that feels editorial, premium, and calm—moving away from traditional "robotic" chat applications to establish immediate trust.
- Designing a product that places user safety first through explicit emergency guardrails and high-speed execution.
🧠 What I learned
I deeply refined my proficiency with Appwrite's backend ecosystem, specifically session persistence, relational document fetching, and data validation constraints. I gained hands-on experience handling context-aware AI constraints cleanly inside React. Most importantly, it reinforced a vital software principle: tech is most powerful when it is built with deep empathy for the exact community using it.
🚀 What's next for Alaafia
The next step for Alaafia is expanding its platform capabilities. I plan to transition the core workspace into a mobile application using React Native for a closer, low-bandwidth mobile integration. Additionally, I plan to look into direct verification hooks for local pharmaceutical metrics and integrate real-time mapping to locate verified diagnostic labs and clinics nearby.
Built With
- appwrite
- groq
- netlify
- react.js
- tailwind-css
Log in or sign up for Devpost to join the conversation.