Ghost Memory:以 Google Gemma 驅動、以私隱為先的 AI 緬懷平台
Ghost Memory: Privacy-First AI Remembrance Altar Powered by Google Gemma
Ghost Memory 以 Google 開放權重模型 Gemma 和本機 SQLite 建立數碼緬懷平台,用戶可保存親人的回憶、故事與傳統,並透過互動式 Digital Ofrenda 緬懷祭壇呈現。平台的 AI 故事生成器可按保存的回憶創作故事、詩作和悼詞,Memory Chat 則只根據已記錄的事實回答。Gemma 透過 Ollama 在本機推理,記憶資料和照片儲存在本機。
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine
What I Built
Ghost Memory – Stories That Never Die is a digital remembrance platform built for the Halloween and Día de los Muertos season. It preserves the memories, stories, favorite meals, songs, and traditions of loved ones using Google's open-weight Gemma model, local SQLite storage, and an interactive Digital Ofrenda altar.
Key Features:
Memory Keeper: A private digital vault to record a loved one's full name, lifespan dates, relationship, favorite dishes, favorite music, personality traits, and personal anecdotes.
AI Story Generator: Uses Google Gemma to transform submitted memories into emotional short stories, traditional Día de los Muertos Calaveritas (festive remembrance poems), nostalgic verse, letters of love, and solemn eulogies.
Digital Ofrenda: An interactive 3D/2D remembrance altar featuring flickering votive candles (with real flame animations), framed photographs, marigold cempasúchil petals, sugar skulls, offering plates (pan de muerto), and an ambient bolero music player.
Memory Chat: An interactive AI assistant strictly grounded in saved memories. It answers family history questions based only on recorded facts and incorporates strict ethical guardrails (it never pretends to speak as the deceased or hallucinate unrecorded details).
Ghost Story Mode: An optional Halloween feature that generates eerie campfire tales and spooky folklore based on user prompts.
Privacy Mode: All personal memory profiles are stored in an isolated local SQLite database (data/ghost_memory.db) with local Gemma inference via Ollama and full JSON backup export/import capabilities.
Demo
Live Application URL: https://ais-pre-s5jafnnl72cafo3vjcnkgh-718654813775.asia-southeast1.run.app
Development URL: https://ais-dev-s5jafnnl72cafo3vjcnkgh-718654813775.asia-southeast1.run.app
Instructions to try the demo:
Navigate to the Memory Keeper tab and view pre-loaded memories (e.g., Abuelita Elena) or add your own loved one's memories.
Click AI Story Generator to generate a Día de los Muertos Calaverita or poem using Gemma.
Visit the Digital Ofrenda to light virtual candles, place offerings, and play ambient altar music.
Open Memory Chat to ask questions grounded strictly in saved family history.
Code
Github link : -
🕯️ Ghost Memory – Stories That Never Die
Ghost Memory is a digital remembrance platform built for Halloween and Día de los Muertos. It preserves memories, personal stories, and traditions of loved ones using Google's open-weight Gemma model, local SQLite database storage, and an interactive Digital Ofrenda remembrance altar.
🌟 Core Features
- Memory Keeper: Dedicated vault to record a loved one's full name, lifespan dates, relationship, favorite dishes, favorite music/songs, personality traits, and personal stories.
- AI Story Generator: Transforms saved memories into emotional short stories, traditional Día de los Muertos Calaveritas, nostalgic poems, tribute letters, and eulogies powered by Google Gemma.
- Digital Ofrenda: Interactive 3D/2D remembrance altar featuring flickering candles (light/extinguish candles), framed photos, marigold cempasúchil petals, sugar skulls, offering plates, and an ambient music player.
- Memory Chat: An interactive AI assistant strictly grounded in saved memories. It answers questions using only recorded facts and includes…
The complete source code is fully structured for both Node.js (Vite + Express + SQLite) and Python (FastAPI + SQLite + Ollama):
Repository / Workspace Path: https://ais-dev-s5jafnnl72cafo3vjcnkgh-718654813775.asia-southeast1.run.app
Core Tech Stack:
Frontend: React 19, Tailwind CSS v4, Lucide React, Motion
Backend (Full-Stack): Node.js / Express (server.ts) + Python FastAPI (backend/main.py)
AI Model: Google Gemma (locally via Ollama gemma2:2b, with server-side @google/genai fallback ladder)
Database: Local SQLite database (better-sqlite3 / sqlite3)
How I Built It
Ghost Memory is built around Google's open-weight Gemma model, executing locally via Ollama:
Local Model Inference (Ollama + Gemma):
The application connects to a local Ollama instance running gemma2:2b at http://127.0.0.1:11434.
All prompt engineering, system instructions (for story formatting, Calaverita rhymes, and ethical chat grounding), and parameters (temperature = 0.7, top_p = 0.9) are baked directly into the backend source code (server.ts & backend/gemma_ollama.py).
If Ollama is offline or unavailable, the backend seamlessly routes queries through a server-side @google/genai fallback engine (gemini-3.8-flash / gemini-3.1-flash-lite).
Privacy-First Memory Storage:
Memories, photos, and generated literature are stored in a local SQLite database (data/ghost_memory.db).
Image uploads are stored locally in the /uploads directory.
Frontend & UX Design:
Designed with a midnight dark palette accented with marigold orange (#f59e0b), royal purple, and flickering candlelight glow.
Built with interactive canvas layers, custom CSS animations for floating cempasúchil petals, candle flicker physics, and custom typography (Cinzel, Playfair Display, Plus Jakarta Sans).
Why Does Open Innovation Matter?
Family memories, personal stories, childhood recipes, and photographs of deceased loved ones are among the most intimate data a human being possesses.
Closed, proprietary API ecosystems force users to transmit their most sacred family histories to external cloud servers, where data may be retained, logged, or used to train commercial models.
Open innovation and open-weight models like Google Gemma change this paradigm entirely:
Complete Privacy & Sovereignty: Running Gemma locally with Ollama ensures that family stories never leave the user's home or device.
Offline Longevity: A digital memory vault built on open-weight models and local SQLite databases will continue functioning decades into the future, independent of API pricing changes, corporate shutdowns, or network availability.
Ethical Integrity: Open-weight models allow developers to inspect and tune system prompts, guaranteeing that AI tributes remain respectful, grounded, and free from deceptive spirit-simulation behaviors.
My Agent Session
Agent Workspace ID: ebcdc2b2-fed5-40de-8148-95e2a47979f4
Developed end-to-end in Google AI Studio using automated component scaffolding, SQLite schema migrations, @google/genai integration, and custom Tailwind styling.
The Spirit of It
During Día de los Muertos, tradition says that as long as someone is remembered, they are never truly gone.
While building Ghost Memory, we pre-seeded a memory profile for Abuelita Elena, a grandmother who taught her family how to bake Pan de Muerto on crisp November evenings while singing Juan Gabriel's Amor Eterno.
When Gemma generated its first Día de los Muertos Calaverita—combining the orange blossom aroma of fresh bread, marigold trails guiding spirits home, and the warm embroidery of her shawl—it felt like more than just code. It proved that AI, when built with cultural respect and privacy, can be a digital candle that keeps family stories flickering bright for generations to come. 🕯️
Prize Categories
Google Gemma / Open Model Challenge (Primary)
Best Privacy-First / Local AI Application
Best Cultural / Seasonal Application (Halloween & Día de los Muertos)
Team Submissions:
This project was built as a team submission for the Google Gemma & Open Model Challenge.
👥 Team Members:
- Primary Publisher & Lead Developer: @krithikgokuls (krithikgokuls@gmail.com) — Full-Stack Architecture, Gemma AI Prompt Engineering & Local Ollama Integration
Thanks for participating!
來源:DEV Community · dev.to