Edit the clinic details
Open lib/clinic.ts. It is the one file most clinics need to change, and everything in it is fictional placeholder content:
name, fullName, tagline and motto (shown in the loader and footer)
phone, email, address and directions
timeZone: an IANA zone such as Europe/London, used by the live "open now" indicator
hours: opening and closing times per weekday as "HH:MM" strings, or null for closed
services: id, name, a short blurb and the typical visit length in minutes. They drive the booking chips, and the five treatment chapters read their title and blurb from the ids implants, whitening, aligners, hygiene and veneers
team and testimonials: sample cards and quotes. Publish only genuine reviews, with the patient's consent
booking: slot length, number of days shown and lead time
Change the colours
The theme object in lib/clinic.ts holds the colour tokens:
| Token |
Used for |
paper / paperDeep |
page background and the 3D backdrop gradient |
ink |
text |
accent |
highlights, the dissolve glow and the scan line |
accentDeep |
buttons, active states and callout lines |
accentSoft |
soft fills and the caustic tint |
gum |
gum base colour |
They are injected as CSS custom properties on <html> and read by the 3D materials, so one edit recolours both the page and the scene.
Change the fonts
The fonts (Instrument Serif for headings, Manrope for text and Geist Mono for labels) are loaded in app/layout.tsx. Swap them for other fonts from the same font loader and keep the CSS variable names.
Edit the chapter copy
lib/chapters.ts holds the kicker, title and tagline for each chapter, the anatomy layer names and the whitening shade ladder. Keep treatment text general and educational: no outcome claims and no prices.
Change the 3D
The scene has no model or texture files. Every tooth, the gum and bone, the aligner tray and the veneers are signed-distance fields in lib/sdf/ that are meshed in a Web Worker pool at load time (lib/meshes.ts).
- Shapes: edit the tooth fields in
lib/sdf/teeth.ts and the arch layout in lib/sdf/arch.ts.
- Materials and effects:
components/scene/materials.ts holds the enamel, dentin, gum and bone materials and the dissolve shader.
- Treatment moments:
components/scene/Molar.tsx, Implant.tsx, Whitening.tsx and Arches.tsx.
- Camera:
components/scene/CameraRig.tsx holds the per-chapter camera stops, with separate desktop and portrait tables.
- Post-processing: bloom, chromatic aberration, tone mapping, grain and vignette are in
components/scene/Experience.tsx.
To use your own model instead, load a GLB with three.js's GLTFLoader inside the relevant scene component and give it the materials from materials.ts.
Connect bookings
components/ui/Booking.tsx confirms the request in the browser and offers an .ics calendar file; nothing is sent. To go live, replace the onSubmit handler with a call to your booking system or a Next.js server action, and keep the "nothing is sent" note until you do.
Reduced motion
Visitors with prefers-reduced-motion get no smooth scrolling, snapping, idle spin or autoplay, and each treatment shows its final state. Test it by turning on reduced motion in your operating system's accessibility settings.
Disclaimer
Replace the fictional clinic, people and reviews with your own, and have the treatment text reviewed before you publish. The template's medical text is general information, not advice.