# I built an AI travel agent for India's hidden destinations — here's the tech stack

> Source: <https://dev.to/krish_dev11/i-built-an-ai-travel-agent-for-indias-hidden-destinations-heres-the-tech-stack-2pkg>
> Published: 2026-08-26 11:51:34+00:00

I spent 5 months building almanacindia.com — an editorial platform documenting India's genuinely hidden destinations. Not "offbeat" places that show up on every listicle. Places like Bara Bhangal (a permanently inhabited village with no road, reachable only by a 5-day trek over a 4,700m Himalayan pass) and Hunderman (a village that was Pakistani territory until 1971, 8km from Kargil).

Here's everything I built and how.

The Stack

Framework: Next.js 15 App Router with TypeScript, deployed on Cloudflare Pages via OpenNext. Static generation for 1,500+ pages at build time. No Git — Proton Drive with AES-256 encrypted backups.

Maps: Mapbox GL v3 Standard style. 96 Indian cities, 3D cinematic dusk lighting, destination pins, routing between places, satellite toggle, live rain/snow overlay from Open-Meteo (15-min cache). Night mode activates automatically after 7pm local time.

Expedition Books: Each destination gets a full book — About, History, What Nobody Tells You, The Moment, Before You Go. Books paginate using DOM-height measurement via Range.getClientRects() — not character count. Fonts load before pagination runs via document.fonts.ready. 32 books live.

Media: Cloudinary for all destination cover photos. g_auto crop handles landscape-to-portrait conversion for book covers. f_auto,q_auto across the board.

Auth: Firebase Auth with OAuth. Community chat via Firebase Realtime Database with admin moderation and 48hr auto-delete.

Email: Resend for the Inner Circle newsletter. Rotates 100 cities every 2 weeks.

AI Chat: The most interesting piece.

The AI Travel Agent

Built an editorial chat agent that opens with "Where do you want to disappear to?" — three starter chips, streams word by word, right-side push sidebar.

Provider: Ofox.ai (official Anthropic partner gateway) — solved the India payment problem after Anthropic's Stripe integration blocked all Indian cards.

Model: Claude Sonnet via Ofox.

Architecture:

Dynamic context loading — max 2 expedition books per question, under 7,000 token budget

Prompt caching — 71.6% cache hit rate on day one

Retrieval logic — books only attach when the question names a specific destination or region, not on departure intent words

Postgres Q&A cache — 80% word-match threshold, 7-day expiry

[ALMANAC_GAP] logs — every unanswered region query goes to a content roadmap

Gap rule: When a user asks about a place we haven't documented, the agent acknowledges the gap and redirects to the closest documented region. Never halluccinates.

SEO/GEO Architecture

Built specifically for AI citation:

llms.txt at root with all 58 destination URLs and descriptions

robots.txt explicitly allows GPTBot, ClaudeBot, PerplexityBot, OAI-SearchBot, Google-Extended

Cloudflare AI Crawl Control — all crawlers set to Allow

IndexNow — 1,531 pages submitted on first run

FAQ schema (153 Q&A pairs) for AI answer engine visibility

Canonical URLs enforced across all 1,500+ pages

Attraction descriptions server-trimmed to 120 chars on city pages so full text only lives on attraction pages — fixes the duplicate content problem Google penalises

The Hardest Problem

Distribution. The product works. Getting the first 1,000 people to see it is the actual problem.

If you've solved this for a research-heavy content product — I want to hear how.

almanacindia.com — The India nobody shows you.
