How danuphonchatphueak/w13-clinicapp-starter works
This is a small clinic appointment application: patients view doctors and appointments, book or cancel appointments, and see the refreshed results. The React app calls Express routes; those route handlers obtain a pooled Azure SQL connection and perform the doctor and appointment queries or mutations. The README documents the SQL schema and sample-doctor seed data. Source excerpts show the client and API behavior; database setup relationships are documented in the README, while SQL file contents were not sampled.
Main entry points: App.jsx Clinic interface · db.js SQL connection pool · index.js Doctor listing · main.jsx React entry
Components 11
Web app
- React entry
web/src/main.jsx - Clinic interface
web/src/App.jsx
Clinic API
- Doctor listing
server/index.js - Appointment listing
server/index.js - Appointment booking
server/index.js - Appointment cancellation
server/index.js - SQL connection pool
server/db.js
SQL data
- Table schema
db/schema.sql - Doctor seed data
db/seed-data.sql - Azure SQL
Other components
- Patient
Connections 13
- Patient → Clinic interface: uses
- React entry → Clinic interface: renders
web/src/main.jsx - Clinic interface → Doctor listing: requests doctors
web/src/App.jsx - Clinic interface → Appointment listing: requests appointments
web/src/App.jsx - Clinic interface → Appointment booking: submits booking
web/src/App.jsx - Clinic interface → Appointment cancellation: requests cancellation
web/src/App.jsx - Doctor listing → SQL connection pool: gets connection
server/index.js - Appointment listing → SQL connection pool: gets connection
server/index.js - Appointment booking → SQL connection pool: gets connection
server/index.js - Appointment cancellation → SQL connection pool: gets connection
server/index.js - SQL connection pool → Azure SQL: connects
server/db.js - Table schema → Azure SQL: defines tables for
README.md - Doctor seed data → Azure SQL: loads sample doctors
README.md