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

README
๐Ÿ—“๏ธ 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 NOTICE file 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

image

image

image

image

image

image

image

image

image

image

image