How amandubey923/dentiva-ai works
Dentiva is a dental-practice application for patient appointment booking, patient dashboards, doctor administration, and a Pro voice experience. The main patient workflow selects a dentist, chooses a date and time, confirms a booking, persists it, and requests an email confirmation. Server actions provide appointment and doctor operations over Prisma; hooks expose these operations to client pages. The tree also documents landing, admin, dashboard, and voice features. Some subsystem internals were not sampled, so their relationships are included only where excerpts, indexed references, or explicit documentation support them.
Main entry points: appointments/page.tsx Booking flow · prisma.ts Prisma client · Navbar.tsx Navigation · app/page.tsx Landing page
Components 28
Public experience
- Landing page
src/app/page.tsx - Landing content
src/components/landing - Navigation
src/components/Navbar.tsx
Appointment booking
- Booking flow
src/app/appointments/page.tsx - Booking steps
src/components/appointments - Appointment hooks
src/hooks/use-appointment.ts - Doctor hooks
src/hooks/use-doctors.ts - Email endpoint
src/app/api/send-appointment-email/route.ts - Confirmation email
src/components/emails/AppointmentConfirmationEmail.tsx
Practice operations
- Patient dashboard
src/app/dashboard/page.tsx - Dashboard panels
src/components/dashboard - Admin dashboard
src/app/admin/AdminDashboardClient.tsx - Admin panels
src/components/admin
Voice experience
- Voice page
src/app/voice/page.tsx - Voice interface
src/components/voice - Vapi client config
src/lib/vapi.ts - Pro page
src/app/pro/page.tsx
Application data
- Appointment actions
src/lib/actions/appointments.ts - Doctor actions
src/lib/actions/doctors.ts - Dashboard action
src/lib/actions/dashboard.ts - User sync
src/lib/actions/users.ts - Prisma client
src/lib/prisma.ts - Application database
- Shared utilities
src/lib/utils.ts
Other components
- Visitor
- Patient
- Resend service
src/lib/resend.ts - Vapi service
Connections 36
- Visitor → Landing page: visits
src/app/page.tsx - Landing page → Landing content: renders
src/app/page.tsx - Landing page → User sync: syncs user
src/app/page.tsx - Landing page → Patient dashboard: redirects signed-in
src/app/page.tsx - Patient → Booking flow: books through
- Booking flow → Booking steps: renders
src/app/appointments/page.tsx - Booking flow → Appointment hooks: uses
src/app/appointments/page.tsx - Booking flow → Email endpoint: posts confirmation
src/app/appointments/page.tsx - Appointment hooks → Appointment actions: invokes
src/hooks/use-appointment.ts - Booking flow → Doctor hooks: selects doctors
src/app/appointments/page.tsx - Doctor hooks → Doctor actions: invokes
src/hooks/use-doctors.ts - Appointment actions → Prisma client: queries
src/lib/actions/appointments.ts - Doctor actions → Prisma client: queries
src/lib/actions/doctors.ts - Prisma client → Application database: reads and writes
- Email endpoint → Confirmation email: renders
src/app/api/send-appointment-email/route.ts - Email endpoint → Resend service: sends email
src/app/api/send-appointment-email/route.ts - Patient dashboard → Dashboard action: fetches data
src/app/dashboard/page.tsx - Patient dashboard → Dashboard panels: renders
src/app/dashboard/page.tsx - Dashboard action → Prisma client: queries
src/lib/actions/dashboard.ts - Dashboard action → Appointment actions: uses
src/lib/actions/dashboard.ts - Admin dashboard → Appointment hooks: loads appointments
src/app/admin/AdminDashboardClient.tsx - Admin dashboard → Doctor hooks: loads doctors
src/app/admin/AdminDashboardClient.tsx - Admin dashboard → Admin panels: renders
src/app/admin/AdminDashboardClient.tsx - Admin panels → Appointment hooks: manages appointments
src/components/admin/RecentAppointments.tsx - Admin panels → Doctor hooks: manages doctors
src/components/admin/DoctorsManagement.tsx - User sync → Prisma client: syncs records
src/lib/actions/users.ts - Voice page → Voice interface: renders
src/app/voice/page.tsx - Voice interface → Vapi client config: uses
src/components/voice/VapiWidget.tsx - Vapi client config → Vapi service: configures
- Patient → Voice page: opens
- Pro page → Patient: presents Pro
- Booking flow → Shared utilities: uses booking types
src/app/appointments/page.tsx - Navigation → Booking flow: links to
src/components/Navbar.tsx - Navigation → Patient dashboard: links to
src/components/Navbar.tsx - Navigation → Voice page: links to
src/components/Navbar.tsx - Navigation → Pro page: links to
src/components/Navbar.tsx