Eyelark: patient scheduling for a two-doctor optometry practice

Eyelark: patient scheduling for a two-doctor optometry practice

00 Markdown

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.

Agent specs

Agent
Claude Code, Opus 5.5 Medium
Time
18 min
Cost
$6.14*

Agents work faster and more accurately on Elements.

* Cost at API rates, September 2026.

Run it yourself

Paste this prompt into your AI agent. You get the finished app on your own machine, ready to change however you like.

Agent Chat
Install elements:
curl -fsSL 'https://install.elements.dev?os=darwin' | sh && export PATH=~/elements/bin:$PATH

Create an Elements app from the elementscode/demo-eyelark scaffold:
cd ~/elements/projects
elements create eyelark -scaffold=elementscode/demo-eyelark
cd eyelark

Start the app.

Need an AI agent?

In AI desktop apps, paste into the Code tab, not the general chat.

How it's built

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.

The code

Build it from scratch

To watch your agent build this app from an empty project, use the prompt we used instead. It takes longer than starting from the finished app above.

Agent Chat
Install elements:
curl -fsSL 'https://install.elements.dev?os=darwin' | sh && export PATH=~/elements/bin:$PATH

Create an Elements app:
cd ~/elements/projects
elements create eyelark
cd eyelark

Start the app, then build this:

Build a patient scheduling app named eyelark for a small optometry practice with
two doctors.

PATIENT
- Book an appointment online: type (comprehensive exam, contact lens fitting,
  follow-up), doctor or first available, and an open time.
- Fill in an intake form before the visit: insurance, current glasses or
  contacts, symptoms, medications.
- Confirmation and reminder emails, with a link to reschedule.

FRONT DESK (staff accounts)
- Day view per doctor with each appointment's type and intake status.
- Check patients in, mark visits complete.
- Patient records: contact details, past visits, next recall date.
- Recall: each completed exam sets a recall date a year out. Every morning,
  patients due for a recall in the next 30 days get an email to book.

Seed two doctors, two front desk staff, thirty patients with visit history,
and a week of appointments. Show the staff logins on the sign-in page.

The day view updates in real time as patients book and check in.

The weekly digest

New lessons, demos and posts from elements.dev, in one email a week.

Comments· 0