Case study · Health · AI

DentaPilot

An AI assistant for dental practices, built for a Netherlands startup and tested by 31 dentists. One chat endpoint turns into eight kinds of structured result, and on-device Whisper brought chat responses from 2-5 seconds to under one.

Role
Software Engineer, part-time contract (iOS and Go)
Client
Netherlands startup · pending license
Stack
Swift · SwiftUI · Whisper · Go (hexagonal) · OpenAI API · CMS
Result
Chat <1s · voice latency −70% · 31 dentists on TestFlight
Overview

A dental practice from one tab bar

DentaPilot is an AI platform for dental practices, built for a startup in the Netherlands. One iPhone app holds an AI chat and voice assistant called Pilot, patient charts, appointments, a supplies marketplace and the practice's finances.

I joined the small startup team as a part-time software engineer and worked on both sides: the SwiftUI client and the Go backend, including the chat and voice integration with OpenAI's API. Development is complete. 31 dentists tested it through TestFlight, and the launch is waiting on a license in the Netherlands.

A practice usually runs on separate systems for charts, calendar, suppliers and books. The idea was one assistant in front of all of them, so a dentist can ask a plain question and get back the right kind of answer: an appointment card, a patient note, a finance line, or just a reply.

Constraints

What we were working with

  • iOS 18 and up, iPhone only. A narrow target, on purpose.
  • Two backends. A Go REST API for chat, patients, calendar and finance, and a separate CMS for the marketplace catalog.
  • Replies are also UI. What the assistant says has to be turned into structured cards, and the prompt on the server and the parser on the client have to agree on the shape.
  • Voice on very different phones. Dentists use whatever iPhone they have, from the latest model to an iPhone 7.
  • A small team moving fast. No separate QA team, so a lot of testing happened by hand with real dentists.
Architecture

One endpoint, eight shapes

One repository facade in front of four small repositories, all sharing one network layer. The assistant's reply is sorted into a typed UI result on the device.

DentaPilot architecture: PilotScreen and voice capture talk through MainRepository and NetworkService to a Go REST backend and a separate Strapi-style CMS for the marketplace. IOS CLIENT PilotScreen Chat UI · ViewModel Voice capture AVAudioRecorder · adaptive VAD ChatParsedContent Classifies content into 8 UI types MainRepository Chat · Voice · Marketplace · User NetworkService URLSession · X-User-ID header AuthenticationService Keychain-backed session state BACKEND Go REST API /chat · /voice-chat · /user /finance/transactions Assistant response One content string, 8 possible shapes Marketplace CMS Products · categories · banners REST
The assistant returns one content string. Whether it becomes a chat bubble, an appointment card or a finance line is decided on the device after the reply arrives.

A message appears in the chat right away, then goes through MainRepository and NetworkService to the Go backend's /chat endpoint. The answer is one content string. ChatParsedContent decides what it is (by a type prefix, by trying to decode JSON, or by falling back to plain text) and turns it into one of eight result types: appointment, patient, event, course, news, finance, message or text. Each has its own card.

On the server, the Go code follows a hexagonal layout (ports and adapters), split into services, with the SOLID principles doing a lot of the quiet work. Robert C. Martin's point in Clean Architecture that the domain should not know about the web or the database is exactly what let us change the AI provider calls without touching the scheduling logic.

Voice

Making the assistant fast to talk to

Speed was the thing dentists noticed first, so it is where I spent the most time.

I moved speech transcription onto the phone with Whisper. Newer iPhones run a heavier, more accurate model locally. Older devices (iPhone X, XS, 8, 7 and below) fall back to Whisper on the server, so accuracy stays high without draining the battery on hardware that cannot keep up.

Chat responses used to take 2 to 5 seconds. Tightening tokenization and moving more processing onto the device brought that under a second. Voice response latency dropped by about 70%.

The app also has to decide when someone has finished speaking. The first version used one loudness threshold and a fixed second of silence, which either cut quiet speakers off or left dead air. I replaced it with an adaptive detector that calibrates to the room's noise floor, smooths loudness, and tells a natural pause from a breath from the actual end of a sentence. The silence window now moves between 0.8 and 2.5 seconds.

Decisions

What we chose, and what we paid for it

One generic chat endpoint instead of one endpoint per action

The assistant can return any of eight result shapes. A new capability is a new parsing case on the client, not a new backend release.

What it cost

Parsing free text is fragile. The parser takes the text between the first { and the last } and falls back to showing the raw reply when nothing decodes.

Whisper on the device, with a server fallback by device tier

Fast, private transcription on phones that can handle it, and the same accuracy on phones that cannot.

What it cost

Two transcription paths to maintain and test, and device detection that has to stay current as new iPhones come out.

Two backends, split by concern

Practice data stays in our Go API. The product catalog, which is naturally content-managed, lives in a CMS.

What it cost

Nothing shared between them except what the client puts together, so making them feel like one app is the client's job.

Small, hand-written networking

Fast to change and almost no third-party code.

What it cost

Things like retry policy and offline caching had to be added by us, one at a time.

Results

What changed for the people using it

2-5s → <1s
Chat response time
From tighter tokenization and more processing on the device.
−70%
Voice response latency
With on-device Whisper on capable iPhones.
31
Dentists on TestFlight
Validating the app before launch, which is waiting on a Netherlands license.
Looking back

What a fast build taught me

  • A generic endpoint moves the fragility, it does not remove it. Putting it in the client parser was right for speed. As the surface grows, I would move toward a typed, discriminated response contract.
  • Simple voice detection does not survive real people. The first version made sense on paper. Dentists talking between patients proved otherwise.
  • Build authentication in from day one. Login arrived late in this project, and a few early decisions would have been different if it had been there from the start.