Building a Doctor Appointment Booking Platform with Event-Driven Architecture | SAGA Pattern
Engineering in Motion
0:00 / 0:00
Building a Doctor Appointment Booking Platform with Event-Driven Architecture | SAGA Pattern
49 просмотров · 8 дней назад
Engineering in Motion
10 подписчиков
49 просмотров · 8 дней назад
Distributed a Doctor Appointment Booking Platform with Event-Driven Architecture
This is a production-grade, cloud-native doctor appointment booking platform built with Java, Spring Boot, and Microservices.
It has three roles, and I’ve built a dedicated portal for each role:
1. Patient/Users: They can search for doctors, book appointments by clinic and time slot, pay online, and leave feedback after their visit.
2. Doctor: Doctor onboarding, profile management, clinic setup, weekly schedule management, and payment management.
3. Admin: Handles doctor verification, dashboard management, platform-level analytics, etc.
The system uses an event-driven architecture with RabbitMQ, centralized authentication, full observability, and containerized deployments.
Features:
➥ 8 independent domain microservices: Auth, Patient, Doctor, Appointment, Payment, Notification, Feedback, and Admin
➥ 3 infrastructure services: API Gateway, Config Server, and Eureka Server
➥ JWT-based authentication at the API Gateway with RSA signing, refresh tokens, Redis-backed token blacklisting, and rate limiting
➥ Doctor onboarding, clinic setup, schedule management, and automated appointment slot generation
➥ Appointment booking with Redis-based distributed slot locking and optimistic concurrency control to prevent double-booking under concurrent requests
➥ Choreography-based Saga for payment and refund lifecycle — appointment state transitions (pending → confirmed → cancelled) driven by RabbitMQ domain events across Payment, Appointment, and Notification services
➥ Payment integration with Razorpay/Stripe, including payment verification and automated refunds on cancellation
➥ Async domain events via RabbitMQ — notifications, refunds, and feedback eligibility triggered by appointment state changes
➥ In-app notification feed and post-appointment review and rating system
➥ Admin panel for doctor verification and platform-level analytics
➥ Centralized Config Server (Git-backed), Eureka service discovery, and rate-limited API Gateway
➥ Full observability with Prometheus metrics, Grafana dashboards, Loki log aggregation, and OpenTelemetry tracing
➥ Fully containerized with Docker and deployed on a local Kubernetes cluster
Technology 🚀
Backend: Spring Boot, Spring Cloud, Event-Driven Microservices, SAGA Pattern, OpenFeign, RabbitMQ, Resilience4j (Circuit Breaker, Retry, Rate Limiter)
Frontend: TypeScript, React, Tailwind CSS
Databases: PostgreSQL, MongoDB, Redis, Flyway
Observability: Prometheus, Grafana, Loki, Tempo, OpenTelemetry
Cloud: Docker, Kubernetes
Resources 💡
Github: https://github.com/ripanbaidya/lunecare
Website: https://ripanbaidya.vercel.app
Connect with me 🌐
LinkedIn: / ripanbaidya
Github: https://github.com/ripanbaidya
Instagram: / riwinbdya