The problem

There's a particular kind of grief that doesn't get talked about enough. It's not the grief of losing someone — it's the grief of watching someone forget you while they're still here. Dementia affects over 55 million people worldwide. But the weight of it falls heaviest on the families orbiting the patient — the daughter who lives three states away, the son who calls every Sunday, the grandkids whose faces are starting to blur. They're present enough to feel the loss, but not present enough to do much about it. The moments that would bring the most comfort — a familiar voice, a photo from a fishing trip in 1987, a story that always made her laugh — are scattered across phones and albums and memories that never make it to the bedside. We wanted to build something that could close that gap. Not by replacing human presence, but by making it persistent.

What we built

Memory Lane is a two-sided app: a family dashboard where caregivers curate memories, and a patient tablet that behaves like a living photo frame with a voice. Families upload photos, write (or AI-draft) a short story behind each one, and optionally record their own voice to narrate it. On the patient side, the tablet cycles through those photos as a slideshow. When a family member queues a memory from anywhere, it plays back on the tablet as a full narrated story — in that person's actual cloned voice. The patient can also ask questions out loud. "Where is Sarah?" "What did we do last Christmas?" The app answers using RAG over the family's saved memories and personal context. If it can't find a confident answer, instead of hallucinating, it surfaces the question to the family as a notification — so they can respond directly, in their own words and voice.

How it works

Memories and RAG. Every memory is embedded using Gemini text-embedding-004 and stored in Supabase Postgres with a pgvector HNSW cosine index. When a patient asks a question, we embed the query and run a semantic search against the memory store. If the top match clears a confidence threshold, we answer. If not, we create a family_questions notification rather than guess. Answered family responses are fed back into the retrieval context for future queries — the system gets more useful over time. Voice cloning with ElevenLabs. This is the feature we're most proud of. Family members record a short voice sample through the browser. We clone that voice via ElevenLabs IVC and store the voice ID against their profile. When a memory narration is triggered, /api/speak routes to that cloned voice — so the patient hears their daughter, not a generic TTS engine. The emotional weight of that difference is the whole point. Gemini drafting and vision. Families often don't know how to write a memory narration. We give them a starting point: upload a photo, and Gemini Vision generates a description and draft narration. They edit it, approve it, and it becomes a memory. The same vision pipeline runs optionally on the patient's camera — periodically classifying visible emotional tone (calm, happy, confused, sad, distressed) and surfacing it on the family dashboard as a passive wellbeing signal. Google Photos Picker. Rather than asking families to re-upload photos they already have, we connect to Google Photos through the Picker API. Families select photos inside Google's native picker UI, and we import them directly — described by Gemini Vision, embedded, and inserted as memories in one flow. Patient tablet. The patient page is a full-screen smart photo frame. It polls for queued memories every two seconds, plays them on arrival, and clears the queue after playback. The optional wake-word loop listens for "hey memory," captures a question, runs the full RAG pipeline, and keeps a follow-up window open until the patient says "okay goodbye."

Architecture

Next.js 16 App Router · React 19 · TypeScript Supabase Auth + Postgres · pgvector HNSW index Gemini REST API (chat, vision, text-embedding-004) ElevenLabs IVC + TTS · Minimax voice clone fallback Google Photos Picker API · Google OAuth Fly.io (Dockerized Next.js standalone) Two user roles — patient and family — are set at registration. Family accounts link to a patient by email. All session management runs through HTTP-only Supabase cookies with refresh-token recovery. The family dashboard and patient tablet are protected routes with no overlap in what each role can access.

Challenges

One of the more interesting engineering decisions was what to do when the RAG system doesn't know the answer. Most systems hallucinate. We chose a different path: if vector similarity falls below VECTOR_MATCH_THRESHOLD and no prior family answer covers the question, we write to family_questions and surface it on the dashboard. The family responds — by text or recorded audio — and that response becomes future retrieval context. It's a closed loop: the system learns from the family's answers without any explicit training step.

Why ElevenLabs

Voice is the most emotionally resonant part of this entire project. Hearing your daughter's voice tell you a story about a camping trip from 1987 is a fundamentally different experience from a generic TTS voice doing the same thing. ElevenLabs made that possible with a small voice sample and high enough quality that it actually matters for the use case. That's not a technical nice-to-have — it's the feature that makes the difference between an app that feels useful and one that feels like a presence.

What's next

The immediate roadmap is clear: push notifications to family when a patient question goes unanswered, auto-converting family audio responses into formal memories, offline tablet mode, and multi-patient support for families caring for more than one person. Further down the road, we want to integrate GPS geofencing into Memory Lane. One of the quiet cruelties of dementia care is how much it shrinks a patient's world — caregivers understandably want their loved ones close, but that constant monitoring creates its own kind of loss of freedom and dignity. Geofencing would let families define a safe zone and get a simple alert only if the patient wanders outside it. But more than that, the moment a patient steps outside their boundary, Memory Lane would actively help orient them — reminding them through voice where they are, what they were doing, and how to get back. Not a buzzing alarm, not a panicked phone call from a family member — just a calm, familiar voice gently grounding them in the present. No constant check-ins, no hovering. A quiet safety net that gives patients the freedom to exist in their own space, and gives caregivers the peace of mind to let them.

Theme connection

"Hacks the Future" — the future of elder care shouldn't look like institutional monitoring dashboards. It should look like technology that preserves and delivers human connection at scale. Memory Lane is a small, deliberate step in that direction.

Built With

Share this project:

Updates