How kerolos-nashat/dentai-api works
This is a NestJS clinic-management API, despite the generic Nest starter README. Its broad workflow spans staff and patient authentication, scheduling and patient records, then operational follow-up such as billing, notifications, and analytics. The tree also shows patient self-service, a WhatsApp bot, AI assistance, inventory, and a waitlist. The graph preserves these product branches, but most unsampled modules are shown only as registered capabilities; their internal calls are not inferred. Evidence is limited to the supplied source excerpts and SOURCE INDEX references.
Main entry points: app.module.ts Application modules · llm.service.ts LLM provider client · patient-auth.service.ts Patient OTP login · main.ts Nest bootstrap
Components 26
Application entry
- Nest bootstrap
src/main.ts - Application modules
src/app.module.ts
Identity and access
- Staff authentication
src/modules/auth - Patient OTP login
src/modules/patient-auth/patient-auth.service.ts - Staff users
src/modules/users/entities/user.entity.ts
Clinical operations
- Patient records
src/modules/patients/patients.service.ts - Patient data
src/modules/patients/entities/patient.entity.ts - Appointment scheduling
src/modules/appointments/appointments.controller.ts - Appointment data
src/modules/appointments/entities/appointment.entity.ts - Doctor availability
src/modules/availability - Patient portal
src/modules/patient-portal/patient-portal.controller.ts - Procedures and durations
src/modules/procedures - Waitlist offers
src/modules/waitlist
Clinic operations
- Invoices and payments
src/modules/billing - Clinical inventory
src/modules/inventory - Reminders and messaging
src/modules/notifications - Push notifications
src/modules/push
AI and insight
- Analytics and forecasts
src/modules/analytics - AI agent
src/modules/agent - Patient messaging bot
src/modules/patient-bot - Knowledge retrieval
src/modules/knowledge-base - LLM provider client
src/modules/llm/llm.service.ts - LLM trace records
src/modules/llm/entities/llm-trace.entity.ts
Other components
- API clients
- Gemini API
- ITI gateway
Connections 26
- API clients → Nest bootstrap: sends requests
src/main.ts - Nest bootstrap → Application modules: starts
src/main.ts - Application modules → Staff authentication: registers
src/app.module.ts - Application modules → Patient OTP login: registers
src/app.module.ts - Application modules → Patient records: registers
src/app.module.ts - Application modules → Appointment scheduling: registers
src/app.module.ts - Application modules → Doctor availability: registers
src/app.module.ts - Application modules → Patient portal: registers
src/app.module.ts - Application modules → Procedures and durations: registers
src/app.module.ts - Application modules → Waitlist offers: registers
src/app.module.ts - Application modules → Invoices and payments: registers
src/app.module.ts - Application modules → Clinical inventory: registers
src/app.module.ts - Application modules → Reminders and messaging: registers
src/app.module.ts - Application modules → Push notifications: registers
src/app.module.ts - Application modules → Analytics and forecasts: registers
src/app.module.ts - Application modules → AI agent: registers
src/app.module.ts - Application modules → Patient messaging bot: registers
src/app.module.ts - Application modules → Knowledge retrieval: registers
src/app.module.ts - Application modules → LLM provider client: registers
src/app.module.ts - Patient OTP login → Patient records: queries patients
src/modules/patient-auth/patient-auth.service.ts - Patient OTP login → Reminders and messaging: sends codes
src/modules/patient-auth/patient-auth.service.ts - Patient portal → API clients: serves portal
- Appointment scheduling → API clients: serves scheduling
- LLM provider client → LLM trace records: records calls
src/modules/llm/llm.service.ts - LLM provider client → Gemini API: calls provider
src/modules/llm/llm.service.ts - LLM provider client → ITI gateway: calls gateway
src/modules/llm/llm.service.ts