How I built Panther Panchali: The Living Canvas
Most of us own at least one photograph of a place we cannot name. A crumbling arched gateway in a mango grove. A terracotta frieze catching the late afternoon light. A tea terrace disappearing into mist. The image surviv
Most of us own at least one photograph of a place we cannot name. A crumbling arched gateway in a mango grove. A terracotta frieze catching the late afternoon light. A tea terrace disappearing into mist. The image survives; the name, district and story quietly evaporate.
West Bengal is full of such lacunae. Mainstream travel portals dutifully list the famous destinations and skip the quiet river ghats, village temples and half forgotten palaces scattered across the stateβs 23 districts. That gap is why I built Panther Panchali: The Living Canvas.
Upload one photograph. The app identifies the place, flies you there on a map, tells you its story, and brings the still image closer to life.
It is open source under the MIT license. Near the end, I explain how you can help, without requiring a blood oath, though enthusiasm is welcome.
What It Does
Upload a photograph of a place in West Bengal, and the app walks you through a deliberately theatrical sequence.
- It identifies the landmark with multimodal AI and returns the name, district, address and exact coordinates.
- It flies you there on an OpenStreetMap view, starting with all of India, descending into the Bengal delta, then landing on the exact site.
- It writes a literary overview of roughly 300 words in plain, flowing prose.
- It adds two deeper chronicles, one on scenic beauty and one on historical significance, only when the place genuinely warrants them.
- It predicts the travel mood: atmosphere, expected sights, sounds and smells, and the best season to visit.
- It narrates the story aloud with text to speech.
- It shows live weather at the site and a pure satellite view with no road overlays.
- It saves the place to a personal journey gallery, with a public share link that anyone can open without signing in.
- It turns the photograph into a short cinematic video with ambient sound, using Cloudinary generative AI.
If you upload a photograph from outside West Bengal, the app still recognises the place. It then politely explains that it is devoted to the 23 districts and invites you to try a Bengal photograph instead. No offence intended; borders are simply part of the product spec.
Why I Built It
Unnamed places are a real and unsolved problem. Photo search works well for famous landmarks. For a small temple in Bankura or a ghat in Nadia, it either fails or returns something generic. People want a name, a location and a story for the place they actually photographed.
Narrow focus beats wide ambition. Instead of promising to identify anything on Earth, I committed to one region. That lets me tune the AI with real Bengal vocabulary: terracotta plaques, Chala and Ratna temples, laterite soil, Nawabi palaces, tea gardens. It lets me build the product around one cultural identity. It also lets me decline out of scope places politely, which keeps the archive coherent rather than cosmically vague.
The tooling has only recently become good enough. A multimodal model that can read architecture and light, a generative image to video service, and a modern full stack framework that lets one developer ship all of it together are all new. As far as I could find, I have not seen another project that combines photo based place recognition, literary storytelling, a cinematic fly in map, spoken narration and generated motion for West Bengal specifically. That is my first mover bet. I would be glad to be corrected, so if you know of something similar, please tell me in the comments.
A bet is not a moat, though. Being early is only worth something if the project keeps moving. That is a large reason I am opening it up. A head start with better lighting is still a head start.
Design Rules
Before writing any code, I set four rules.
A place should be an experience, not a database row. That is why the app favours prose over bullet lists, uses an editorial serif design, and sends a map camera travelling to the place instead of jumping to a pin.
The language should be simple. I told the AI to use clear, vivid English that anyone can read, so the stories reach as many people as possible. Clarity is a feature, not a compromise.
Sign in should be simple too. Google is the only login method. Less to maintain, less to get wrong, fewer creative ways to break authentication on a Tuesday.
The visual identity should be one thing. I call it the Morning Paper palette: warm paper tones, terracotta and soft gold. I wrote every design and architecture rule into a guidelines file in the project, so both humans and AI coding assistants stay consistent. Adult supervision, but for CSS.
The Stack
- Framework: Next.js 16 with the App Router, TypeScript and React 19
- Styling: Tailwind CSS v4 with Fraunces, Newsreader and Instrument Sans fonts
- Recognition and storytelling: Google Gemini with multimodal input and structured JSON output
- Media: Cloudinary for storage, delivery, colour extraction and image to video
- Maps: Leaflet with OpenStreetMap tiles, plus Esri World Imagery for satellite views
- Weather: Open Meteo, which needs no API key
- Narration: Google Cloud Text to Speech with an Indian English voice
- Authentication: Auth.js with NextAuth v5 and Google OAuth
- Database: MongoDB
- Tooling: pnpm and Biome
How It Works
Teaching Gemini to behave. The heart of the app is one function. It sends the uploaded photograph and a long, carefully written prompt to Gemini and asks for structured JSON in return. If the main model call fails, the code falls back to an older, more stable Gemini model, so a model hiccup does not become a user facing faceplant.
Most of the quality comes from the prompt. The model must first decide whether the place is in West Bengal, and each answer triggers different instructions. The 300 word overview must contain no Markdown at all, because I want it to read like a story and also to be clean input for text to speech. The scenic and historical sections are optional and return empty when they do not apply, since a city monument may have no landscape worth describing and a forest may have no architecture. The writing style is interactive storytelling without an artificial persona, so the text invites the reader in without a βHello, Iβm your guideβ voice.
After the response arrives, I clean it, parse it into a typed structure, and fall back to safe default coordinates if the model returns something unusable. Because everything flows through one typed contract, the interface never has to guess what it is getting.
A map that makes you arrive. I wanted arrival to feel earned. The map component runs three timed stages. It begins with a view of all of India, glides into West Bengal over a few seconds, then descends onto the exact landmark, where a pulsing terracotta marker drops and a popup opens. A replay button lets you watch the flight again. A second map component swaps the tiles for satellite imagery to give a clean, road free view of the terrain. Since the map library depends on the browser, both maps load only on the client side.
Narration, weather and sharing. For narration, a server route strips formatting from the text, sends it to Google Cloud Text to Speech at a slightly slowed pace so every word is clear, and falls back to a second voice if the first runs into a quota. Responses are cached so the same story is not synthesised twice. Weather comes from Open Meteo using the landmarkβs coordinates, with a short timeout so a slow weather service can never hang the page. Saved places live in MongoDB. Anyone with a share link can open a saved place without signing in, while the rest of the app stays protected.
Authentication at the edge. Authentication is split into two parts. A lightweight configuration runs in the middleware, and a fuller setup handles Google sign in, creates or updates the user record in MongoDB, and issues sessions. The middleware protects the guide, journeys and profile pages, with one deliberate exception for the public share pages.
Design written down. The guidelines file records the folder structure, exact colour tokens, font roles, icon set and navigation behaviour. Navigation is a floating icon dock on desktop and a foldable drawer on mobile, and it hides itself on the sign in screen. Writing this down meant I could work with AI coding assistants without the interface drifting away from its identity.
Cloudinary: The Part That Makes It Feel Alive
Cloudinary is what turns this project from a clever lookup tool into something that feels alive. It does five distinct jobs.
Upload, storage and delivery. Every photograph goes to Cloudinary first, into a dedicated folder, and comes back with a secure CDN link and identifiers. The app stores those and serves every image from Cloudinary, so the gallery and public share pages load quickly from a CDN instead of leaning on my own database. If credentials are ever missing, the app falls back gracefully instead of crashing.
A colour palette taken from the photograph itself. During upload I ask Cloudinary to analyse the image and report its dominant colours. I clean up the values, remove duplicates and keep five, with a default Bengal palette as a safety net. Each place therefore gets its own atmospheric palette pulled from its own picture. It is a small touch, but it ties every page to the photograph it came from.
The bridge to video. Cloudinaryβs image to video service identifies images by an asset identifier instead of a web address. I wrote a resolver that tries several routes to find that identifier: a direct lookup by public ID, extraction from the delivery link, and re uploading as a last resort. This makes the video feature work even for places saved earlier.
From photograph to cinematic video. This is the headline feature. The app asks Cloudinary to generate an eight second, 1080p, widescreen video with synthesised ambient audio from the saved photograph. Each place gets two styles. Serene Atmosphere offers gentle morning mist and a slow drift. Golden Hour Sunset offers warm rays and a dramatic sky. Generation is asynchronous, so the app starts a job, checks on it every few seconds, and saves the finished video link against the place. Each style is therefore rendered only once and then reused.
I want to be upfront about one thing. The whole pipeline is built end to end, but the interface currently ships with the video feature behind a switch, so by default it shows a βComing Soonβ state. Turning it on is a configuration change, and making it production ready is part of the roadmap below. The machinery exists; the curtain is simply still down.
Brand and image plumbing. Cloudinary also hosts the brand logo used for the browser icon and the mobile home screen icon, and its domain is allowed in the Next.js image setup so photos benefit from the frameworkβs image optimisation.
In one sentence: without Cloudinary, this is a recognition app that returns text; with it, the same photograph becomes a stored, palette matched, shareable and soon animated memory of a place.
Roadmap
- Switch on video generation for everyone, with sensible limits and clearer progress feedback.
- Add a proper automated test suite. There are no tests yet, and the API routes and AI response parsing need them first.
- Harden the backend with stronger authorisation checks, rate limiting, upload limits and safer handling of model output.
- Measure recognition accuracy against a labelled set of Bengal landmarks, so changes to the prompt can be judged on evidence rather than vibes.
- Add contribution guidelines, issue templates and beginner friendly labels.
- Build richer journeys, such as collections, district wise browsing and better ways to explore what the community has saved.
Contribute
Panther Panchali is MIT licensed and follows the Contributor Covenant Code of Conduct. So far it has been a one person project, which means early contributors will have a real say in where it goes. I am looking for three kinds of help.
Feature builders. If you enjoy shipping, there is plenty to build: journey collections and district wise exploration, support for several photographs of one place, cost controls and caching around AI and video calls, and the test suite, which I consider a feature in its own right.
Code auditors. If you enjoy reading code critically, I would love a careful review. The areas I care about most are authorisation and ownership checks on API routes, rate limiting and abuse protection for expensive endpoints, input validation and upload limits, sanitising model output before it reaches the page, resistance to prompt injection through the user notes field, and exactly what data the public share endpoint returns. Please report anything sensitive privately through GitHubβs security advisory feature instead of opening a public issue.
UI and design polish. If you care about how software feels, the visual language is fixed, with its paper toned palette, three typefaces and one icon family, but there is a lot of room inside it. Responsive refinements on small screens, accessibility improvements such as contrast, focus order, screen reader labels and reduced motion for the map flight, better loading, empty and error states, and finer typography in the long reading view would all make a real difference.
To get started, fork the project, read the guidelines file first because it holds the architecture and brand rules, and open an issue or a pull request. If you would rather talk first, leave a comment below saying which of the three roles you would like to take.
A Final Thought
Bengal lives in more than stone and soil. It lives in photographs that people took and could not name. If this project helps even a few of those pictures find their names and their stories again, it was worth building.
Try it, break it, and tell me what you think in the comments.
Repository: Panther Panchali
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.