Dadur Ranna (দাদুর রান্না) — Preserving Grandma's Handwritten Recipes with Open-Weight Gemma
This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend.
Targeting the Best Use of Gemma and Best Use of Render featured prize categories.
What I Built
Every family has a keeper of culinary memory. For my friend Farzana, that person is her grandmother (দাদু / Dadu). For over fifty years, her signature dishes only existed as brittle, yellowing diary pages filled with hurried Bengali cursive, faded ink, and colloquial shorthand like "অন্দাজমতো এক বাটি" ("an approximate small bowl") or "এক চিমটি" ("a pinch").
Because paper deteriorates and handwriting fades, I built Dadur Ranna (দাদুর রান্না): an intimate, bilingual family cookbook maker designed to preserve heirloom handwritten recipes before they are lost to time.
🌟 Key Highlights & Features
- 📸 Handwritten Photo & Messy Note Transcription: Snap phone photos of handwritten pages or paste rambling mixed Bangla/English notes. Images are compressed and resized client-side via HTML5 Canvas before uploading.
- ⚠️ Human-in-the-Loop "Uncertainty" Flags: Cooking is chemistry and heritage. If ink is smudged, torn, or colloquial (e.g., "রাধুনি নাকি কালো জিরে স্পষ্ট নয়"), Gemma never silently guesses. Ambiguous quantities and terms are flagged in warning yellow so family cooks can confirm them.
-
⚖️ Fraction-Aware Serving Scaler: Real recipes use fractions, not awkward decimals. Dadur Ranna dynamically scales quantities up or down with culinary fractions (
½,¼,¾,1½). - 🌐 Bilingual Toggle: Instant toggle between উভয় (Both / Bilingual), বাংলা (Bangla), and English for titles, ingredients, and steps.
-
📖 Keepsake Print-to-PDF Book: Formats a printable family book with
@media print, complete with traditional Alpana (আলপনা) decorative frames, an editable family dedication ("For Dadu, with love"), a Table of Contents, and one recipe per printed page. -
🔒 100% Client-Side Privacy: Zero database required. Recipes live safely in browser
localStorage, with full JSON Export and Import capabilities.
🎁 Handing It Over to Farzana
Recipient: Built for Farzana and her family to preserve her grandmother's (Dadu) culinary legacy.
Her Reaction:
"This is incredible. I tested it on Dadu's payesh recipe—which was scribbled in messy Banglish across two torn notebook margins with zero proper gram measurements—and it laid out the exact steps cleanly in both Bangla and English. Ammu usually hates tech stuff, but she immediately understood the serving scaler when we needed to cook for eight people instead of four. Having this as a clean, printable PDF dedication to Dadu is priceless."
— Farzana (via WhatsApp)
Demo
- 🌐 Live Web Application: https://dadurranna.onrender.com/
- ⚡ Zero-Key Offline Exploration: Click "⚡ ডেমো লোড করুন (Demo)" on the live site to load 6 authentic heirloom Bengali recipes (Shorshe Ilish, Aloo Posto, Bhoger Khichuri, Chingri Malai Curry, Notun Gurer Payesh, and Begun Bhaja) with custom vector food art—no API key required!
Code
দাদুর রান্না (Dadur Ranna) — Family Cookbook Maker
"Dadur Ranna" (দাদুর রান্না) is an intimate culinary preservation web app built for one real person: my friend's grandmother, whose irreplaceable culinary legacy exists only as brittle handwritten diary pages, faded envelope scribbles, and rambling, colloquial notes in mixed Bangla and English.
Powered by Google's open-weight Gemma (gemma-3-27b-it or local Ollama), Dadur Ranna deciphers cursive handwriting and colloquial cooking jargon, extracts structured bilingual recipes, highlights uncertain or faded measurements in yellow for human confirmation, recalculates serving sizes with fractional math (½, ¼), and renders an archival, print-ready keepsake PDF book complete with traditional Alpana decorative borders and a custom family dedication.
🌟 Key Features
| Feature | Description |
|---|---|
| 📸 Photo & Messy Text Transcription | Upload phone photos of handwritten cookbook pages or paste rambling voice notes / Banglish text. Compressed client-side using HTML5 Canvas before uploading. |
| If |
- Repository: https://github.com/SayemR0018/dadurRanna
- License: Open Source under the MIT License
How I Built It
Architecture & Stack (Featuring Render)
-
Frontend: Vanilla HTML5, modern CSS3, and JavaScript with zero heavy build steps. Mobile-first kitchen aesthetic with cream paper textures, warm turmeric/terracotta tones, and Bengali typography via Google Fonts (
Noto Sans Bengali&Noto Serif Bengali). -
Backend: Node.js 20 + Express with
helmetCSP headers,express-rate-limit(20 req/min/IP),multer(in-memory buffer storage with strict 8MB limit), and/healthzcloud health check. -
Image Processing: Client-side
<canvas>compression ensures fast, lightweight uploads even on mobile networks. -
Hosting on Render: Deployed on Render as a web service using an Infrastructure-as-Code Blueprint (
render.yaml) that specifies Node runtime, build/start commands, environment variable sync flags, and zero-downtime healthcheck monitoring.
The Open-Weight AI Pipeline (Featuring Gemma)
-
Google AI Studio Gemma Integration: Communicates with Gemma 3 27B (
gemma-3-27b-it) via Google AI Studio'sgenerateContentAPI, passing images asinline_database64 payloads alongside a prompt engineered for Bengali culinary transcription. -
Strict Zod Validation & Repair Loop: Because open models may occasionally wrap JSON in markdown fences or omit brackets, the backend runs an automated cleaning function (
extractAndCleanJson), validates schema conformance via Zod, and executes an automatic repair-and-retry loop (up to 2 retries) if structure errors occur. -
Local Ollama Abstraction (Zero Code Change): Setting
LLM_PROVIDER=openai_compatandLLM_MODEL=gemma3:27bredirects the app to a local Ollama instance (http://localhost:11434/v1), enabling 100% offline transcription.
Why Does Open Innovation Matter?
When we think about preserving cultural heritage, we often picture ancient manuscripts in museum vaults. But the most fragile heritage lives right on our kitchen shelves—a grandmother's notebook with mustard oil stains, loose envelope corners, and informal notes like "এক চিমটি মিষ্টি" ("a pinch of sugar").
Building Dadur Ranna with open-weight Gemma demonstrates why open innovation is indispensable:
- Absolute Privacy for Intimate Memories: Handwritten notebooks frequently contain personal family names, private phone numbers in the margins, and intimate letters. With open-weight models running locally via Ollama, families never have to upload photos of their loved ones' personal handwriting to closed third-party corporate servers.
- Freedom from Walled Gardens: Family recipes belong to families, not to proprietary cloud vendors who might change pricing models, deprecate endpoints, or lock memories behind monthly subscriptions. Because Gemma is open-weight, this entire application can run on a laptop in an offline rural village with Ollama.
-
Swappable Architecture: Switching from cloud Gemma to an offline local model requires nothing more than changing an environment variable (
LLM_PROVIDER=openai_compat,LLM_MODEL=gemma3:27b). No code rewrites or proprietary SDK locks. - Zero Cost and Long-Term Longevity: Open innovation guarantees that this digital cookbook archiver will still run 10, 20, or 50 years from now. As long as a family has a computer and open software, Dadu's culinary legacy will remain forever preserved.
My Agent Session
I planned, built, tested, and verified Dadur Ranna collaboratively with Antigravity. You can explore the full interactive agent session transcript:
🔗 Interactive Session Transcript: View on DEV
Prize Categories
- Best Use of Gemma: Gemma 3 27B does the core work of reading handwritten Bangla/English recipes, flagging uncertain items, and keeping the grandmother's tips verbatim.
-
Best Use of Render: Deployed as a Render Blueprint (
render.yaml) with a health check on the free plan.

Top comments (3)
That’s incredible!
It's an absolutely amazing work.
Keep it brother!!