--- title: "Eyelark: patient scheduling for a two-doctor optometry practice" author: "@chris" author_url: https://elements.dev/users/chris published: 2026-09-30T20:42:51.500Z url: https://elements.dev/demos/vcnnktux/eyelark-patient-scheduling-for-a-two-doctor-optometry kind: post format: article --- # Eyelark: patient scheduling for a two-doctor optometry practice by [@chris](https://elements.dev/users/chris) ยท 2026-09-30 ## Description Patients book eye exams online by visit type and doctor and fill in intake forms; the front desk gets a live day view, check-in, patient records and yearly recall emails. Eyelark needed online booking with two doctors, visit emails, a live front desk view, and a daily recall run. Each of those is a part of Elements, so the agent spent its 18 minutes on the practice's scheduling itself. **What Elements gave the app** - **A live day view.** Bookings, check-ins and intake forms notify a channel with the day that changed, and the front desk re-reads the day it is showing, so a new booking appears on the open day view as the patient confirms it. - **Online booking.** The booking page finds open times for both doctors in one SQL query and books through an `@rpc` function. It locks the doctors first, so each time goes to one patient and "first available" picks the free doctor. - **Emails from jobs.** Booking schedules a confirmation email in the same transaction, and one-line cron schedules send reminders every 15 minutes and recall notices every morning. Each email links the patient to the intake form and to reschedule. - **Visit links for patients.** Each appointment has a private link where the patient reschedules, cancels or fills in the intake form straight from their email. - **Recall from the visit itself.** Marking a comprehensive exam complete sets the patient's next recall a year out. Front desk pages and server calls check the staff session. - **Data from SQL files.** Migrations define the schema and seed two doctors, two front desk accounts, thirty patients with visit history and recall dates, and a week of appointments from the day it runs. The project server applied each one as soon as it was saved. **What the project server gave the agent** The project server runs alongside the agent and answers as soon as a file is saved: it type-checks the templates, TypeScript and SQL, applies migrations and reruns the tests, so every question came back right away and the agent kept building. **What shipped** The app type-checks with zero errors and all 34 tests pass. Every page works on desktop and phone, and live updates arrive across tabs, such as a patient's booking appearing on the front desk's open day view.