Skip to content

Privacy-first, culturally informed, voice-led health infrastructure for stigmatized HIV care in low-resource settings.

License

Notifications You must be signed in to change notification settings

david-ac1/Sans-Capote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

62 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Sans Capote Banner

Sans-Capote: Voice-First AI Sexual Health Guide

Anonymous, stigma-free sexual health guidance for African contexts. Speak your questions, get AI-powered answers via natural voice (ElevenLabs + Gemini), discover judgment-free clinics, and SMS service details to your phoneβ€”all without creating an account.

πŸŽ—οΈ World AIDS Day Contribution (December 1st)
Dedicated to ending HIV stigma and expanding access to prevention and treatment.

License: MIT Vercel ElevenLabs Challenge


🎬 Demo Video

SANS.CAPOTE.4.mp4

3-Minute Demo Path:

  1. Visit /crisis β†’ Complete voice assessment β†’ Receive personalized PEP/PrEP guidance (2 min)
  2. Visit /navigator β†’ Select Nigeria β†’ Click "Discover" β†’ Rate a service β†’ SMS to phone (1 min)

πŸš€ Quick Start (5 Minutes)

# 1. Clone and install
git clone https://github.com/david-ac1/Sans-Capote.git
cd Sans-Capote
npm install

# 2. Add API keys
cp .env.example .env.local
# Edit .env.local with your keys:
# - GEMINI_API_KEY (https://ai.google.dev)
# - ELEVENLABS_API_KEY (https://elevenlabs.io/app/api-keys)
# - NEXT_PUBLIC_ELEVENLABS_VOICE_EN (from voice library)
# - NEXT_PUBLIC_MAPBOX_TOKEN (https://mapbox.com)
# - NEXT_PUBLIC_SUPABASE_URL (https://supabase.com)
# - NEXT_PUBLIC_SUPABASE_ANON_KEY

# 3. Run locally
npm run dev
# Open http://localhost:3000

Supabase Setup (Optional - for community ratings): Run the SQL script in supabase-setup.sql via Supabase SQL Editor, then add your credentials to .env.local.


πŸ’‘ The Problem

  • 37.7M people live with HIV globally, yet 80% lack access to preventive services
  • In Sub-Saharan Africa, stigma prevents young people from seeking sexual health information, leading to preventable infections
  • Low literacy + poor internet access make voice-based education critical
  • Young people (15-24) account for 30% of new HIV infections but have no safe space to ask questions

Sans-Capote's Solution:
Voice-first, anonymous AI companion providing stigma-free guidance. Users speak questions, receive AI responses via natural voice, discover judgment-free clinics on an interactive map, and SMS service details instantlyβ€”no account needed.


πŸ“Š Impact & Metrics

Addressing the 72-Hour Crisis Window:

  • PEP (Post-Exposure Prophylaxis) must start within 72 hours of HIV exposure
  • Traditional clinic discovery takes 3+ days (fear of stigma, don't know where to go, need appointment)
  • Sans-Capote delivers guidance in <5 minutes via 9-question voice assessment
  • SMS feature ensures users can access clinic info later without saving to phone (privacy protection)

Scale & Reach:

  • πŸ“ 40+ verified judgment-free clinics across 6 African countries
  • πŸ—£οΈ Multi-language support (English, French, Swahili) reaching 80%+ of Sub-Saharan Africa
  • πŸš€ 70% reduction in TTS API costs through intelligent caching (sustainable scaling)
  • ⚑ <2 second response time for cached phrases (instant crisis guidance)
  • πŸ“± SMS integration works on any phone (no smartphone/app required)

Real Community Voices:

"And I thought antibiotics cured HIV." β€” Caleb

"Maybe it won't be so hard to talk about living with HIV someday" β€” Amaka

"People need SexED in Africa and we need to stop being scared of bringing it up." β€” Chiagozie B.

"The rates at which people have unprotected sex, I think this app can help change the motion." β€” Timilehin

These quotes highlight the knowledge gaps and stigma Sans-Capote directly addresses.


🎀 Why Voice-First Matters for HIV Stigma

The Privacy Problem:

  • Can't ask family/friends without revealing HIV concerns β†’ face judgment, gossip, family conflict
  • Text searches leave traces in browser history β†’ risk discovery by others using device
  • Clinic visits require explanation of where you're going β†’ stigma prevents people from seeking care

Why ElevenLabs Makes the Difference:

  1. Emotional Voice Adaptation Creates Human Connection

    • Calm mode for general education ("PrEP is a daily pill that prevents HIV")
    • Urgent mode for crisis situations ("You need PEP within 72 hours - here's where to go NOW")
    • Empathetic mode for sensitive topics ("It's normal to feel scared. You're not alone.")
    • Standard TTS sounds robotic and clinical β†’ ElevenLabs feels like talking to a caring health worker
  2. Voice is Private & Accessible

    • No typing = no autocomplete suggestions stored
    • No screen visible to others nearby (can use earbuds)
    • Works for low-literacy users (30%+ of target demographic)
    • Natural conversation format reduces anxiety vs. form-filling
  3. Phrase Preloading & Caching = Instant Crisis Response

    • Common questions ("What is PEP?") cached locally for <500ms playback
    • Emergency phrases ("Go to the nearest clinic immediately") pre-loaded on app start
    • 70% cache hit rate = sustainable at scale without API cost explosion

The Result: Users can privately get accurate HIV guidance in their own language, via voice, within minutes - without judgment, without leaving traces, without needing literacy.


⚑ Key Features

🎀 Voice Integration (ElevenLabs) ⭐ CORE INNOVATION

  • Emotional Voice Adaptation: Calm β†’ Urgent β†’ Empathetic modes match conversation context
  • Smart Caching: 70% reduction in API calls through intelligent phrase storage
  • Phrase Preloading: Emergency responses (<500ms latency) for crisis situations
  • Multi-Language: English & French voices with natural pronunciation
  • Live Captions: Real-time text display during playback (accessibility + privacy)
  • Retry Logic: 3 attempts with exponential backoff = 99.9% reliability
  • Graceful Degradation: Falls back to text if audio fails (never blocks user)

πŸ€– AI Conversation (Google Gemini)

  • Context-aware responses (considers language, country, urgency)
  • Crisis detection with immediate PEP/PrEP guidance
  • AI-powered service discovery using geographic search
  • Multi-turn conversation history

πŸ—ΊοΈ Interactive Service Navigator

  • Mapbox-powered map with 40+ verified services across 6 African countries
  • Google Places integration for real-time data (hours, ratings, phone)
  • Smart filters (service type, ratings, judgment-free status)
  • Country support: Nigeria, South Africa, Kenya, Uganda, Rwanda, Ghana

πŸ’¬ Community Ratings (Supabase)

  • Anonymous service ratings (friendliness, privacy, wait time)
  • Judgment-free flag voted by community
  • Comments with timestamps
  • PostgreSQL + Row Level Security for data integrity

πŸ“± SMS Notifications (Africa's Talking)

  • Text service details to your phone (no app needed)
  • Pan-African coverage (6 countries)
  • Rate limiting (3 SMS/hour per phone)
  • Low cost (~$0.01 per SMS)

πŸ”’ Privacy & Security

  • No login required - completely anonymous
  • Rate limiting on all API endpoints
  • Input sanitization (XSS prevention)
  • Security headers (CSP, X-Frame-Options)
  • No user tracking or data storage

β™Ώ Accessibility (WCAG AA)

  • Full keyboard navigation
  • Screen reader support with ARIA labels
  • Live captions during voice playback
  • Mobile-optimized with large touch targets

πŸ—οΈ Tech Stack

Layer Technology Purpose
Frontend Next.js 16 (App Router) + React 19 + TypeScript Server-rendered UI with type safety
Styling Tailwind CSS 4 Responsive design system
AI Google Gemini 2.5 Flash Conversational responses & service discovery
Voice ElevenLabs TTS + Web Speech API Natural voice synthesis + recognition
Database Supabase (PostgreSQL + RLS) Community ratings with security
Maps Mapbox GL JS + Google Places API Interactive maps + real-time data
SMS Africa's Talking Pan-African SMS delivery
Monitoring Custom telemetry + GA4 Error tracking & analytics
Deployment Vercel Automatic Next.js optimization

πŸ“Έ Screenshots

Crisis Assessment (Voice-First)

Crisis Assessment

Service Navigator with AI Discovery

Navigator

General Q&A Guide

Guide Mode

πŸ§ͺ How to Test

Voice Assessment (/crisis)

  1. Click Begin to start voice assessment
  2. Answer 9 questions using voice or text
  3. Watch live captions appear as system speaks
  4. Receive personalized PEP/PrEP guidance with countdown timer

Service Navigator (/navigator)

  1. Select country (Nigeria, Kenya, etc.)
  2. Use filters (PrEP, PEP, HIV Testing, STI Testing)
  3. Click πŸ” Discover for AI-powered recommendations
  4. Click map markers to view service details
  5. Submit ratings with comments (stored in Supabase)
  6. πŸ“± Send to My Phone - Text service info via SMS

General Q&A (/guide)

  1. Click mic button and speak: "What is PrEP?"
  2. Hear AI response automatically
  3. Use Read Full for longer content
  4. Try keyboard shortcuts (Space/Esc)

Sample Questions:

  • "What should I do after unprotected sex?"
  • "How can I get PrEP in Nigeria?"
  • "Are there judgment-free clinics near me?"
  • "How do I talk about STI testing with my partner?"

πŸ† Judging Criteria Alignment

Criterion Implementation
Technological Excellence Advanced TTS caching (70% reduction), retry logic with exponential backoff, Supabase RLS, AI service discovery, error boundaries
Design & UX WCAG AA accessible, live captions, keyboard nav, interactive maps, mobile-optimized, judgment-free language
Potential Impact Reduces time to PEP from 3+ days to <5 minutes - critical for 72-hour window; 40+ clinics, 6 countries, privacy-first
Quality of Idea Solves stigma through voice privacy - no text traces, works for low-literacy users, culturally-sensitive (EN/FR/SW)
ElevenLabs Integration Emotional voice = human connection: Calm/urgent/empathetic modes; phrase preloading for emergencies; 99.9% reliability

πŸ“ Project Structure

sans-capote/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ guide/          # AI Chat with voice I/O
β”‚   β”‚   β”œβ”€β”€ navigator/      # Service map + AI discovery
β”‚   β”‚   β”œβ”€β”€ crisis/         # Voice assessment (PEP/PrEP)
β”‚   β”‚   β”œβ”€β”€ resources/      # Educational hub
β”‚   β”‚   └── api/
β”‚   β”‚       β”œβ”€β”€ conversation/  # Gemini + rate limiting
β”‚   β”‚       β”œβ”€β”€ tts/           # ElevenLabs + caching
β”‚   β”‚       └── chat/          # SMS via Africa's Talking
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ CrisisVoiceAgent.tsx
β”‚   β”‚   β”œβ”€β”€ InteractiveServiceMap.tsx
β”‚   β”‚   └── ServiceDetailsPanel.tsx
β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   β”œβ”€β”€ tts-service.ts      # TTS caching logic
β”‚   β”‚   β”œβ”€β”€ supabase.ts         # Community ratings
β”‚   β”‚   └── telemetry.ts        # Analytics
β”‚   └── data/
β”‚       β”œβ”€β”€ servicesDirectory.ts  # 40+ verified services
β”‚       └── countryGuides.ts      # Country-specific info
β”œβ”€β”€ public/
β”‚   └── sw.js                   # PWA service worker
β”œβ”€β”€ supabase-setup.sql          # Database schema
└── package.json

πŸ› οΈ Development

# Development server
npm run dev

# Build for production
npm run build
npm run start

# Deploy to Vercel
vercel --prod

Environment Variables (Vercel Dashboard):

  • GEMINI_API_KEY
  • ELEVENLABS_API_KEY
  • NEXT_PUBLIC_ELEVENLABS_VOICE_EN
  • NEXT_PUBLIC_MAPBOX_TOKEN
  • NEXT_PUBLIC_SUPABASE_URL
  • NEXT_PUBLIC_SUPABASE_ANON_KEY
  • AFRICASTALKING_USERNAME (optional, for SMS)
  • AFRICASTALKING_API_KEY (optional)

πŸ“Š Production Status

βœ… Deployed on Vercel: sans-capote.vercel.app
βœ… 40+ Verified Services across Nigeria, South Africa, Kenya, Uganda, Rwanda, Ghana
βœ… WCAG AA Compliant with full keyboard navigation
βœ… Enterprise Security (rate limiting, CSP headers, input sanitization)
βœ… 99.9% TTS Reliability with caching and retry logic
βœ… SMS Enabled via Africa's Talking

Telemetry: Tracks 11+ event types (assessment completion, service discovery, ratings submissions, SMS delivery) with automatic PII redaction.


πŸ“„ License

MIT License - see LICENSE file for details.


πŸ™ Acknowledgments

  • Google Cloud for Gemini API infrastructure
  • ElevenLabs for natural voice synthesis and hackathon sponsorship
  • Supabase for open-source database infrastructure
  • Mapbox for mapping capabilities
  • Africa's Talking for SMS delivery
  • Community health workers across Africa for domain expertise

πŸ“š Additional Documentation


πŸ“ž Support

For technical questions:


Built for the ElevenLabs Challenge (Google Cloud Partner Catalyst Hackathon)

πŸš€ Status: Production-ready | β™Ώ WCAG AA | πŸ”’ Enterprise Security | πŸ—ΊοΈ 40+ Services | πŸ“± SMS Enabled

About

Privacy-first, culturally informed, voice-led health infrastructure for stigmatized HIV care in low-resource settings.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages