mcp-rag-agency-book-appointments
This project is a cutting-edge AI-powered appointment booking system designed for agencies. It enables efficient real-time management of appointments and queues, utilizing AI chatbots and Retrieval-Augmented Generation (RAG) for context-aware decision-making using external knowledge sources. With a microservices architecture, it offers high scalability and modularity, making it suitable for enterprise adoption.
GitHub Stars
4
User Rating
Not Rated
Favorites
0
Views
14
Forks
1
Issues
0
๐๏ธ AI-Powered Appointment Booking System
โจ Overview
This project is a cutting-edge AI-driven appointment booking system designed for agencies to schedule appointments, and manage queues in real-time efficiently. With AI Chat Bots, Retrieval-Augmented Generation (RAG), and MCP Client/Server integration, the system enables context-aware decision-making using external knowledge sources.
Built with Domain-Driven Development (DDD) principles, the system leverages Apache Kafka & ElasticSearch for appointment indexing, ensuring optimized search & performance across thousands of appointments! The architecture is microservices-ready, making it scalable and modular for enterprise adoption. Now powered by Qdrant Vector DB, it supports AI-driven semantic search and retrieval for enhanced user experiences.
๐ Key Features
โ
Built-in IdentityServer with Asymmetric JWT Signing ๐
โ
AI Chat Bots via PromptAPI ๐ค
โ
Retrieval-augmented generation (RAG) โ combines real-time knowledge retrieval with language generation for smarter, context-aware responses ๐ง ๐
โ
Intelligent document parsing using LLM โ extracts clean, structured, semantically meaningful text from messy HTML and scanned PDFs ๐๐งน๐ค
โ
Users can update the AI brain using RAG by scanning URLs & PDF documents on the fly โ parsed content is embedded and stored in Qdrant for semantic search ๐๐โก
โ
RAG with Hangfire for document scan, parse & upload to Qdrant โ๏ธ
โ
MCP client/server ready โก
โ
Supports off days & max daily appointments ๐
โ
Real-time queue grid via API โณ
โ
Domain-driven development (DDD) architecture ๐๏ธ
โ
Event dispatcher for domain events ๐จ
โ
Apache Kafka & ElasticSearch for appointment indexing ๐ก
โ
Qdrant vector database for AI semantic search ๐ง โจ
โ
FluentValidation for validation logic โ
โ
Swagger, LINQ, IoC, WebAPI ๐ ๏ธ
โ
Automatic email template generation by AI LLM ๐งโจ
โ
API with Brain โ users can type prompts in natural language ๐ง ๐
โ
Microservices-ready, modular & scalable ๐ข๐
โ
Cloud-ready (Azure/AWS) โ๏ธ
โ
Refit-powered REST API clients ๐
โ
Producer-consumer pattern with buffer cache for real-time insert, save & update ๐ค๐ฅ
โ
Next.js + React.js chatbot UI โ real-time chat interface integrated with backend LLM API ๐ฌโ๏ธ โ supports theme changes
โ
Redis implementation for faster public key retrieval and chat store caching ๐งฐ๐
๐ Architecture Diagram
User โ API Gateway โ Appointment Service โ Event Processing (Kafka) โ Search Index (ElasticSearch)
โณ AI Decision Layer (RAG, MCP Client/Server, Qdrant Vector DB)
๐ User Flow
1๏ธโฃ User registers on the platform ๐
2๏ธโฃ Admin assigns "Agent" role to the user ๐คโ
3๏ธโฃ Admin registers an agency to the system ๐ข
4๏ธโฃ Agent adds agency users/customers (who will book appointments) ๐ฅ
5๏ธโฃ Agent schedules an appointment for an agency user/customer ๐
6๏ธโฃ AI automatically generates an appointment confirmation email template โ๏ธ๐ค
7๏ธโฃ Appointment is indexed in Apache Kafka & ElasticSearch for real-time search ๐ก
8๏ธโฃ User/customer gets notified with details via AI-enhanced email template ๐
9๏ธโฃ User interacts with AI freely via API with Brain โ type any prompt, get smart AI responses ๐ง ๐ฌ
๐ Qdrant Vector DB enhances search accuracy with AI-powered similarity matching ๐๐ก
1๏ธโฃ1๏ธโฃ Microservices-ready architecture ensures efficient scaling across multiple agencies ๐ขโ๏ธ
This ensures a streamlined booking experience, allowing agencies to manage appointments efficiently with real-time indexing, AI-generated email templates, and AI-driven semantic search with Qdrant!
๐งฐ Tech Stack
๐ฆ .NET 9 โ modern, performant runtime for cloud-native applications
๐ก๏ธ IdentityServer โ secure authentication and token issuance
๐
Hangfire โ background job scheduling for asynchronous workflows
๐ก Apache Kafka โ distributed event streaming platform
๐ ElasticSearch โ high-speed, full-text search for appointment indexing
๐ง Qdrant โ vector DB for semantic AI search
๐งพ PromptAPI โ LLM-based AI chatbot integration
๐ Refit โ declarative REST API clients with interface-based contracts
โ
FluentValidation โ fluent rules for robust input validation
๐งช Swagger / OpenAPI โ API documentation and test interface
โ๏ธ Azure / AWS Ready โ cloud-native infrastructure compatible
๐ Marten DB (PostgreSQL) โ event sourcing and document database
๐ PostgreSQL โ backing store for MartenDB event sourcing and ElasticSearch sync
๐๏ธ MS SQL Server โ primary application database for transactional data
๐งฑ producer/consumer repository pattern โ buffer-backed async layer for write-heavy workloads
โ๏ธ Next.js / React.js โ fast, modern frontend framework for interactive chatbot UI
๐ง Redis โ in-memory cache for fast public key access and general-purpose caching
๐ก๏ธ Security & Access Control
โ ๏ธ Strict access policies & authentication layers
๐ JWT-based authentication
๐ Audit logs for booking activities
๐ฌ Contributing
We welcome new features, bug fixes, and performance improvements. ๐
Feel free to submit pull requests or open issues!
โก Future Enhancements
๐ฎ AI-driven appointment recommendations
๐ข Automated notifications for schedule changes
๐ก Machine Learning for capacity prediction
๐ License - Apache License 2.0 (TL;DR)
This project follows the Apache License 2.0, which means:
- โ You can use, modify, and distribute the code freely.
- โ You must include the original license when distributing.
- โ
You must include the
NOTICEfile if one is provided. - โ You can use this in personal & commercial projects.
- โ No warranties โ use at your own risk! ๐
For full details, check the Apache License 2.0.
๐ก This system isn't just another booking toolโitโs an intelligent, scalable AI-powered solution.
Letโs reshape the future of scheduling with AI, event-driven processing, scalable microservices, and AI-powered search with Qdrant Vector DB! ๐๐ฅ
This project is based on my other project: https://github.com/myonathanlinkedin/productinfo-mcp-rag
๐ธ Screenshots of the chatbots
MCP Gateway is a reverse proxy and management layer for Model Context Protocol (MCP) servers, designed for Kubernetes environments. It facilitates session-aware traffic routing and lifecycle management of MCP servers. The project offers enterprise-ready features such as telemetry, access control, and observability, making it suitable for scalable AI development platforms.