Skip to content

Repository files navigation

Deblo — AI Clinic Front Desk + Voice Consultations

Hybrid MediDesk upgrade: public symptom intake (safety + triage + booking), doctor RAG dashboard, admin analytics — while keeping Clerk auth and Vapi voice consultations.

DEMONSTRATION ONLY — Not for real medical use.

Features

  • Public intake chat — safety layer (regex + LLM), streamed chat, background triage
  • Emergency escalation — full-screen takeover with 108 / mental-health helplines
  • NL appointment booking — tool calling against real DB slots (no hallucinated times)
  • Voice consultations — existing Vapi flow, with pre-call safety check
  • Intake → voice bridge — continue from triage into a specialist voice session
  • Doctor queue + RAG — urgency-sorted queue; patient-scoped Upstash Vector namespaces
  • SOAP note drafting — AI draft, doctor must approve
  • Admin — analytics, safety events, immutable audit log
  • Clerk rolespublicMetadata.role: patient | doctor | admin

Quick Start

npm install
cp .env.example .env   # fill keys
npm run db:push
npm run seed
npm run seed:vector    # optional — needs Upstash Vector
npm run dev

Open http://localhost:3000.

  • Patient intake: /intake
  • Voice dashboard: /dashboard (Clerk sign-in)
  • Doctor: /doctor/dashboard (set Clerk publicMetadata.role = "doctor")
  • Admin: /admin/analytics (role = "admin")

Environment

See .env.example. Key vars:

Variable Purpose
DATABASE_URL Neon Postgres
Clerk keys Auth + roles
GEMINI_API_KEY / GOOGLE_GENERATIVE_AI_API_KEY Intake / triage / RAG
NEXT_PUBLIC_VAPI_API_KEY Voice
Upstash Vector / Redis RAG + rate limiting
NEXT_PUBLIC_DEMO_MODE Demo banner (default on)

Scripts

Command Description
npm run db:push Push Drizzle schema (additive)
npm run seed Seed doctors, 12 synthetic patients, slots
npm run seed:vector Embed patient notes into namespaces
npm test Safety + mapping unit tests

Architecture (short)

Intake message → rate limit → injection check → regex safety → LLM safety
  → if emergency: escalate (no chat)
  → else streamText chat (+ booking tools)
  → parallel: triage extract → DB
Voice: existing Vapi; pre-call POST /api/intake/safety-check
Doctor RAG: Upstash namespace patient_{uuid} only

License

MIT — portfolio/demo. Do not ship for real medical care.

About

Deblo is a full-stack AI-powered virtual doctor consultation app that lets users interact with intelligent medical agents based on their symptoms

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages