SafarSaathi
AI-native travel platform built with cloud-native microservices, event-driven architecture, and an intelligent orchestration service that provides context-aware travel assistance.
Overview
SafarSaathi is an AI-native travel platform that combines cloud-native microservices, event-driven architecture, and an orchestration-first AI service to deliver intelligent travel planning, companion discovery, and personalized user assistance.
Problem Statement
Traditional travel applications treat AI as a chatbot layered on top of existing functionality. SafarSaathi was designed around an orchestration-first approach where AI understands conversation context, plans execution steps, gathers platform data, and generates grounded responses while operating within a distributed microservices architecture.
Features
- AI-powered travel assistant
- Context-aware conversations
- Trip management
- Travel companion discovery
- Companion matching
- Real-time notifications
- JWT authentication
- Event-driven communication
- Long-term AI memory
- Prompt enrichment pipeline
Core Services
The system is composed of independently deployable services, each responsible for a single business capability.
API Gateway
Centralized routing, authentication, and request filtering for all client traffic.
Auth Service
Handles secure authentication, JWT generation, and authorization.
User Service
Manages user profiles, travel preferences, and account information.
Trip Service
Creates, updates, and manages travel itineraries and trip details.
Companion Service
Matches compatible travelers and manages companion requests.
Notification Service
Consumes Kafka events and delivers asynchronous notifications.
AI Service
Acts as an orchestration layer that performs planning, tool execution, prompt enrichment, and long-term memory management before generating AI responses.
Technology Stack
Technologies, frameworks, infrastructure, and tooling used throughout the development of this project.
Backend
Java 21 • Spring Boot • Spring Security • Spring Cloud Gateway • Spring Cloud Netflix Eureka • Spring AI
Database
PostgreSQL • MySQL
Messaging
Apache Kafka
Infrastructure
Docker • Docker Compose • Kubernetes • Helm
Developer Tools
Git • GitHub • Maven • Google Gemini
Engineering Decisions
Architectural choices made to improve scalability, maintainability, reliability, and long-term evolution of the system.
AI-Orchestration Architecture
The AI service was implemented as an orchestration engine instead of directly invoking an LLM. Every request passes through context resolution, planning, tool execution, prompt enrichment, and memory management before response generation.
Event-Driven Communication
Kafka enables asynchronous communication between services, reducing coupling and improving scalability for notification and companion workflows.
Microservice Architecture
Business capabilities are isolated into independently deployable services including authentication, trips, companions, notifications, and AI orchestration.
Centralized API Gateway
All client requests pass through a single gateway responsible for routing, JWT validation, and secure access to backend services.
Persistent AI Memory
Long-term memory stores user travel preferences so future conversations become increasingly personalized without requiring manual profile updates.
Challenges
The most significant engineering challenges encountered while building the system.
Designing an orchestration-first AI pipeline instead of integrating a simple chatbot.
Maintaining conversation context and entity resolution across multiple interactions.
Coordinating multiple backend services through asynchronous Kafka communication.
Building a scalable microservices architecture while keeping service boundaries clear.
What I Learned
Key technical concepts and engineering practices gained during the implementation.
Designing production-style microservice architectures.
Building AI orchestration pipelines using Spring AI.
Applying event-driven communication with Apache Kafka.
Managing long-term conversational memory for personalized AI experiences.
Designing scalable cloud-native backend systems.
Future Improvements
Potential enhancements that could improve scalability, reliability, and maintainability.
Deploy the complete platform on AWS.
Introduce OpenTelemetry for distributed tracing.
Implement CI/CD pipelines using GitHub Actions.
Add monitoring dashboards with Prometheus and Grafana.
Expand the AI service into a multi-agent travel assistant.