- Status: Active
- Type: Voice-first mental health support backend
- Core integrations: Twilio, Ultravox, Gemini, MongoDB
- CI checks: dependency install + JavaScript syntax validation
Meraki is a voice-first mental health support backend that connects incoming Twilio calls to Ultravox, stores conversation records, and performs Gemini-based risk analysis for post-call monitoring.
- Handles incoming phone calls via Twilio webhook (
POST /incoming) - Creates and connects Ultravox voice sessions for callers
- Processes call completion events from Twilio/Ultravox (
POST /ultravox/events) - Fetches transcripts and recordings
- Runs AI risk analysis with Gemini (text + audio workflows)
- Stores conversation history in MongoDB (with JSON fallback)
- Provides an operations dashboard and conversation detail UI
- Exposes health and metrics endpoints for monitoring
Caller -> Twilio -> Meraki (/incoming) -> Ultravox
|
v
/ultravox/events webhook
|
v
Transcript/Recording + Gemini Analysis
|
v
MongoDB or data/conversations.json
|
v
Dashboard + API + Health/Metrics routes
- Node.js, Express
- Twilio SDK
- Ultravox API
- Google Gemini (
@google/generative-ai) - MongoDB driver
index.js # App bootstrap
src/config/ # Env/config + prompt setup
src/routes/ # Route registration
src/controllers/ # Incoming call, webhook, API handlers
src/services/ # Ultravox, risk analysis, service manager
src/database/ # MongoDB + local file persistence
src/views/ # Dashboard HTML and conversation pages
data/conversations.json # Local fallback store
Core call flow:
POST /incomingPOST /ultravox/events
Dashboard and pages:
GET /dashboardGET /conversations/:id
Conversation APIs:
GET /api/conversationsPOST /api/conversations/:id/refreshPOST /api/conversations/:id/regenerate-analysisGET /api/conversations/:id/recordingGET /api/conversations/:id/fresh-dataPOST /api/conversations/refresh-allPOST /api/conversations/import-from-ultravoxPOST /api/conversations/cleanup-invalid
Operational endpoints:
GET /healthGET /health/detailedGET /webhook/statusGET /metricsPOST /maintenancePOST /test/webhook
Required:
ULTRAVOX_API_KEY
Common:
PORT(default:5000)BASE_URL(public URL for webhook callbacks)NODE_ENVULTRAVOX_MODELULTRAVOX_VOICE_IDULTRAVOX_TEMPERATUREFIRST_SPEAKERSYSTEM_PROMPTGEMINI_API_KEY(orGOOGLE_API_KEY)GEMINI_MODELMONGODB_URIMONGODB_DBMONGODB_COLLECTION
If MONGODB_URI is not set, Meraki writes to data/conversations.json.
- Install dependencies:
npm install-
Configure environment in
.env. -
Start server:
npm run devProduction mode:
npm start- Expose the service over HTTPS.
- Point Twilio voice webhook to
https://<your-domain>/incoming(POST). - Configure status/callback events to
https://<your-domain>/ultravox/events. - Restrict dashboard access in production because it surfaces sensitive conversation data.
Meraki is a support and monitoring tool, not a replacement for licensed clinical care or emergency services. For immediate crisis situations, route users to local emergency and professional mental health resources.