Meridian

A cutting-edge real-time ride-hailing simulation platform demonstrating event-driven architecture, live data streaming, and AI-powered services across multiple cities.

System Architecture

Event-driven microservices communicating through Apache Kafka, enhanced with AI for intelligent pricing and natural language interactions.

Meridian System Architecture Diagram

Loosely-coupled services communicate asynchronously via Kafka topics (ride, taxi), enabling independent scaling and fault isolation

Ride Journey Flow

1

Chat Request

User chats with MeridianAI in natural language. The ride-api uses Claude AI to sanitize input and extract pickup/dropoff locations, then geocodes them via Mapbox.

2

Match & Assign

Orchestrator consumes from ride topic, finds nearest available taxi within 2.5km, or generates new taxis 0.8-2km away. Publishes assignments with routes from Mapbox Directions API.

3

Live Movement

Simulator replays taxi movement along actual Mapbox routes, streaming position updates every few seconds to taxi topic. Frontend receives updates via WebSocket bridge.

4

Smart Billing

Billing service uses Claude AI to extract real taxi rates for the location, cached in Redis for 24h. Calculates fare in local currency (GBP, EUR, RON, INR), persists to PostgreSQL.

Key Features

⚑ Event-Driven Design

Kafka topics (ride, taxi) enable asynchronous communication between services. FastAPI ride-api bridges WebSocket connections to Kafka consumers, streaming real-time updates to the React frontend as events flow through the system.

πŸ€– Dual AI Integration

MeridianAI chat uses Claude via DigitalOcean AI Inference API to parse natural language ride requests and extract locations. Billing service queries Claude/GPT-4o to fetch real-world taxi rates for any city, with Redis caching (24h TTL) to minimize API calls.

πŸ—ΊοΈ Mapbox Integration

Geocoding API converts locations to coordinates. Reverse Geocoding detects city/country from coordinates for locale-aware names (via Faker). Directions API provides routes that the simulator replays point-by-point for realistic movement.

🌍 Global Realism

System adapts to any location worldwide. Orchestrator intelligently generates taxis 0.8-2km away (never on the same street) when none are nearby. Multi-currency billing (GBP, EUR, RON, INR) with location-specific rates. Locale-aware name generation produces authentic names for each city using Faker locales.

πŸ“Š Data Persistence

NeonDB Serverless PostgreSQL stores ride completions with billing details for analytics. Redis caches taxi rates by city. Database schema includes ride status tracking, location context, and fare breakdowns with unique constraints on (user, taxi, timestamp).

🐳 Container Orchestration

All services run in Docker containers orchestrated via docker-compose. Caddy reverse proxy handles HTTPS with automatic certificate management (Cloudflare DNS). Kafka UI provides topic inspection. Supports both local dev and production deployments.

Technology Stack

Python 3.11Backend
React 18Frontend
Mapbox GLMapping
Apache KafkaEvent Streaming
FastAPIAPI
NeonDBDatabase
RedisCaching
Claude AIAI/ML
DockerDevOps

Demo Video

Watch Meridian in action: matching, routing, simulation and AI-powered billing.