Skip to main content
Williams BalogunGet in touch
Case Study — Light / 04

Mamsha

Walk from your hotel to the Haram before you travel: a voice guide through a real 3D Makkah that only says what it can back up.

Role Personal project · soloTimeline Nov 2026Type Voice AI · 3D · WebStatus Live demo
mamsha.vercel.app
Mamsha: a route from a Makkah hotel through five numbered stops to Gate 1 of the Haram
01 — At a glance

Mamsha is a virtual walk from a hotel in Makkah to a gate of the Masjid al-Haram. A voice guide talks you through the route in real 3D, opens a real street photo at each stop, and tailors what it says to who is travelling, such as a family with a wheelchair user or a couple walking at a normal pace. First-time pilgrims can see the way and ask questions before they arrive.

The guide may only state facts I have verified, each stored with where it was checked. Asked something it doesn't know, it says so, because a pilgrim might plan around what it tells them.

Role
Personal project · built solo
Built
17 – 23 Nov 2026
Surface
Web app + Python API, on Vercel
Stack
TypeScriptReactViteCesiumJSPythonFastAPIPydanticGemini LiveGroq
6
days from first commit to a deployed demo
4
layers of voice fallback, down to a guide that calls no AI
400+
automated tests across the API and the web app
02 — What I built

The hard parts.

01A voice that drives the map

A spoken conversation over Gemini Live that you can interrupt, with captions always on. The guide moves the map itself (start the walk, show a stop, open the street photo, pause) through tool calls that are validated with Ajv before anything touches the map. The browser only ever gets a single-use token with the model, prompt and tools locked in, never an API key.

Gemini LiveTool callsEphemeral tokens
02Grounded, not guessed

The route and every fact live in one hand-drawn file, each fact with a verified_from source. The system prompt carries the facts by id with rules against stating anything else, especially accessibility claims. A grounding check narrates every stop for both traveller profiles with the real model and flags any claim the facts don't support.

GroundingVerified factsEvals
03It never stops working

Voice steps down from Gemini Live to push-to-talk (Groq Whisper and TTS), then typed text, then a scripted guide that calls no AI at all. Text replies try Groq, then Gemini, and skip a model that is failing instead of waiting on it every turn. The active mode is always on screen.

Fallback chainsGroqResilience
04A real city, never faked

CesiumJS streams Google's Photorealistic 3D Tiles. The camera opens on the whole route, glides above the street and drops to eye height at each stop, where a Mapillary street photo fades in. Where no photo exists it shows the 3D street and says so. Light follows the time of day, and a street ambience gives way to the crowd near the gate.

CesiumJS3D TilesMapillaryWeb Audio
05One schema, two languages

Pydantic models are the only hand-written schemas: one command exports JSON Schema and TypeScript types, and CI fails if they drift. The map, street photos and voice each sit behind an interface with a fake, so the logic is tested without a GPU, a network or an AI model.

PydanticJSON SchemaGenerated typesFakes