Online booking with intake forms, built by Claude Code on Elements

Online booking with intake forms, built by Claude Code on Elements

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.

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.

  • 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.

Why Elements

Elements is an integrated full-stack app framework and a project server. The project server checks the agent's work as it builds: it type-checks the server and browser code, analyzes the program, applies migrations and runs the tests, then reports the results to the agent. A security mistake, such as calling a server-only function from the browser, is a compile error. The agent reads the report and fixes its own mistakes before it tells you a feature is done. The same checks run on every feature you ask for next.

Run it yourself

  1. 1 Sign up

    Already have an account? Sign in

  2. 2 Install and run the demo One prompt to paste into your agent.

View the code on GitHub →

The prompt

What Claude was given to build this app.

Agent Prompt
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.