A sophisticated, scalable conversational AI chatbot for dental practices built with LangGraph, LangChain, and modern web technologies. This solution provides natural, human-like interactions for patient management, appointment scheduling, and practice inquiries.
This project follows Clean Architecture and SOLID principles for maximum scalability and maintainability:
├── domain/ # Core business logic and entities
├── application/ # Use cases and orchestration
├── infrastructure/ # External integrations (LLM, database)
└── presentation/ # API and frontend
- LangGraph: State machine for conversation workflows
- LangChain: LLM integration and tool calling
- FastAPI: High-performance async backend
- React/Next.js: Premium frontend UI
- Pydantic: Type-safe data validation
- Python 3.10+
- Node.js 18+ (for frontend)
- Free-tier API key from one of:
- Clone and navigate to the project:
cd "Dentist Coversational AI"- Create virtual environment:
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Configure environment:
cp .env.template .env
# Edit .env and add your API key- Initialize database:
mkdir -p data
python scripts/init_database.py- Start backend:
uvicorn main:app --reload --host 0.0.0.0 --port 8000- Start frontend (in another terminal):
cd frontend
npm install
npm run dev- Access the application:
- Frontend: http://localhost:3000
- API Docs: http://localhost:8000/docs
-
New Patient Registration
- Collects: Full name, phone, date of birth, insurance
- Guides through first appointment booking
-
Existing Patient Management
- Identity verification
- Appointment rescheduling
- Appointment cancellation
-
Intelligent Appointment Scheduling
- Handles subjective dates ("later next week", "early next month")
- Suggests alternatives when times don't work
- Supports multiple appointment types:
- Cleaning
- General checkup
- Emergency (with staff notification)
-
Family Scheduling
- Book multiple appointments for family members
- Coordinate back-to-back appointments
- Manage family member relationships
-
General Inquiries
- Insurance and payment options
- Self-pay and membership plans
- Location and hours information
-
Emergency Handling
- Captures emergency details
- Notifies staff immediately
- Provides appropriate guidance
- Premium UI: Clean, Apple-inspired design with minimal clutter
- Natural Conversations: Human-like, context-aware responses
- Scalable Architecture: SOLID principles, dependency injection, clean separation
- Error Resilience: Comprehensive fallback mechanisms
.
├── domain/ # Domain models and business logic
│ ├── entities/ # Core entities (Patient, Appointment, etc.)
│ └── value_objects/ # Value objects
├── application/ # Application layer
│ ├── use_cases/ # Business use cases
│ └── services/ # Application services
├── infrastructure/ # Infrastructure layer
│ ├── llm/ # LLM integrations
│ ├── database/ # Database implementations
│ └── tools/ # LangChain tools
├── presentation/ # Presentation layer
│ ├── api/ # FastAPI routes
│ └── frontend/ # React frontend
├── data/ # Database files
├── scripts/ # Utility scripts
└── main.py # Application entry point
All configuration is managed through environment variables (see .env.template). Key settings:
- LLM Provider: Choose DeepSeek, Gemini, or OpenAI
- Database: Local JSON (default) or Supabase
- Practice Info: Customize practice name, hours, contact
The chatbot handles these key scenarios:
- New patient booking a cleaning appointment
- Existing patient rescheduling due to conflict
- Family booking (parent + 2 kids, back-to-back)
- Emergency appointment with details
- Insurance inquiry for non-insured patient
- Subjective date parsing ("next Tuesday afternoon")
Interactive API documentation available at /docs when the server is running.
[Link to demo video will be added]
This is an assessment project demonstrating:
- Rapid development capabilities
- Clean architecture principles
- Production-ready code quality
- Comprehensive error handling
- User experience excellence
Assessment Project - Internal Use
