Direct voice conversation
Mira uses OpenAI Realtime over WebRTC for direct speech interaction, with semantic turn detection and interruption support. Separate transcription events populate the readable conversation.
Yash Jobalia / Project case study
I built Clinic Assistant to connect natural conversation to a working application. Mira brings direct voice interaction and typed chat to appointment and account workflows. Users explore current availability, review proposed changes, confirm actions, and see the resulting records in patient and doctor workspaces.
Built by Yash Jobalia. A fictional clinic demonstrating conversational AI for administrative workflows. Explore with fictional details.
Voice & conversational assistant
Help me book a dermatologist. I’ve had an itchy rash for three days.
Do you have a preferred doctor, or would you like the earliest available appointment?
The earliest available. I’d rather skip extra questions.
Concern: itchy rash · Duration: three days. Review the proposed doctor, time, and shared details before confirming.
Awaiting your confirmation01 / The engineering problem
I connected conversational intent to current records, explicit permissions, and reviewable workspace changes. A shared action layer gives voice, typed chat, and manual appointment controls consistent action meanings, while recent context supports follow-up requests and continuity through account access.
02 / Voice first
Mira uses OpenAI Realtime over WebRTC for direct speech interaction, with semantic turn detection and interruption support. Separate transcription events populate the readable conversation.
Input-language detection remains automatic. A searchable selector controls Mira's spoken and written reply language, defaults to English, and can update an active call.
Mira is instructed to reuse volunteered details, ask relevant follow-ups one at a time, and stop optional intake when requested. Booking details and patient-reported notes are reviewed before a workspace change is confirmed.
The workspace shows transcripts, processing status, tool activity, and completion receipts. It stores up to 200 recent transcript messages per identity; new voice sessions restore the latest 30, while typed requests use the latest 40.
OpenAI Responses powers typed chat through the same workspace action dispatcher. Users can switch to typed interaction after ending a voice call. Existing-account passwords and recovery completion stay in private forms.
Call controls support explicit hangup, idle check-ins, session cleanup, and a brief connection-recovery grace period. Processing states and tool activity keep users informed throughout the conversation.
Mira supports exact email or full-phone account lookup, private sign-in handoff, assisted registration, and password recovery. Guest tasks can resume after sign-in. Country-aware phone normalization and optional gender support flexible account setup, with credentials handled through dedicated account flows.
03 / From intent to appointment
A signed-in patient asks, “Help me book a dermatologist.”
Mira retrieves current choices, clarifies the preferred time, and gathers relevant intake details the patient chooses to share.
The patient reviews the doctor, time, and summarized notes, makes corrections, and confirms by voice, text, or button.
The server rechecks availability and saves the confirmed appointment. A completion receipt accompanies the updated list and calendar.
Explore specialists and availability, ask about Clinic Assistant, and begin account access. Mira can look up an exact contact match, open private sign-in, or prepare registration.
Book, cancel, and reschedule owned appointments; read visit notes; and save reviewed messages in existing appointment notes. Patients can update supported profile fields and navigate appointment, calendar, and account views.
Protected doctor accounts can search and read clinic-wide appointments, cancel upcoming visits, and request patient rescheduling while retaining the original slot. Doctors can also book their own care with another doctor.
Manual system, light, and dark appearance controls persist in the browser and sync with signed-in accounts. Mira can guide users to settings. The installable PWA includes a reconnect page for returning to connected workflows.
04 / Architecture
Voice tools, typed tools, and manual appointment/profile proposals share the workspace dispatcher:
05 / Engineering decisions
A TypeScript semantic layer defines entities, relationships, action meanings, role rules, and appointment states. Shared contracts and Zod schemas feed AI instructions, server policies, and result labels.
Workspace mutations use signed, identity-scoped drafts that expire after ten minutes and bind the proposed arguments and ontology version. Confirmation rechecks current facts and claims a single-use token before execution.
Server session and ownership checks work with PostgreSQL row-level policies, protected doctor assignments, column grants, and scoped database functions. Doctor accounts can inspect clinic appointments; patient access remains owner-scoped.
Rescheduling uses a database function and slot uniqueness constraint to move an owned appointment atomically while retaining its reference and notes. A doctor's rescheduling request is a separate flag and keeps the existing slot reserved.
Structured receipts identify proposals and completed changes. Typed orchestration retains returned action effects throughout the conversation. Reviewed patient messages are saved in the notes of their existing appointment.
Recent transcripts support continuity across visits. Generated credentials are delivered separately from model tool results. The installable PWA caches public icons and a reconnect page, with connected AI and account workflows.
06 / Engineering quality & demonstrated skills
The September 18, 2026 source audit at commit 3f2044c confirmed passing TypeScript checks, a successful production build, and all 54 unit tests passing. Unit coverage exercises role and ownership policies, current-fact validation, replay rejection, action schemas, and phone normalization.
This project brings together real-time browser audio, conversational state, tool orchestration, typed API contracts, authentication, database permissions, and accessible full-stack interfaces.
Local Playwright tests use mocked application and Realtime interactions to exercise language selection, guest-task continuity, doctor workflows, action receipts, processing states, appearance preferences, and PWA caching.