How imenzaalani/dentify works
Dentify is a dental-clinic management application: patients can request appointments and use a portal, while staff manage scheduling, clinical records, billing, documents, and operations. The main workflow runs from public booking or staff scheduling through the FastAPI API into domain records stored in PostgreSQL, with email notifications as a side effect. The sampled source establishes API routing, appointment persistence, authentication, and a frontend patient-detail component; other product branches are represented from the repository tree, so their internal calls are not inferred.
Main entry points: v1 Domain endpoints · appointments.py Appointment operations · auth.py Authentication API · client.ts API client
Components 25
Public and portal
- Public booking
frontend/src/app/(public)/booking/page.tsx - Patient portal
frontend/src/app/patient/appointment/page.tsx - Backend proxy
frontend/src/app/api/backend/[...path]/route.ts - API client
frontend/src/lib/api/client.ts
Staff operations
- Staff workspace
frontend/src/app/staff/(dashboard)/patients/[id]/page.tsx - Scheduling and waitlist
frontend/src/app/staff/(dashboard)/planning - Clinical care
frontend/src/app/staff/(dashboard)/treatments - Billing
frontend/src/app/staff/(dashboard)/billing/components/data-table.tsx - Documents
frontend/src/app/staff/(dashboard)/documents - Lead intake
frontend/src/app/staff/(dashboard)/leads - Reports and statistics
frontend/src/app/staff/(dashboard)/statistics - Clinic messaging
frontend/src/app/staff/(dashboard)/chat
Backend API
- REST API
backend/app/main.py - Appointment operations
backend/app/api/v1/appointments.py - Authentication API
backend/app/api/v1/auth.py - Domain endpoints
backend/app/api/v1
Domain and persistence
- Patient records
backend/app/models/patient.py - Appointment records
backend/app/models/appointment.py - User accounts
backend/app/models/user.py - PostgreSQL database
backend/app/core/database.py
Identity and services
- Tokens and access
backend/app/core/security.py - Role permissions
backend/app/core/permissions.py - Email notifications
backend/app/services/email.py
Other components
- Patient or visitor
- SMTP provider
Connections 29
- Patient or visitor → Public booking: requests booking
frontend/src/app/(public)/booking/page.tsx - Patient or visitor → Patient portal: uses portal
- Patient or visitor → Staff workspace: staff uses
- Public booking → API client: submits request
- Patient portal → API client: loads records
- Staff workspace → API client: loads patient data
- API client → Backend proxy: sends requests
- Backend proxy → REST API: forwards requests
frontend/src/app/api/backend/[...path]/route.ts - REST API → Domain endpoints: mounts routes
backend/app/main.py - Domain endpoints → Appointment operations: registers router
backend/app/api/v1/__init__.py - Appointment operations → Appointment records: reads and writes
backend/app/api/v1/appointments.py - Appointment operations → Patient records: validates patient
backend/app/api/v1/appointments.py - Appointment operations → User accounts: validates dentist
backend/app/api/v1/appointments.py - Appointment records → PostgreSQL database: maps through
backend/app/models/appointment.py - Patient records → PostgreSQL database: maps through
backend/app/models/patient.py - User accounts → PostgreSQL database: maps through
backend/app/models/user.py - Authentication API → User accounts: queries accounts
backend/app/api/v1/auth.py - Authentication API → Tokens and access: checks tokens
backend/app/api/v1/auth.py - Authentication API → Email notifications: sends invitations
backend/app/api/v1/auth.py - Appointment operations → Email notifications: notifies patients
backend/app/api/v1/appointments.py - Email notifications → SMTP provider: sends mail
- Domain endpoints → Scheduling and waitlist: supports scheduling
- Domain endpoints → Clinical care: supports care records
- Domain endpoints → Billing: supports invoicing
- Domain endpoints → Documents: supports documents
- Domain endpoints → Lead intake: supports lead intake
- Domain endpoints → Reports and statistics: supports statistics
- Domain endpoints → Clinic messaging: supports messaging
- Authentication API → Role permissions: enforces roles
backend/app/api/v1/auth.py