A distributed event booking and management platform built with microservices architecture, featuring AI-powered chat assistance and observability.
Pulsar is a full-stack event booking system that combines the power of microservices with an intuitive Next.js frontend. The platform enables users to discover events, manage bookings, and interact with an AI-powered chat assistant that leverages the Model Context Protocol (MCP) for intelligent event recommendations and booking assistance.
The system uses a microservices architecture with four backend services written in Java/Spring Boot, a Next.js frontend, and MongoDB for persistence. Services communicate via gRPC internally and expose REST endpoints for the frontend.
Frontend
- Next.js application with React 19
- Server-side rendering and API routes
- AI chat integration using Gemini and Model Context Protocol
Backend Services
- User Service - User profile management and data
- Auth Service - Authentication and JWT token handling
- Event Service - Event CRUD operations and search
- Booking Service - Booking management and status tracking
Data Layer
- MongoDB with sharding support for horizontal scaling
- Automated initialization via migration scripts
Observability
- OpenTelemetry instrumentation across all services
- Grafana LGTM stack for logs, metrics, and distributed tracing
- Framework: Next.js 15.5.4 (with Turbopack)
- UI Library: React 19.1.0
- Styling: TailwindCSS 4
- State Management: TanStack React Query 5
- Animations: Framer Motion
- AI: Google Generative AI (Gemini)
- Protocol: Model Context Protocol (MCP) SDK
- Observability: OpenTelemetry Web SDK
- Framework: Spring Boot 4.0.0
- Language: Java 25
- Communication: gRPC
- Database: MongoDB
- Authentication: JWT
- Observability: OpenTelemetry Java SDK
- Containerization: Docker & Docker Compose
- Database: MongoDB with Sharding Support
- Monitoring: Grafana LGTM Stack (Loki, Grafana, Tempo, Mimir)
- Telemetry: OpenTelemetry Collector
- Event discovery and browsing
- Booking management (create, view, manage bookings)
- User authentication and registration
- AI chat assistant powered by Gemini with MCP integration
- Full observability with distributed tracing and metrics
- Responsive UI with animations
- JWT-based authentication
- Scalable microservices architecture with MongoDB sharding
Before running the project, ensure you have the following installed:
- Docker (v20.10 or higher)
- Docker Compose (v2.0 or higher)
- Node.js (v20 or higher) - for local frontend development
- Java JDK (v25) - for local backend development
- Gradle (v8.0 or higher) - for building backend services
git clone <repository-url>
cd PulsarCreate a .env file in the root directory with the following variables:
# Gemini AI API Key
NEXT_PUBLIC_GEMINI_API_KEY=your_gemini_api_key_here
# MongoDB Configuration
MONGO_INITDB_ROOT_USERNAME=root
MONGO_INITDB_ROOT_PASSWORD=test123
# Grafana SMTP Configuration (Optional)
GF_SMTP_ENABLED=true
GF_SMTP_HOST=smtp.gmail.com:587
GF_SMTP_USER=your_email@gmail.com
GF_SMTP_PASSWORD=your_app_password
GF_SMTP_FROM_ADDRESS=your_email@gmail.com
GF_SMTP_FROM_NAME=Grafana Alertsdocker-compose up --build
docker-compose up --build -dPulsar/
├── frontend/ # Next.js frontend application
│ ├── src/
│ │ ├── app/ # Next.js App Router pages
│ │ ├── components/ # React components
│ │ ├── features/ # Feature-based modules
│ │ └── lib/ # Utilities and configurations
│ └── Dockerfile
│
├── services/ # Backend microservices
│ ├── auth-service/ # Authentication & authorization
│ ├── booking-service/ # Booking management
│ ├── event-service/ # Event management
│ └── user-service/ # User profile management
│
├── mongodb/ # MongoDB configuration
│ ├── migration/ # Database initialization scripts
│ └── sharding/ # Sharding cluster setup
│
└── docker-compose.yml # Multi-container orchestration
The project includes comprehensive observability:
- Distributed Tracing: Track requests across all microservices
- Centralized Logging: Aggregate logs from all services
- Metrics Collection: Monitor service health and performance
- Grafana Dashboards: Visualize all telemetry data
Access Grafana to view:
- Service health metrics
- Request traces
- Error rates and latencies
- Custom dashboards
The database is automatically initialized with the script in mongodb/migration/init-db.js when the container starts.
For production deployment with sharding:
cd mongodb/sharding
./setup-cluster.shRefer to the individual docker-compose.yml files in pc_1, pc_2, pc_3, pc_4 directories for distributed sharding configuration.
- User registers/logs in through the frontend
- Auth service validates credentials
- JWT token is generated and stored client-side
- Token is included in subsequent requests
- Services validate tokens using shared secret
The AI chat feature uses:
- Gemini AI: For natural language understanding and generation
- Model Context Protocol (MCP): For structured communication with backend services
- MCP Servers: Event and Booking services expose MCP endpoints for AI queries
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ by Artificed