← Back to Portfolio
Case Study

Temple Heritage

AI-assisted pilgrimage planning for India's temples — from discovery to a shareable digital passport.

Problem

Pilgrimage planning is scattered across a dozen sources.

Planning a multi-temple pilgrimage in India means piecing together temple history, festival calendars, and travel logistics from scattered sources, with no single place to discover a temple, plan a trip around it, and keep a record of what's already been visited.

Solution

One platform for discovery, planning, and remembering.

A full-stack discovery and planning platform covering 21 temples and 14 festivals, with a Groq-powered itinerary planner that turns a city, day count, and interest list into a validated, exportable day-by-day plan. A gamified “Pilgrimage Passport” then tracks completed yatras over time, with region badges and a shareable stamp-book export.

Architecture
Frontend
Next.js + React (App Router)
→
Backend
Next.js API Routes
→
AI / ML
Groq SDK — itinerary planner & assistant
→
Database
Supabase (Postgres, Auth, Storage)
→
Deployment
Vercel — custom domain
Technical Decisions

Supabase over a custom auth/DB stack

Postgres, authentication, and file storage came from one provider, with Row-Level Security enforced at the database layer — so review moderation and admin-only stats can't be bypassed by a compromised client, only by the database policy itself.

Groq over a larger hosted model

Itinerary generation needed to feel interactive, and the output is structured JSON rather than open-ended prose — speed mattered more than raw model capability here.

Validation and normalization as a dedicated pipeline stage

AI responses are parsed, validated, and normalized before they ever reach the UI or get saved, with fallback handling if the model returns something malformed — the AI's output is never trusted directly.

Challenges

Handling imperfect AI output safely

The itinerary planner needed defined fallback behavior, rate limiting, and error handling for the cases where Groq returns output that doesn't match the expected schema, rather than assuming every response is well-formed.

Data model gaps discovered mid-build

Extending the passport feature surfaced missing columns (username, avatar, share tokens) and a mismatch between reviews/check-ins keying on temple slug versus temple ID, which needed schema migrations rather than pure UI work.

Implementation

Tested where it matters, not just where it's easy.

Twelve automated Vitest test suites cover the recommender, zodiac/horoscope matching, rate limiting, admin stats, and the AI pipeline itself — not just UI smoke tests. The admin dashboard layers a stats bar (registered users, saved temples, yatra plans) above RLS-protected review moderation, so platform health and moderation live in the same view.

Results
21Temples across 5 regions
14Festivals tied to temples
12Automated Vitest suites
LiveOn a custom domain
Links