How randakamal/slotsaver works
SlotSaver recovers appointment cancellations by turning stored customer intent into ranked, policy-checked outreach and an atomic rebooking. The documented autonomous path filters eligibility, ranks candidates, calls them in sequence, applies escalating incentives, and recursively recovers a displaced booking. The web dashboard exposes calendar, recovery, patient, outreach, voice, and profile workflows; the backend also provides memory and configurable business rules. Edges reflect README-described behavior or SOURCE INDEX references; unsampled modules are represented at their exact paths, with uncertain wiring omitted.
Main entry points: page.tsx Dashboard pages · recovery_service.py Plan state machine · main.py FastAPI entry · outreach_service.py Outreach decisions
Components 27
Business dashboard
- Dashboard pages
apps/web/app/page.tsx - Appointment calendar
apps/web/components/appointments/AppointmentCalendar.tsx - Recovery panel
apps/web/components/recovery/RecoveryPanel.tsx - Outreach queue
apps/web/components/outreach/OutreachQueue.tsx - Voice widget
apps/web/components/calls/VoiceAgent.tsx - Profile settings
apps/web/components/settings/BusinessProfileSettings.tsx
Recovery workflow
- FastAPI entry
apps/api/app/main.py - Recovery endpoints
apps/api/app/api/routes/recovery.py - Recovery scheduler
apps/api/app/services/recovery_scheduler.py - Plan state machine
apps/api/app/services/recovery_service.py - Slot planning
apps/api/app/services/slot_recovery.py
Intent and decisions
- Candidate ranking
apps/api/app/agents/nemotron/ranker.py - Nemotron client
apps/api/app/agents/nemotron/client.py - Preference extraction
apps/api/app/services/preference_service.py - Patient memory
apps/api/app/services/patient_memory.py
Scheduling and outreach
- Appointment service
apps/api/app/services/appointment_service.py - Outreach decisions
apps/api/app/services/outreach_service.py - Outbound calls
apps/api/app/services/call_service.py - Business profile service
apps/api/app/services/business_profile_service.py
Business state
- Appointment records
apps/api/app/db/models/appointment.py - Business profiles
apps/api/app/db/models/business_profile.py - SQL database
apps/api/app/db/session.py
Other components
- Business owner
- Customer
- NVIDIA Nemotron
- ElevenLabs voice
- Twilio telephony
Connections 34
- Business owner → Dashboard pages: uses
- Dashboard pages → Appointment calendar: opens calendar
- Dashboard pages → Recovery panel: views recovery
- Dashboard pages → Outreach queue: views outreach
- Dashboard pages → Voice widget: opens voice
- Business owner → Profile settings: configures
- Appointment calendar → FastAPI entry: requests appointments
- Recovery panel → FastAPI entry: polls plans
- Profile settings → FastAPI entry: updates profile
- FastAPI entry → Recovery endpoints: registers routes
apps/api/app/main.py - FastAPI entry → Recovery scheduler: starts scheduler
apps/api/app/main.py - Recovery endpoints → Candidate ranking: ranks candidates
apps/api/app/api/routes/recovery.py - Recovery endpoints → Plan state machine: advances response
apps/api/app/api/routes/recovery.py - Recovery scheduler → Plan state machine: resolves call outcomes
- Recovery scheduler → Slot planning: plans cancellations
- Slot planning → Candidate ranking: ranks eligible candidates
- Candidate ranking → Nemotron client: requests ranking
- Nemotron client → NVIDIA Nemotron: calls model API
- Slot planning → Appointment service: checks and books slots
- Plan state machine → Appointment service: books accepted slot
apps/api/app/services/recovery_service.py - Plan state machine → Outreach decisions: advances candidate
apps/api/app/services/recovery_service.py - Outreach decisions → Outbound calls: places approved call
apps/api/app/services/outreach_service.py - Outreach decisions → Nemotron client: decides outreach and offer
apps/api/app/services/outreach_service.py - Outbound calls → ElevenLabs voice: starts phone call
- ElevenLabs voice → Twilio telephony: routes telephony
- Customer → Voice widget: shares scheduling intent
- Voice widget → Preference extraction: submits intent
- Preference extraction → Nemotron client: extracts preferences
- Outreach decisions → Patient memory: reads patient history
apps/api/app/services/outreach_service.py - Business profile service → Business profiles: reads and updates
apps/api/app/services/business_profile_service.py - Appointment service → Appointment records: reads and updates
apps/api/app/services/appointment_service.py - Plan state machine → SQL database: persists plan state
apps/api/app/services/recovery_service.py - Appointment records → SQL database: stored in
apps/api/app/db/models/appointment.py - Business profiles → SQL database: stored in
apps/api/app/db/models/business_profile.py