Dual Master's in Industrial Engineering & Computer Science | Optimization, Data, Automation
Team Members: Lewis Ndambiri, Mehrab Fajar
Track: 2 Process-Centric Services
User Interface: Telegram Bot
UrbanPulse is a service-oriented architecture (SOA) application that streamlines event discovery and logistics planning through a conversational Telegram bot interface. The system integrates multiple external APIs (Ticketmaster, OpenWeatherMap, OpenRouteService) to provide intelligent event recommendations with weather-aware transport optimization.
┌─────────────────────────────────────────────────────────────────┐
│ USER INTERFACE LAYER │
│ ┌───────────────────────────────────────────────────────────┐ │
│ │ Telegram Bot (Python) │ │
│ │ Commands: /tonight, /setup, /profile, /history │ │
│ └───────────────────────────────────────────────────────────┘ │
└────────────────────────┬────────────────────────────────────────┘
│ REST API (JSON)
┌────────────────────────┴────────────────────────────────────────┐
│ LAYER 1: PROCESS-CENTRIC SERVICES │
│ ┌──────────────────────────┐ ┌──────────────────────────────┐ │
│ │ Event Discovery │ │ Logistics & Commit │ │
│ │ Orchestrator │ │ Orchestrator │ │
│ │ Port: 5008 │ │ Port: 5009 │ │
│ │ Workflow: "What's │ │ Workflow: "I want to go │ │
│ │ happening tonight?" │ │ to [Event ID]" │ │
│ └──────────────────────────┘ └──────────────────────────────┘ │
└────────┬────────────────────────────────────┬───────────────────┘
│ REST API Calls │
┌────────┴────────────────────────────────────┴───────────────────┐
│ LAYER 2: BUSINESS LOGIC SERVICES │
│ ┌──────────────────────────┐ ┌──────────────────────────────┐ │
│ │ Preference Matcher │ │ Transport Optimizer │ │
│ │ Port: 5006 │ │ Port: 5007 │ │
│ │ • Score events (0-100) │ │ • Calculate viability │ │
│ │ • Rank by preferences │ │ • Weather-aware routing │ │
│ │ • Weather filtering │ │ • Mode recommendation │ │
│ └──────────────────────────┘ └──────────────────────────────┘ │
└────────┬────────────────────────────────────┬───────────────────┘
│ │
┌────────┴────────────────────────────────────┴───────────────────┐
│ LAYER 3: ADAPTER SERVICES │
│ ┌─────────────┐ ┌──────────────┐ ┌────────────────────────┐ │
│ │ Events │ │ Weather │ │ Map Adapter │ │
│ │ Adapter │ │ Adapter │ │ (OpenRouteService) │ │
│ │ Port: 5003 │ │ Port: 5004 │ │ Port: 5005 │ │
│ │ Ticketmaster│ │ OpenWeather │ │ • Distance calc │ │
│ │ API │ │ API │ │ • Transit options │ │
│ └─────────────┘ └──────────────┘ └────────────────────────┘ │
└────────┬──────────────────────────────────────────────────┬─────┘
│ │
┌────────┴──────────────────────────────────────────────────┴─────┐
│ LAYER 4: DATA SERVICES │
│ ┌──────────────────────────┐ ┌──────────────────────────────┐ │
│ │ User Profile Service │ │ Itinerary Service │ │
│ │ Port: 5001 │ │ Port: 5002 │ │
│ │ • Music preferences │ │ • Event commitments │ │
│ │ • Home location │ │ • Logistics history │ │
│ │ • User metadata │ │ • Transport records │ │
│ └──────────────────────────┘ └──────────────────────────────┘ │
└────────┬──────────────────────────────────────────────────┬─────┘
│ │
└──────────────┬───────────────────────────────────┘
│
┌─────────▼─────────┐
│ PostgreSQL │
│ Database │
│ Port: 5432 │
└───────────────────┘
User → Telegram Bot → Event Discovery Orchestrator
│
┌───────────────────┼───────────────────┐
│ │ │
▼ ▼ ▼
User Profile Events Adapter Weather Adapter
Service (Ticketmaster) (OpenWeather)
│ │ │
└───────────────────┼───────────────────┘
│
▼
Preference Matcher
(Business Logic)
│
▼
Filter by Weather
│
▼
Ranked Events → User
Steps:
User → Telegram Bot → Logistics & Commit Orchestrator
│
┌───────────────────┼───────────────────┐
│ │ │
▼ ▼ ▼
User Profile Events Adapter Weather Adapter
(Home Loc) (Event Details) (Forecast)
│ │ │
└───────────────────┼───────────────────┘
│
▼
Map Adapter
(Transit Options)
│
▼
Transport Optimizer
(Business Logic)
│
▼
Itinerary Service
(Save Plan)
│
▼
Complete Plan → User
Steps:
| Component | Technology | Purpose |
|---|---|---|
| Framework | Flask 3.0.0 | RESTful web services |
| Database | PostgreSQL 15 | Persistent data storage |
| Containerization | Docker & Docker Compose | Service deployment |
| Bot Framework | python-telegram-bot 20.7 | User interface |
| HTTP Client | Requests 2.31.0 | Inter-service communication |
| ORM | SQLAlchemy 3.1.1 | Database abstraction |
✅ Strict 4-Layer Architecture - Clear separation of concerns
✅ 2 Process Orchestrators - Distinct workflow management (2-student requirement)
✅ REST Communication - Standardized JSON interfaces
✅ Service Independence - Each service can run standalone
✅ Containerization - Docker deployment for all services
✅ External Integration - Real-world APIs (Ticketmaster, OpenWeather, OpenRouteService)
✅ Data Persistence - PostgreSQL with proper schema design
/health endpoint for all services# Build and start all services
docker-compose up --build
# Test individual service
curl http://localhost:5008/api/v1/quick-discover \
-H "Content-Type: application/json" \
-d '{"city": "New York", "preferences": ["Jazz"]}'
UrbanPulse successfully demonstrates a production-grade SOA implementation with clear layer separation, intelligent business logic, and seamless external API integration. The system provides real value by solving the fragmented event planning experience through a unified conversational interface.
Future Enhancements:
GitHub Repository: https://github.com/lewisndambiri/lewisndambiri.github.io/new/main/projects
Live Demo: Available via Telegram @EventPlanner
Documentation: Complete API documentation in /docs