ProjectBuild an AI Voice Receptionist: the explanation · Module 6: Staff sign-in, roles and voice sessions · part 8 of 23
Part 8 · Module 6: Staff sign-in, roles and voice sessions

Module 6: Staff sign-in, roles and voice sessions

24 min read·
About 45 minutes · Needs: Module 4 (high-level design) and Module 5 (data model and protocol) · Code: backend/app/core/security.py, backend/app/core/rbac.py, backend/app/services/auth_service.py, backend/app/api/routes/auth.py, backend/app/api/routes/voice.py, backend/app/api/deps.py

Where this fits

WHERE THIS FITS The Medilane voice receptionist this module CLIENT React API LAYER FastAPI SAFETY SPEECH IN BRAIN LangGraph SPEECH OUT KNOWLEDGE AND DATA pgvector OPERATIONS Langfuse, Prometheus Caller app browser mic Staff app desk and admin REST API staff, sessions Voice socket audio both ways Auth + RBAC staff roles, voice tokens Guardrails emergency, PII VAD Silero, turns Whisper speech to text Language en, hi, Hinglish Agent tools, confirm Open models Groq: gpt-oss, Qwen Kokoro TTS en + hi voices Retrieval multilingual Ingestion clinic documents PostgreSQL clinic, calls, vectors Redis events, limits Front desk live events, hand-offs Observability traces, metrics Evaluation WER, safety, latency
Both front doors are highlighted (blue): staff sign in through Auth + RBAC, callers get a voice session from the REST API, and the counters live in Redis.

The receptionist has two front doors. Staff sign in and see transcripts, patients and appointments, so their door needs strong locks. Callers use a public call page with no account, so their door needs limits: a short-lived ticket per call and caps per address. This module covers both doors and the Redis counters behind them.

The rest of this project is yours to keep

This project is bought on its own, once, and stays readable afterwards, including the parts added to it later.

Or open everything with a plan