Phase 2 — GraphQL

Appointment Booking Platform

A dental clinic with 3 dentists manages appointments through phone calls and a paper logbook. They want patients to book online, staff to manage the schedule, and no two patients to book the same dentist at the same time.

Two interfaces: public booking page and admin dashboard. GraphQL shines here — the booking page needs provider info, available slots, and service details in a single query instead of three REST calls. The core algorithmic challenge is time slot computation and double-booking prevention.

What to Build

Decisions You'll Make

How to design your GraphQL schema (types, queries, mutations) vs. how you would have done it with REST. How to handle slot calculation — is it a custom query that accepts a date and provider and returns available slots? How to prevent double-booking with atomic mutations. How to structure resolvers for nested data (a booking has a provider, a service, and a patient). How to handle auth in GraphQL context vs. Express middleware.

Stack

GraphQL Apollo Server Apollo Client React Node.js MongoDB Mongoose JWT React Router Custom Hooks Vitest