Hope: AI Crisis Support
A scalable, serverless AI chatbot and administrative dashboard built on GCP for a mental health non-profit. Delivers secure, low-latency crisis support with automated safety intercepts and strict zero-trust IAM architecture.
Technical Deep Dive Read Case Study
Project Overview
The Need You Here Foundation required a highly accessible, non-clinical crisis support chatbot ("Hope") to connect users with mental health resources, alongside a secure dashboard for counselors to manage a provider registry and review chat logs. Because the application handles highly sensitive crisis and abuse data, the infrastructure required a robust, HIPAA-conscious architecture that prioritized data security, automated emergency routing, and strict access control.
Engineering Highlights
- Event-Driven AI & Dynamic Tool Calling: The core chat API operates on a Python-based Cloud Function integrating directly with Vertex AI (Gemini 2.5 Pro). Equipped with a custom dynamic tool, the LLM autonomously queries Firestore in real-time to match users with available, city-specific counselors from the foundation's registry.
- Automated Safety Intercepts: Implemented database-configurable trigger arrays for "Crisis" and "Abuse" keywords. If triggered, the system intercepts the message pre-LLM, instantly returning emergency hotline info and locking the chat widget. Logs are saved via synchronous Firestore batch writes to ensure zero data loss during GCP serverless CPU-freezing.
- Zero-Trust IAM Architecture: Utilized a strict "Principle of Least Privilege" strategy. Upon client handoff, developer database read access was permanently revoked via IAM, retaining only Cloud Functions and Firebase Hosting Admin roles. This legally shielded the development environment while allowing continuous CI/CD deployments.
- Portable React Widget: Engineered a portable, embeddable React (Vite) frontend that compiles into a single, lightweight JavaScript file with bundled CSS. This allows seamless deployment via a single HTML script tag, complete with secure UUID session management.