Case Study
2026Nov 2026 – ongoing, soloFull-Stack · Lead DeveloperNext.js 16TypeScriptPostGIS

Kumbh Drishti

Kumbh Drishti
Sector plan across Haridwar–Rishikesh
In daily use · access restricted

The operations platform for Kumbh Mela 2027: every work site across 32 sectors tracked as a ticket, mapped on a live GIS layer, and queryable in plain Hindi or English.

01

Overview

A government megaproject, run from one map.

Kumbh Mela is the largest gathering of people on Earth, and getting the Haridwar–Rishikesh region ready for 2027 means a huge number of works (roads, power poles, water lines, bridges, tentage) spread across 32 sectors and half a dozen departments. Before Drishti, progress lived in separate department spreadsheets, and "done" meant whatever a department said. I built one platform where every work is a ticket pinned to its exact parcel on a GIS map. Surveyors prove progress on site with photos, video and structured questionnaires, department sheets sync in automatically, and officials can see what is behind plan, what is claimed but unverified, and ask an AI assistant about any of it in Hindi or English.

02

Field Ticketing & Verification

  1. 01Every work is a ticket on a parcel

    Works are organised by department head and sub-head, carry their schedule and measured quantity (metres of road, number of poles), and link back to their exact spot on the map.

  2. 02Proof from the field

    Surveyors upload before/after photos and short videos straight from their phone to Cloudinary through signed, folder-scoped uploads, so media never passes through the app server and can't be attached to the wrong ticket.

  3. 03Claimed vs verified

    A department marking work "Resolved" is only a claim. Every claim is checked against the latest on-site questionnaire and shown as Verified, Disputed or Not verified, so the gap between reported and real progress is visible at a glance.

  4. 04Behind-plan alerts

    Each sub-head's plan is a line from start date to target date. Anything 5% or more behind, or past its target, surfaces for admins, worst first and broken down by sector.

05

Screenshots

Inside the platform — across Ground Truth, The Map, Ask Drishti. Drag to explore.

Kumbh Drishti · The Map
Sector plan across Haridwar–Rishikesh
Kumbh Drishti · The Map
Tickets mode: parcels coloured by status
Kumbh Drishti · Ask Drishti
Command dashboard: work done vs plan by sector
Kumbh Drishti · Ask Drishti
Assistant answering with a live progress card
Kumbh Drishti · Ground Truth
Ticket with its site evidence workflow
Kumbh Drishti · Ground Truth
Claimed vs verified, by work head
deploy.sh
$git push origin main
›Lint, typecheck, unit + e2e tests...
✓Production build compiled
✓Smoke-tested the exact deploy zip
✓OIDC login, no stored secrets
✓Deployed to Azure App Service
→In use by the Kumbh project team
06

Deployment

A department marking work done is a claim. A surveyor standing on site is proof. The whole platform is built around the gap between the two.

In daily use by the Kumbh project team: around 10,000 tickets filed, verified and resolved by surveyors, managers and admins in the field.

Private government platform · access restricted
07

Tech Stack

Frontend
Next.js 16 (App Router)React 19TypeScript (strict)Tailwind CSS v4
Mapping
MapLibre GLPostGIS vector tilesSatellite basemap
Backend
Server Actions & Route HandlersAuth.js v5CASLZod
Data
PostgreSQL + PostGIS (Supabase)MongoDB (Mongoose)
AI
Azure OpenAI (tool calling)Bilingual system prompt
Media
Cloudinary (signed direct uploads)
Quality
VitestPlaywrightConventional CommitsGitHub Actions
DevOps
Azure App ServiceOIDC deploysSmoke-tested build artifacts
08

Architecture Decisions

Two databases, never joined

Geometry lives in PostGIS, where spatial indexes and ST_* functions belong; tickets, users and audit trails live in MongoDB, where flexible documents suit forms that change weekly. A ticket stores a snapshot of its map location instead of a live cross-database reference, trading a little duplication for two systems that can fail and scale independently.

Verification is computed, never stored

Whether a claim is verified is worked out at read time from the latest site questionnaire. Import scripts, deleted responses and reopened tickets can never leave a stale "verified" flag behind, because there is no flag.

The AI only answers through tools

Rather than handing the model a data dump, every figure comes from a tool that calls the same service the dashboard uses. The assistant and the screen can't disagree, and when an early version returned demo numbers (159 poles against a real 53), the fix was in one place.

Permissions as data, checked server-side

Roles are lists of CASL grants re-read on every request, and sessions are tracked server-side, so a role change applies instantly and an admin can sign any device out remotely. Every server action re-checks ownership; the UI hiding a button is never the guard.

Docs written for humans and agents

The repo carries a living context file covering architecture, traps and house rules, kept current with every feature. New contributors (and AI coding agents) start productive without re-reading the codebase, which is a big part of how the project ships fast without losing track of its own decisions.

09

Challenges

  1. Making 70 map layers fast on a pooled database

    The road layer alone was too heavy at low zoom. Each layer got its own budget: empty tiles below a minimum zoom without touching the pool, a literal SQL filter for minor roads when zoomed out, and pixel-unit simplification. On the database side, sector filters were rewritten so the planner could use the index, and the Postgres pool gained a query timeout plus a single retry for connection-class errors after silently dead sockets left dashboards hanging.

  2. Grounding an LLM in numbers people make decisions on

    The first assistant answered "how many police stations?" with "none", because it could only see tickets while the map held 25. The fix was a deliberate tool set: one for map feature counts with spatial joins against sector boundaries, one that sums a work across all 32 sectors in a single call (instead of the model making 32 calls and drawing 32 cards), and strict matching rules so "police stations" doesn't pick up "Fire Station".

  3. Syncing messy department spreadsheets into live tickets

    Each department keeps its own sheet layout, renames tabs, and occasionally reports more work than physically exists. Each sync maps its sheet to tickets with explicit rules (for example, a water line is never marked longer than the metres actually laid, and rows for deleted tickets are skipped), runs hourly, and logs every update so an official can see exactly what changed and when.

  4. Deploying Next.js 16 to Azure App Service reliably

    Azure's build system rewrote the app's dependencies before startup, symlinked packages vanished inside the deploy zip, and Windows line endings broke the start script. The pipeline now builds, smoke-tests the exact zip that will ship, and deploys in a single job with OIDC credentials, so a broken artifact can't reach production.

10

By the Numbers

~10,000Tickets
32Sectors · 5 Zones
~70PostGIS Layers
12AI Tools · 2 Languages
4Roles, Permission-Gated
23Screens · 29 API Routes
64Test Suites
5Department Syncs
RoleFull-Stack · Lead Developer
Year2026
TimelineNov 2026 – ongoing, solo
StackNext.js 16 · TypeScript · PostGIS · MapLibre GL · MongoDB · Azure OpenAI · Playwright
ModulesGround Truth + The Map + Ask Drishti

AKSHAT KUMAR

Full-Stack + AI Developer