Inspiration
In South Africa, the “first-come, first-served” reality at public health clinics forces pregnant women into a dangerous “queue culture.” Expectant mothers routinely arrive at facilities as early as 04:00 AM, standing on dark street corners and waiting in freezing winter lines for hours before doors open and staff begin consulting at 08:00 AM.
This isn't just an administrative inconvenience—it is a critical maternal health risk and a severe safety hazard.
Mama-Queue was inspired by a simple mission: to give these mothers their time, health, and dignity back by letting them wait where it is safe and warm—at home.
What it does
Mama-Queue is an AI-powered, digital-first clinic scheduling mobile platform designed to dismantle physical clinic lines. Instead of guessing when to show up, users book specific appointment slots.
The app features a localized “Transport-to-Care” logistics engine. By using Google Maps to track the exact coordinates of both the patient and the clinic, it calculates the physical distance and base transit time. It then passes this data to Gemini AI, which applies a real-world “South African Buffer”—such as factoring in local morning traffic and the 20–30 minute “fill-up” times at central hubs like MTN or Bree taxi ranks.
Finally, the app sends a proactive, empathetic notification in local languages (like isiZulu), telling the mother exactly when to step out the door.
How we built it
The prototype is engineered with a modular, scalable architecture:
Backend
Built using Java 17+ and Spring Boot, implementing robust controllers and service layers to handle real-time booking slots.
Database
Leveraged Firebase to manage real-time data synchronization for appointment records, user profiles, and clinic schedules.
Logistics & AI
Integrated the Google Maps Distance Matrix API to compute distance variables, alongside Google AI Studio to configure Gemini 1.5 Flash.
The backend executes a specialized algorithm where the safe departure time is evaluated as:
T_d = T_a - (T_t + B_f)
Where:
- (T_a) = appointment time
- (T_t) = maps transit time
- (B_f) = AI-calculated transport buffer
Quality Assurance
Developed comprehensive JUnit test suites ensuring that local transit calculations and time-slot buffers remain mathematically accurate.
Challenges we ran into
The biggest technical hurdle was dealing with the inherent unpredictability of local commuting.
Traditional GPS transit APIs work on continuous driving or standard public transport timetables; they fail completely when capturing the time spent waiting for a local minibus taxi to fill to capacity.
We solved this by using Gemini as an intelligent reasoning layer—interpreting unstructured user inputs (e.g., “I'm walking from the rank”) and dynamically embedding a contextual temporal buffer that standard algorithms ignore.
Additionally, transitioning from Python to strict-typed Java within the high-pressure timeline of a hackathon forced us to rapidly adapt our development patterns.
Accomplishments that we're proud of
We are incredibly proud of building a solution that seamlessly bridges cutting-edge AI with raw, grassroots infrastructure realities.
Moving beyond a generic “booking app” and successfully integrating Google AI Studio to handle complex, hyper-local transport logistics was a massive milestone.
Furthermore, maintaining a disciplined Test-Driven Development (TDD) approach using JUnit during a fast-paced hackathon allowed us to deliver code that is clean, modular, and production-ready.
What we learned
This project reinforced that impactful software engineering isn't just about writing efficient code; it's about deep empathy for the end-user.
We learned how to optimize system prompts in Google AI Studio to turn an LLM into an intuitive, localized assistant that seamlessly translates technical clinic updates into supportive, multilingual responses.
On the engineering side, we mastered:
- Managing API credentials safely using environment configurations
- Designing modular backend services in Java
- Leveraging Java’s strict typing when building secure health-tech applications
- Building AI-enhanced logistics systems that reflect real-world transport behavior
What's next for Mama-Queue
Our immediate next step is expanding Mama-Queue beyond the smartphone app.
To maximize inclusivity for rural communities and low-income users with limited data or older devices, we plan to implement an offline-first USSD/SMS bridge powered by lightweight Gemini models.
We also want to scale the system to include a Healthcare Portal for clinic nurses, allowing them to dynamically balance daily slot availability based on on-site staffing levels.
Our goal is simple: move South Africa one step closer to a totally queue-free healthcare system.
Built With
- css3
- firebase
- gemini
- gemini-1.5-flash-api
- google-ai-studio
- google-maps
- html5
- java-backend
- node.js
- typescript
- vite
Log in or sign up for Devpost to join the conversation.