How mmdelapuerta-coder/dentasync works
DentaSync is a dental-clinic portal with a React frontend and an Express/PostgreSQL API. Users enter through the routed app and role-specific screens; API requests reach the backend, where authentication and domain routes support patient, staff, dentist, and admin workflows. Major capabilities include appointments and clinic schedules, queues and check-in, clinical records and dental charts, AI assistance, document synchronization, notifications, and administration. The excerpts show selected route-to-service calls and database setup; some feature wiring is documented only by the source index, so uncertain links are omitted.
Main entry points: patientPortal.js Patient portal routes · server.js Express API · clinicalPatients.js Clinical records · staffPortal.js Staff operations
Components 31
Web application
- Role-based app
frontend/src/App.jsx - Sign-in and registration
frontend/src/pages/AuthPage.jsx - API client
frontend/src/api.js
API and security
- Express API
backend/server.js - Security configuration
backend/lib/securityConfig.js - Authentication routes
backend/routes/auth.js - OTP verification
backend/services/otpService.js - OTP persistence
backend/repositories/postgresOtpStore.js - PostgreSQL pool
backend/db.js
Clinical operations
- Clinical and dentist routes
backend/routes/dentistPortal.js - Clinical records
backend/services/clinicalPatients.js - Dental chart sync
backend/services/dentalChartSync.js - Dental wellness
backend/services/dentalWellness.js - Staff operations
backend/routes/staffPortal.js - Staff check-in
backend/services/staffCheckIn.js - Walk-in QR check-in
backend/services/staffWalkInQr.js - Queue wait prediction
backend/services/queueWaitPrediction.js - Clinic schedule
backend/services/clinicSchedule.js
Patient services
- Patient portal routes
backend/routes/patientPortal.js - Patient data
backend/services/patientData.js - Patient identifiers
backend/services/patientIds.js - Patient notifications
backend/services/patientPortalNotifications.js
Administration and intelligence
- Admin portal routes
backend/routes/adminPortal.js - Admin command center
backend/routes/adminCommandCenter.js - Admin audit
backend/services/adminAudit.js - Admin analytics
backend/services/adminAnalytics.js - Clinic AI assistant
backend/services/clinicAssistant.js - AI usage tracking
backend/services/aiUsage.js - Document synchronization
backend/routes/adminDocumentSync.js - Document extraction
backend/services/documentSyncExtraction.js
Other components
- Portal user
Connections 39
- Portal user → Role-based app: uses
README.md - Role-based app → Sign-in and registration: routes to
frontend/src/App.jsx - Role-based app → API client: loads
- API client → Express API: sends API requests
README.md - Express API → PostgreSQL pool: queries
backend/server.js - Express API → Authentication routes: mounts
backend/server.js - Express API → Patient portal routes: mounts
backend/server.js - Express API → Security configuration: configures
backend/server.js - Express API → Clinical and dentist routes: mounts
backend/server.js - Express API → Staff operations: mounts
backend/server.js - Express API → Admin portal routes: mounts
backend/server.js - Authentication routes → OTP verification: verifies OTP
backend/routes/auth.js - Express API → OTP persistence: configures
backend/server.js - Patient portal routes → Patient data: uses
backend/routes/patientPortal.js - Patient portal routes → Patient identifiers: uses
backend/routes/patientPortal.js - Patient portal routes → Patient notifications: uses
backend/routes/patientPortal.js - Patient portal routes → Clinical records: uses
backend/routes/patientPortal.js - Patient portal routes → Clinic AI assistant: uses
backend/routes/patientPortal.js - Patient portal routes → Staff check-in: uses
backend/routes/patientPortal.js - Patient portal routes → Walk-in QR check-in: uses
backend/routes/patientPortal.js - Patient portal routes → Queue wait prediction: uses
backend/routes/patientPortal.js - Patient portal routes → Clinic schedule: uses
backend/routes/patientPortal.js - Clinical and dentist routes → Clinical records: uses
backend/routes/dentistPortal.js - Clinical and dentist routes → Dental chart sync: uses
backend/routes/dentistPortal.js - Clinical and dentist routes → Dental wellness: uses
backend/routes/dentistPortal.js - Clinical records → Dental chart sync: uses
backend/services/clinicalPatients.js - Clinical records → Patient data: uses
backend/services/clinicalPatients.js - Staff operations → Clinical records: uses
backend/routes/staffPortal.js - Staff operations → Staff check-in: uses
backend/routes/staffPortal.js - Staff operations → Walk-in QR check-in: uses
backend/routes/staffPortal.js - Staff operations → Queue wait prediction: uses
backend/routes/staffPortal.js - Admin portal routes → Admin command center: attaches routes
backend/routes/adminPortal.js - Admin portal routes → Admin analytics: loads analytics
backend/routes/adminPortal.js - Admin portal routes → Clinical records: uses
backend/routes/adminPortal.js - Admin command center → Admin audit: uses
backend/routes/adminCommandCenter.js - Admin command center → Patient notifications: uses
backend/routes/adminCommandCenter.js - Clinic AI assistant → Clinic schedule: uses
backend/services/clinicAssistant.js - Clinic AI assistant → AI usage tracking: records usage
backend/services/clinicAssistant.js - Document synchronization → Document extraction: dispatches extraction