Memory Lane AI β€” Privacy-First Family Memory Storyteller πŸ“–βœ¨ A developer built Memory Lane AI, a local-first web application that captures, transcribes, and organizes family oral histories and photographs into downloadable archival storybooks without sending personal data to cloud services. The app pairs a React 19/TypeScript frontend with IndexedDB storage and a Python FastAPI microservice that runs Whisper transcription and local LLMs via Ollama, falling back to a client-side grounded engine when local models are unavailable. Every family possesses an irreplaceable archive of oral lore: the story of how grandparents migrated during tough times, the secret spices behind a holiday stew, or childhood summers spent climbing mango trees. Yet, most of these memories remain trapped in fragile photo boxes, disjointed voice memos on old phones, or fading recollections. Commercial "AI biography" apps have attempted to address this, but they introduce a severe compromise: they require you to upload your family’s most intimate photographs, private recordings, and personal names to closed, cloud-hosted LLM services. For families protective of their privacyβ€”or those preserving memories for elderly relativesβ€”giving proprietary third-party servers perpetual access to family data is an absolute dealbreaker. Memory Lane AI solves this problem by combining 100% local-first data sovereignty with open-source, on-device AI. What I Built Memory Lane AI is a local-first web application that helps families capture, organize, transcribe, and craft oral histories and heirloom photographs into timeless storybooks and archival, downloadable PDFsβ€”with zero personal data leaving the user’s computer. β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Memory Lane AI Architecture β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ React 19 + TypeScript + Vite 8 Frontend β”‚ β”‚ β”œβ”€ 15 Archival Screens Vault, Timelines, Audio Recorder, Wizard β”‚ β”‚ β”œβ”€ IndexedDB Dexie.js ──► 100% On-Device Photos, Audio & Records β”‚ β”‚ └─ jsPDF & html2canvas ──► High-Resolution Archival Storybook PDFs β”‚ β”‚ β”‚ β”‚ β”‚ Local HTTP / CORS β”‚ β”‚ β–Ό β”‚ β”‚ Python 3.14 FastAPI Microservice localhost:8000 β”‚ β”‚ β”œβ”€ Modular Whisper Adapter ──► faster-whisper / openai-whisper CPU β”‚ β”‚ └─ Modular Ollama Adapter ──► Local LLMs Llama 3, Mistral, Qwen β”‚ β”‚ β”‚ β”‚ β”‚ Automatic Fallback ───┴───► Client-Side Grounded Engine β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ The 15-Screen Archival Suite Welcome & Onboarding: Privacy manifest, local storage breakdown, and one-click demo archive loader. Dashboard: Archival metrics, memory carousel, family members shelf, and active storybooks. Memories Library: Filter by media type photo, audio, text, mixed , people, tags, and date range. Memory Details: Lightbox viewer, audio player with animated waveform, dual transcript viewer, and cited stories. Add / Edit Memory: Multi-photo upload with instant previews, audio attachments, and date precision selectors Exact, Month, Year, Approximate, Unknown . People Directory: Family roster with relationship tags, birth/death years, and memory counters. Person Profile & Timeline: Chronological, interactive life timeline for any family member. Places & Events: Geographical clustering and milestones across family journeys. Audio Recording & Transcription: In-browser microphone recorder with live VU level meter, timer, and transcription runner. AI Story Creator Wizard: Multi-step wizard selecting source memories, tone Warm & nostalgic, Simple & conversational, Documentary & factual, Child-friendly, Memoir style , and prompt constraints. Story Editor: Section-by-section narrative editor with source memory citations and uncertainty tags. Storybooks & Chapters: Book manager, chapter reordering, cover photo selection, and thematic styling. Storybook Preview & Export: Paginated book preview with high-resolution PDF exporter. Global Search: Instant multi-field search across titles, captions, transcripts, and tags. Settings & Sovereignty: Live navigator.storage quota meter, AI backend connectivity status, full JSON backup export, and safe restore. Who Would Pay For It? The Side Hustle Opportunity Memory Lane AI was built with a viable, multi-tiered monetization strategy tailored for personal historians and privacy-conscious families: Boutique Family Biography & Oral History Agency: Target: High-net-worth families, adult children recording aging parents, and estate planners. Offering: Professional memory capture sessions. Armed with Memory Lane AI running entirely on a local laptop, an oral historian visits elderly family members, records high-fidelity audio, imports family albums, generates grounded chapters with local open-weight models, and delivers heirloom hardcover books printed from the exported PDFs. Price Point: $500 – $2,500 per completed family storybook. Turnkey Archival Software for Senior Living & Memory Care Facilities: Target: Assisted living centers, memory care communities, and hospice providers. Offering: An on-premise, HIPAA-compliant memory vault. Because zero personal data, medical details, or elder voices leave the building, care facilities can safely capture residents' life stories for therapeutic reminiscence therapy and family keepsakes. Price Point: $99 – $199/month per facility license. Print-on-Demand Keepsake Integration: Offering: Direct export pipeline from the application's structured PDF engine to custom photo-book printers e.g., Blurb, Gelato with built-in affiliate or print markups. Code The complete source code for Memory Lane AI is available under an open-source license: πŸ‘‰ GitHub Repository: https://github.com/scha54/Hactoberfest-Hackathon-Week-2 https://github.com/scha54/Hactoberfest-Hackathon-Week-2 python class OllamaStoryAdapter AIStoryAdapter : """ Integrates with local Ollama LLMs Llama 3, Mistral, Qwen, etc. . Uses a strictly grounded prompt to prevent hallucinations and formats output as JSON. Gracefully falls back to MockStoryAdapter if Ollama is unreachable. """ async def generate story self, request: StoryGenerationRequest - StoryGenerationResponse: system prompt = "You are a family memory archivist and biographer. Your task is to write a warm, beautifully structured " "family storybook chapter strictly grounded in the memories, transcripts, captions, and names provided.\n\n" "CRITICAL CONSTRAINTS:\n" "1. ONLY use details, places, names, and events explicitly provided in the user prompt.\n" "2. DO NOT hallucinate dates, relatives, fictional drama, or unseen events.\n" "3. If any detail is uncertain, approximate, or missing, add a note in the 'uncertainties' list.\n" "4. Respond strictly with a valid JSON object matching the schema." payload = { "model": self.model, "messages": {"role": "system", "content": system prompt}, {"role": "user", "content": json.dumps user content, ensure ascii=False } , "stream": False, "format": "json" } async with httpx.AsyncClient timeout=45.0 as client: res = await client.post f"{self.base url}/api/chat", json=payload Parses sections, source citations, and uncertainty flags... typescript // frontend/src/db/index.ts import Dexie, { type Table } from 'dexie'; import type { Memory, Person, Story, Storybook, AppSettings } from '../types'; export class MemoryLaneDB extends Dexie { memories : Table; people : Table; stories : Table; storybooks : Table; settings : Table; constructor { super 'MemoryLaneAI DB' ; this.version 1 .stores { memories: 'id, title, datePrecision, place, createdAt, updatedAt, tags, peopleIds', people: 'id, fullName, relationship, birthYear, deathYear, createdAt, tags', stories: 'id, title, tone, status, createdAt, updatedAt, sourceMemoryIds', storybooks: 'id, title, createdAt, updatedAt', settings: 'id' } ; } } How I Built It Memory Lane AI was engineered from the ground up using open-source AI models, open-source frameworks, and local-first browser storage: Component Technology Role Local LLM Engine Ollama http://localhost:11434 http://localhost:11434 Open-weight models Llama 3, Mistral, Qwen 2.5, Phi-3 executing on-device inference via structured JSON mode. Speech Recognition faster-whisper / Whisper Quantized int8 automatic speech recognition running locally on CPU/GPU for transcribed oral recordings. Backend API FastAPI + Pydantic + Uvicorn Python 3.14 asynchronous microservice exposing lightweight endpoints /api/health, /api/capabilities, /api/stories/generate, /api/transcribe . Frontend Framework React 19 + TypeScript Strict Component tree with 15 dedicated views, client-side routing, and responsive tactile layout. Styling & Design Tokens Vanilla CSS + Archival Tokens Warm ivory backgrounds FAF7F2 , charcoal espresso typography 2C2523 , terracotta accents C86D51 , and serif headings. Persistence Engine Dexie.js IndexedDB Multi-gigabyte browser-local storage holding binary blobs, audio tracks, and relational metadata. PDF Generation jsPDF + html2canvas Automated typesetting engine producing multi-page, print-ready PDF storybooks with custom borders, dedications, and source citations. Two-Tier Graceful Degradation Architecture A core engineering requirement was that the app must never fail or lock the user out if the AI backend is unreachable. Tier 1 Full Local AI : If Ollama and FastAPI are running on localhost:8000, full speech-to-text with Whisper and grounded LLM generation are enabled. Tier 2 Client-Side Fallback : If running completely offline or without Python, the frontend automatically switches to a deterministic client-side story compiler generateClientGroundedStory and an oral history transcription simulator. Users can still record voice memos, create memories, manage people, assemble chapters, and export PDFs without any backend running. Why Does Open Innovation Matter? Open innovation is essential for projects involving personal human stories and family heritage: Family Intimacy and Data Sovereignty: Closed AI services OpenAI, Anthropic, Google Cloud operate on multi-tenant infrastructure where inputs may be logged, reviewed by human moderators, or used for model training. Handing over high-resolution pictures of one's children, voice recordings of an ailing grandparent, or personal family triumphs to a closed commercial cloud compromises privacy. Open-weight models running on Ollama restore complete sovereign ownership: no packets cross the wire. Permanence and Digital Longevity: Family archives must survive for decades. Closed APIs frequently deprecate endpoints, change pricing tiers, alter moderation policies, or terminate operations entirely. Open-source models and open standards such as IndexedDB and client-generated PDFs guarantee that an archive created today remains accessible decades from now, independent of any corporate roadmap. Predictable Unit Economics: For a family historian or side-hustle biographic agency, per-token API fees can fluctuate wildly when transcribing hours of raw audio and synthesizing multi-chapter books. With open-weight models Llama 3, Whisper , inference costs are flat: zero API bills, regardless of how many stories are preserved. Retrospective: What Went Well, What Did Not, and Lessons Learned What Went Well Strictly Grounded Prompting: Constraining Ollama to a validated JSON schema with explicit sourceMemoryIds and an uncertainties array completely eliminated fabricated dates and fictitious relatives. Robust Local Storage via Dexie.js: Storing large binary photo Blobs and WebM audio files directly in IndexedDB provided snappy, offline-first performance without needing any external database servers. Automated Verification: The Python backend achieved 100% test coverage across all endpoints pytest passing 4/4 , and the React frontend passed strict oxlint checks with 0 warnings and 0 errors, accompanied by a clean TypeScript build. What Did Not Go Well Audio Codec Cross-Browser Fragmentation: The native browser MediaRecorder API defaults to audio/webm;codecs=opus on Chromium browsers, but Whisper expects raw audio or WAV streams. We had to ensure temporary file conversion and fallback handling in the Python adapter. Large Production Bundle Size: Vite's production build reported a warning on the main chunk dist/assets/index-BggqEAK5.js at ~1.29 MB . This was caused by statically bundling heavy client-side libraries jspdf and html2canvas into the main entry point rather than lazily loading them via dynamic import . Open-Weight Model Variance: While Llama 3 and Qwen 2.5 adhered closely to the JSON formatting instructions, smaller parameter models e.g., 1B–3B models occasionally enclosed their outputs in markdown fences json ... or omitted required uncertainty arrays. We implemented custom JSON extraction logic to handle these edge cases cleanly. Lessons Learned AI as an Enhancement, Not a Prerequisite: Structuring the software so that every core feature data entry, timeline organization, chapter editing, PDF compilation works 100% offline without AI creates a rock-solid, resilient application. Transparent Storage Drives User Confidence: Providing a real-time storage quota meter and full one-click JSON backup/restore in the UI fundamentally transformed user trust. When users can see that their photos and audio are stored strictly on their physical machine, their willingness to record genuine, intimate memories increases dramatically.