mbaneshi.ir
← Case studies

Taban Dental Clinic, Shiraz · Healthcare — dental · Jul 2026 — ongoing

Taban Dental Clinic — from a broken WordPress to a business on one spine

A real clinic in Shiraz: a spam-injected WordPress, a booking form that took twelve bookings in its life, and every daily task scattered across WhatsApp and Instagram. Rebuilt as a platform, one measured phase at a time — in public.

Problem

Taban Dental Clinic is the practice of Dr. Seyed Amin Yousefi, a periodontist and implant surgeon in Shiraz. On paper it had a digital presence. In practice:

  • The clinic site ran WordPress with a purchased theme still on its demo content, 18 active plugins, and a 209 MB database carrying injected spam URLs.
  • The booking form had taken roughly twelve real bookings in its entire life — 17 rows, four of them obvious tests — and had been dark since 25 February 2026. Nobody had noticed.
  • The doctor’s own domain, dr-yousefi.ir, was serving the theme demo’s actress/influencer persona on a surgeon’s professional site. Later, an “Under Construction” page.
  • Every day-to-day task — the same twenty patient questions, bookings, reminders, post-treatment follow-up, content — was manual and scattered across phone, WhatsApp and Instagram.

Two constraints were measured rather than assumed, because they decide the architecture: the Tehran VM had 1 core and 1.9 GB of RAM (the intended stack needs 2.05 GB before the first visitor), and the production origin has no outbound access to any foreign IP at all — not GitHub, not npm, not Let’s Encrypt.

The problem was never one broken feature. It was that the business had no spine.

Approach

Frame first. The original ask — “move the booking form to Telegram” — was superseded within the first session. The unit of work is the whole business running on one core, with booking as module 3 of 8: front door with attribution, AI reception, booking, patient record (the asset the clinic actually owns), the clock (reminders, six-month recall, follow-up — where the money is), a demand-fed content engine, the doctor’s command desk, and measurement. Written down as a reusable blueprint, with this clinic as instance #1.

Design around the walls, not through them. Four measured Telegram limitations — bots can’t schedule, can’t message first, get no analytics, and Stars is the only payment rail with no Iran cash-out — led to one decision that de-risks everything: the core lives on Cloudflare; Telegram, the site, and tomorrow Bale or Eitaa are thin doors into it. Telegram being filtered in Iran then becomes non-fatal.

Turn the light back on before building. Phase 0 was the already-written WordPress repair, so the existing path wasn’t dead for the weeks the platform takes.

Ship the doctor’s site as a real product. dr-yousefi.ir was rebuilt as a Next.js 16 app: RTL Persian, his real bio and credentials, a contact form with rate limiting writing to SQLite, a password-gated admin view for the front desk, before/after treatment slider, exact-coordinate map. Tested with Vitest and Playwright. Because the origin can’t reach the internet, the build happens in a Linux container on my machine and ships as a tarball; TLS terminates at the ArvanCloud edge; Caddy and systemd supervise the process. Documented as a runbook so it can be rebuilt from scratch.

Port the clinic site off WordPress without a redesign. Content was extracted from a 42-directory rendered mirror — clean text and real images — rather than from Elementor JSON blobs in a compromised database. 46 images, 9 MB, no runtime dependency on the old host. A faithful reproduction, not a redesign: the clinic keeps the look its patients know.

Rebuild booking so it can’t lie. Custom schema on Directus over Postgres, matching the old plugin’s real flow — service → doctor → slot → confirm, no payment. Double-booking is prevented by a partial unique index in the database, not by application code; already-booked slots disappear from the calendar; conflicts surface as a friendly Persian error. Cal.com was evaluated and rejected on the record. Dates stored UTC, rendered Jalali at the edge.

Own the infrastructure. Terraform and Ansible for ArvanCloud — server, managed Postgres, object storage, CDN — with a readiness playbook run before anything is provisioned. Sizing was worked out from measurement: one Directus for all sites, one database with logical schemas, build elsewhere, render statically where possible.

What was deliberately not done: no ads before foundations, no agency, no “strategy deck”, no rebuilding of anything that already existed and worked.

Outcome

Shipped

  • dr-yousefi.ir live since 21 August 2026 — the surgeon’s site finally describes the surgeon.
  • The clinic site ported and reproducible from source; the WordPress dependency is gone.
  • Booking rebuilt with a database-level guarantee against double-booking, the patient-accounts data model (OTP login, scoped service account) in place, and a single CMS provisioned and loaded with the site’s content.
  • Infrastructure as code for the clinic’s Arvan estate; a Telegram bot (@tabandentalclinicbot) scaffolded on Cloudflare Workers as the first thin door.

In delivery

  • The clock: appointment reminders, six-month recall, day-after-surgery check-in, lapsed-patient chase. The first place the system earns money without anyone touching it.
  • AI reception: the twenty questions, streamed token-by-token, with a human in the loop.
  • Measurement from day one — because for a Telegram-fronted business, numbers not logged are numbers destroyed.

Not yet claimable: patient-facing traffic and booking numbers. The before-state is documented precisely so that the after-state can be reported honestly, on this page, as each phase lands.

Built in public as The Leverage Age — Episode 1 is the audit.