How frontfury/doc-sheba-client works
DocSheba is a Next.js hospital-management client. Its main patient journey runs from doctor discovery through authenticated booking and appointment submission; role-specific dashboards support follow-up and administration. The sampled server actions and API adapters connect UI operations to a separately configured backend, while Better Auth uses MongoDB for identity persistence. The README documents assistant review, availability, cancellation, and notifications, but this tree does not expose a distinct assistant workspace or those implementations, so those capabilities are represented only where supported by the client structure. Some dashboard and profile links are omitted because their wiring was not sampled.
Main entry points: appointments.js Appointment actions · page.jsx Booking page · server.js Authenticated requests · session.js Session and roles
Components 25
Public discovery
- Home experience
src/app/page.jsx - Symptom selector
src/components/Home/Body/SymptomSelector.jsx - Doctor directory
src/app/doctors/page.jsx - Departments
src/app/departments/page.jsx
Booking and care
- Booking page
src/app/book-appointment/page.jsx - Booking form
src/app/book-appointment/BookingForm.jsx - Appointment actions
src/lib/actions/appointments.js
Role workspaces
- Patient workspace
src/app/dashboard/patient/page.jsx - Doctor workspace
src/app/dashboard/doctor/page.jsx - Appointment list
src/components/Dashboard/AppointmentList.jsx - Admin user management
src/app/dashboard/admin/users/page.jsx - Patient profile
src/app/dashboard/patient/profile/PatientCreateForm.jsx - Doctor profile
src/app/dashboard/doctor/doctor-profile/DoctorProfile.jsx
Identity and integration
- Sign in and signup
src/app/auth/signin/page.jsx - Auth client
src/lib/auth-client.js - Auth service
src/lib/auth.js - Auth MongoDB
- Session and roles
src/lib/core/session.js - Appointment API adapter
src/lib/api/appointments.js - Doctor API adapter
src/lib/api/doctors.js - Patient API adapter
src/lib/api/patients.js - Authenticated requests
src/lib/core/server.js - User actions
src/lib/actions/users.js
Other components
- Patient
- Hospital backend
Connections 34
- Patient → Home experience: browses
- Patient → Doctor directory: finds doctors
- Doctor directory → Session and roles: checks session
src/app/doctors/page.jsx - Doctor directory → Booking page: routes to booking
src/app/doctors/page.jsx - Home experience → Symptom selector: renders
src/app/page.jsx - Patient → Sign in and signup: registers or signs in
- Sign in and signup → Auth client: uses
src/app/auth/signin/page.jsx - Auth client → Auth service: authenticates through
- Auth service → Auth MongoDB: persists identity
src/lib/auth.js - Session and roles → Auth service: reads session
src/lib/core/session.js - Patient → Booking page: requests appointment
- Booking page → Session and roles: checks role
src/app/book-appointment/page.jsx - Booking page → Doctor API adapter: loads doctor
src/app/book-appointment/page.jsx - Booking page → Patient API adapter: loads patient
src/app/book-appointment/page.jsx - Booking page → Booking form: renders form
src/app/book-appointment/page.jsx - Booking form → Appointment actions: submits request
src/app/book-appointment/BookingForm.jsx - Appointment actions → Session and roles: checks role
src/lib/actions/appointments.js - Appointment actions → Doctor API adapter: loads doctor details
src/lib/actions/appointments.js - Appointment actions → Patient API adapter: loads patient details
src/lib/actions/appointments.js - Appointment actions → Appointment API adapter: loads appointments
src/lib/actions/appointments.js - Appointment actions → Authenticated requests: mutates appointments
src/lib/actions/appointments.js - Doctor API adapter → Authenticated requests: fetches doctor data
src/lib/api/doctors.js - Patient API adapter → Authenticated requests: fetches patient data
src/lib/api/patients.js - Appointment API adapter → Authenticated requests: fetches appointments
src/lib/api/appointments.js - Authenticated requests → Session and roles: gets token
src/lib/core/server.js - Authenticated requests → Hospital backend: sends requests
src/lib/core/server.js - Patient workspace → Appointment API adapter: loads appointments
- Doctor workspace → Appointment API adapter: loads appointments
- Patient workspace → Appointment list: shows appointments
- Doctor workspace → Appointment list: shows appointments
- Appointment list → Appointment actions: updates or deletes
src/components/Dashboard/AppointmentList.jsx - Admin user management → User actions: manages users
src/app/dashboard/admin/users/page.jsx - Patient profile → Patient API adapter: manages profile
- Doctor profile → Doctor API adapter: manages profile