Inspiration

During a medical emergency, panic is the enemy. We noticed that university health websites are often cluttered, call centers have long hold times, and campus Wi-Fi can be spotty. When a student is dealing with a broken bone, a pregnancy scare, or a mental health crisis, they shouldn't have to scroll through PDFs to find a phone number.

We wanted to build a solution that removes all friction. No apps to download, no accounts to create—just a simple text to get immediate help.

What it does

CruzAid is a WhatsApp bot that acts as a first responder for campus health.

Understand: Users text symptoms naturally (e.g., "I'm depressed," "I broke my arm," "I need a pregnancy test").

Triage: We use Google Gemini 2.5 Flash Lite to classify the medical need into categories like Emergency, Mental Health, Dental, or Sexual Health.

Connect: The system queries our MongoDB Atlas cloud database to find the best local resource.

Action: It replies instantly with a phone number and a one-tap Google Maps link for directions.

How we built it

Backend: Python & Flask to handle the logic.

AI Engine: Google Gemini (via OpenRouter) for natural language understanding and intent classification.

Database: MongoDB Atlas (Cloud) for storing and retrieving resource data in real-time.

Interface: Twilio API for WhatsApp to make it accessible on any phone.

Navigation: Dynamic Google Maps URL generation for instant directions.

Challenges we ran into

Our biggest challenge was "Cloud vs. Local" connectivity. We initially struggled to get our local Python environment to talk to the MongoDB Atlas cluster, resulting in timeouts. We solved this by implementing a robust cloud connection string and writing a custom data-seeding script to ensure our cloud database was always synced with our local data. We also had to fine-tune the AI prompts to ensure it didn't hallucinate categories and strictly adhered to safety protocols.

Accomplishments that we're proud of

Latency: The bot replies in <2 seconds.

Accessibility: By using WhatsApp, CruzAid works on almost any smartphone, even with weak data connections.

Real-World Utility: The "Get Directions" map link feature actually opens the native maps app, making it truly useful in a crisis.

Strict Safety: The AI correctly identifies emergencies (like "I drank poison") and routes them to emergency services immediately.

What we learned

Cloud vs. Local Environments: We learned the hard way that connecting a local Flask app to a cloud database (MongoDB Atlas) requires strict SSL certificate handling (certifi) and correct connection strings. It taught us the importance of environment parity.

AI Constraint Engineering: We learned that "Large Language Models" can be too creative. To make the bot reliable, we had to learn how to constrain the AI's output to a strict set of keys (e.g., forcing it to map "I drank bleach" to "emergency" instead of "poison") so it could talk to our deterministic database.

API Management: We hit the Twilio API rate limit during our final testing phase! This taught us the importance of error handling and managing quotas when building real-world communication tools.

What's next for CruzAid

We plan to integrate real-time wait times for the campus health center so students know exactly how long they'll wait. We also want to add multilingual support (Spanish/Chinese) to help international students navigate the US healthcare system.

Built With

Share this project:

Updates