Inspiration
When a clinic booking changes, the patient often never hears about it. A slot gets moved, a double booking gets sorted out, a treatment runs long, and the message to the patient either never goes out or goes out late. They turn up at the wrong time, the chair sits empty, and there is an awkward conversation at the desk. It happens because the schedule lives in a spreadsheet or a WhatsApp thread, and telling the affected patient is a separate manual job nobody has time for. I work on clinic operations tooling (Boto, boto.clinic) and keep seeing the same pattern.
What it does
Drop a CSV of appointments (one day or a whole week) into the local web app, or run it from the command line.
- Finds five kinds of mistake: overlapping bookings, turnarounds shorter than your minimum gap, a late first booking, the same patient booked into two overlapping slots, and phone numbers that can never receive the confirmation text.
- Fixes the schedule with the fewest moves. It keeps the largest set of bookings that already work together (weighted interval scheduling, O(n log n)), then moves only the rest, each to the nearest free slot inside opening hours. On the sample day, 4 scheduling conflicts become 0 with 2 moves.
- Drafts the patient message for every booking that moved, ready to copy in one click, so telling people takes seconds.
- Fits a walk-in: ranks every possible slot by how many existing bookings would have to move, with their messages drafted.
- Shows an interactive chair timeline (conflicts in red), a week overview with utilisation per day, and exports a calendar file (.ics) for Apple or Google Calendar plus the corrected schedule as a CSV.
- Runs entirely on the clinic's own computer: the server binds to 127.0.0.1, with no account, no cloud and no tracking.
How we built it
Pure Python 3 standard library for the engine, the local JSON API (http.server) and the CLI, plus a dependency-free single-page interface in vanilla JavaScript and CSS, themed on the Boto design system. Rows are grouped by day before analysis so week mode reuses exactly the same logic per day, and the interface only renders what the Python engine returns, so there is one source of truth for the scheduling rules. There are 61 automated tests, including a brute-force check that the rescheduler's keep-set is optimal on random schedules and a live HTTP round-trip test.
Challenges we ran into
- Turning detection into resolution. Choosing which bookings to move is an optimisation problem, not a heuristic. I modelled it as weighted interval scheduling and verified it against a brute-force search of every subset.
- Getting the calendar export right: escaping order, line folding at 75 octets, and stable UIDs so re-importing does not duplicate events.
- Week mode: comparing appointments across days is nonsense (Friday against Monday), so grouping by date first became the core design decision.
Accomplishments that we are proud of
A tool that does not stop at flagging a problem: it fixes the schedule, writes the patient message, and proves its own correctness with tests, all offline and with no dependencies.
What we learned
How strict real file formats are, how much value comes from closing the loop (find the clash, fix it, tell the patient), and why dependency-free tools are a feature for non-technical users.
What's next for SlotBrief
Google Sheets and Notion import, opt-in SMS sending through a clinic's own provider (credentials never stored in the repo), and a link into Boto's live booking calendar.
AI disclosure
I used an AI coding assistant (Claude) to help write, test and review code and tooling during the event. The idea, scope, design decisions, testing and submission are mine. The demo video is an automated screen recording of the running app and real terminal commands; the narration is text-to-speech.
Built With
- cli
- css
- healthcare
- html
- http-server
- icalendar
- javascript
- python