DEV Community

Archangel
Archangel

Posted on Edited on

🕯️ The Last Remembering: A Living Altar for Family Stories & Authentic Memories

Hacktoberfest Open-Source AI Challenge: Ghost in the Machine Submission 👻🌼

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine

What I Built

Families lose oral histories, favorite recipes, and cherished memories across generations:

  • Vanishing Stories: Unwritten recipes, family songs, and favorite sayings slip away once an elder passes.
  • The Cloud Privacy Barrier: Uploading intimate voice recordings and family photos to commercial clouds exposes private family history to corporate AI training and data brokers.
  • The "Digital Séance" Trap: Commercial chatbots try to impersonate deceased relatives—generating creepy synthetic avatars that hallucinate things a loved one never said.
  • Ephemeral Platforms: Proprietary memorial apps shut down, deprecate APIs, or lock family memories behind monthly paywalls.

The Solution: The Last Remembering 🕯️

Inspired by Día de los Muertos, The Last Remembering is an open-source, private, 100% offline virtual ofrenda and oral history keeper built on open-weight AI.

  • Virtual Ofrenda & Living Glow Engine: A 3-tiered altar where each loved one has a framed portrait, Pan de Muerto offerings, and a Veladora candle. The candle burns brighter (from Nearly dark to Burning bright) as you add memories, and dims over time to gently prompt you to revisit their stories.
  • Local Whisper Voice Capture: Record stories straight from the browser microphone. Spoken audio is transcribed locally on your CPU—zero audio bytes leave your computer.
  • Verifiable Fact Extraction: Powered by Google's open-weight Gemma, the system extracts mentioned foods, songs, sayings, and places, backing each detail with an exact verbatim quote from the story so it never hallucinates.
  • Hard Human-in-the-Loop Gate: Transcripts and suggested facts are never saved automatically. You review quotes and check off what you want preserved.
  • Grounded Retrieval (Never Impersonation): Ask questions like "What did Abuelo sing in the truck?" Answers are built strictly from saved stories, cite exact source memories with clickable links, and speak in the third person. If nothing exists, it plainly answers: "I don't have a memory of that yet."
  • Durable .ofrenda Portable Archive: The entire database and photos export into a portable .ofrenda file that lives on a USB drive with no cloud dependencies.

Demo

Workflow

  1. Select an ancestor (e.g., Abuela Lupita) or add a new person to the altar.
  2. Record a story via browser mic or type it in.
  3. Review Whisper's local transcript and click Extract Facts.
  4. Check off verified facts backed by verbatim quotes.
  5. Click Save Memory—watch their Veladora candle brighten on the 3-tier altar.
  6. Ask a question in the Ask tab and get an answer with clickable source citations.

Code

Check out the complete repository on GitHub:

🔗 GitHub Repository: Uxie7/the-last-remembering


How I Built It

The Last Remembering is built around an open-weight, local-first architecture running entirely on consumer hardware with zero cloud AI dependencies.

flowchart TB
    subgraph LocalMachine ["User Laptop (100% Local Inference)"]
        UI["Frontend: Next.js / Tailwind CSS / Ofrenda Altar"]
        API["FastAPI Backend (src/api.py)"]

        subgraph LocalOllama ["Local Ollama Runtime (localhost:11434)"]
            GEMMA["Google Gemma (Open-Weight LLM)"]
            NOMIC["nomic-embed-text (Open-Weight 768d Embeddings)"]
        end

        subgraph Pipeline ["Memory Pipeline"]
            WHISPER["faster-whisper (Local CPU STT)"]
            EXTRACT["Gemma Fact Extractor & Verbatim Quote Matcher"]
            GLOW["Glow Decay Engine (Pure Domain)"]
            RETR["Grounded Retrieval & Refusal Rules"]
        end

        DB[("Local SQLite + sqlite-vec")]
        STORAGE[("data/audio, data/photos")]
    end

    UI <--> API
    API <--> LocalOllama
    API --> Pipeline
    Pipeline --> DB
    Pipeline --> STORAGE

The Open Model Stack

  • Language Model (Google Gemma via Ollama): Runs locally on CPU/GPU. Handles strict JSON fact extraction with verbatim quote matching and grounded question answering with citations.
  • Speech-to-Text (faster-whisper): Transcribes spoken family recordings locally on CPU with int8 quantization.
  • Embedding Model (nomic-embed-text via Ollama): 768-dimension local embeddings for semantic vector search across family stories.
  • Database & Vector Search (SQLite + sqlite-vec): Plain local database storing profiles, stories, facts, and embeddings in one file.
  • Frontend: Next.js (App Router), Tailwind CSS, Veladora flame animations, and bilingual (English / Español) toggle.
  • Test Suite: 44 automated tests validating glow decay math, quote verification, CORS isolation, and end-to-end memory lifecycles.

Why Does Open Innovation Matter?

Open innovation is what made The Last Remembering possible:

  • True Family Privacy: Personal voices, photos, and family heirlooms never leave your laptop. Open-weight models running on localhost eliminate cloud data leakage by design.
  • Zero Running Costs: Preserving family history costs exactly $0. Running Gemma and Whisper locally requires no API keys or token subscriptions.
  • Works with the Internet Off: Once models are downloaded, the app runs completely offline. You can record memories at a family gathering with no Wi-Fi.
  • Permanence Over Corporate Lifecycles: Commercial memorial apps shut down or change pricing. Plain SQLite files and open-weight models ensure your family archive opens decades from now.
  • Respectful Grounding: Open-weight models allow strict architectural constraints: verbatim quote checks, source citations, and clear refusal rules ("I don't have a memory of that yet").


My Agent Session

This project was architected, implemented, and verified using paired AI agent workflows tracked with DevRelay:

The Last Remembering: Building an Offline Virtual Ofrenda with Gemma & Whisper
You

Build The Last Remembering: an offline virtual ofrenda and oral history keeper using local open-weight AI (Gemma 3, Whisper, and nomic-embed-text). Let's implement the 3-phase plan from INTEGRATION_SPEC.md.

Agent

Implementing Phase 1: Backend Foundation & Persistence. Created FastAPI backend (src/api.py), SQLite store (src/adapters/store_sqlite.py), pure domain glow engine (src/domain/glow.py), local file storage (src/adapters/files_local.py), Pydantic schemas, and seed script. Added comprehensive unit and contract tests (test_glow.py, test_store.py, test_api_p1.py). All 23 tests passing.

You

Proceeding to Phase 2: Open-Weight AI Pipelines. Wire in Whisper, Gemma, and nomic-embed-text for 100% offline local AI.

Agent

Implementing Phase 2: Implemented bilingual strict JSON prompts (src/domain/prompts.py), retrieval and C5 verbatim quote validation (src/domain/retrieval.py), Ollama LLM adapter (src/adapters/llm_ollama.py), nomic embeddings adapter (src/adapters/embed_ollama.py), faster-whisper STT adapter (src/adapters/stt_faster_whisper.py), and MemoryPipeline (src/pipeline.py). Connected Next.js UI to live AI endpoints with graceful offline fallback. Added test_quote_check.py, test_retrieval.py, and test_pipeline.py.

You

Proceeding to Phase 3: Final integration, offline hardening, and deployment.

Agent

Implementing Phase 3: Added end-to-end memory lifecycle test (test_e2e.py), security and CORS tests (test_security.py), offline narration audio stream (/narrate), and portable .ofrenda archive export/import scripts (export_archive.py, import_archive.py). Configured render.yaml for automated Render Blueprint deployment. All 44 automated tests passing.


Prize Categories

  • Hacktoberfest Week 4 Theme: Ghost in the Machine: Built directly for the theme—a local oral history tool and virtual ofrenda that keeps family memories alive without synthetic impersonation.
  • Best Use of Gemma: Google's open-weight Gemma runs locally for zero-hallucination verbatim quote extraction and grounded Q&A with citations.
  • Best Use of Render: Deployment-ready Blueprint (render.yaml) orchestrating both the FastAPI backend and Next.js frontend with automated health checks.
  • Best Use of DevRelay: Full agent pair-programming lifecycle, architectural planning, and 44-test verification recorded with DevRelay.

Top comments (0)