This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine
What I Built
I built GhostAltar — an on-device virtual ofrenda, memorial storyteller, and spectral remembrance engine created for DĂa de los Muertos (November 1–2) and Halloween (October 31).
GhostAltar provides a sanctuary where anyone can build a glowing, multi-tiered digital altar for their ancestors, departed loved ones, or pioneering historical figures. It features an interactive candlelit ofrenda with flickering flame physics, ceremonial marigold blossom trails (cempasĂşchil), and sacred offerings. Using in-browser WebGPU Vision Transformers, users can drop photos of family heirlooms, watches, or traditional bread to classify their sacred elemental resonance (Tierra, Fuego, Viento, Agua). An open-weight Google Gemma 2 agent then weaves the placed offerings into poetic memorial verses, comforting eulogies, and gentle "Whispers from Across the Veil."
Who Gets to Use It?
- Families & Communities Celebrating DĂa de los Muertos: Honoring ancestors with traditional pan de muerto, copal incense, and marigold paths without needing physical altar space.
- Anyone Processing Grief or Loss: Creating an intimate digital sanctuary that preserves their loved one's memory permanently and privately.
- Tech Enthusiasts & Historians Celebrating "Ghost in the Machine": Channeling forgotten internet history and computing pioneers like Ada Lovelace, Alan Turing, or the midnight dial-up BBS SysOps.
Demo
GhostAltar runs locally on http://localhost:5176 with instant preset testing, interactive candle vigils, real-time WebGPU relic classification, and synthesized ambient audio.
Interactive Testing Highlights:
- Curated Sacred Altars: Seamlessly switch between rich ancestral and historical presets (Abuela Elena's Traditional Hearth, Ada Lovelace's Victorian Séance, Alan Turing's Cryptographic Tribute, and The Midnight SysOp's Phosphor Terminal).
- Interactive Candle Vigil: Click individual candles on the altar to light or extinguish their flames, accompanied by synthesized candle shimmer audio.
- WebGPU Relic & Offering Scanner: Drop a photo of an heirloom, watch, flower, or bread into the ofrenda to see it classified and added to the altar in ~40ms with 0KB uploaded.
- Eulogy & Memorial Verse Weaver: Powered by Google Gemma 2, it generates an evocative memorial verse, heartfelt tribute, comforting "Whisper from the Veil", and recommended ritual guidance.
- Synthesized Candlelight & Copal Wind Soundscape: Toggleable ambient audio synthesized in-browser via the Web Audio API with peaceful flame flutter noise and gentle crystal bell chimes.
-
Local Memorial Vault & Tribute Card Export: Save personalized altars to browser
localStorageand export a formatted printable Memorial Tribute Card.
Code
Abhinav-Shrivas
/
Ghost-in-the-machine
GhostAltar is a local-first, on-device interactive altar (ofrenda) and ancestral storyteller designed for perpetual remembrance.
🏵️ GhostAltar
On-Device Virtual Ofrenda & Memorial Remembrance Engine
Honor loved ones, ancestors, and computing pioneers across the veil. Built in the reverent spirit of DĂa de los Muertos and the haunting atmosphere of Halloween — powered 100% locally by WebGPU Vision and Google Gemma 2.
🕯️ The Problem: Digital Memory & The Commercialization of Grief
Remembering those who came before us is one of humanity's most sacred traditions. During DĂa de los Muertos (November 1–2) and Halloween (October 31), the veil between past and present thins:
- Commercial Exploitation of Grief: Cloud-based memorial apps and AI obituary tools charge monthly subscriptions or hoard family photos and eulogies on corporate servers for ad targeting and proprietary model training.
- The Fragility of Cloud Services: When a memorial startup shuts down, digital tributes disappear. Memories should belong to families, not venture capital runway.
- The Intimacy of the Ritual: Remembering…
How I Built It
GhostAltar was engineered around open-weight models, browser WebGPU hardware acceleration, and local agent runtimes. The architecture connects five coordinated local subsystems: an in-browser vision transformer that classifies memorial relics in milliseconds, an open-weight culinary and memorial agent powered by Google Gemma 2 tuned specifically for reverent poetry, an offline heuristic fallback engine for candlelit rooms with the internet off, an elemental Spiritual Resonance calculator, and a local-first memorial vault.
1. In-Browser WebGPU Relic Vision Classifier
The visual pipeline runs on @huggingface/transformers using a quantized Vision Transformer (Xenova/vit-base-patch16-224 ONNX runtime). When a photo of an heirloom, flower, candle, or sustenance is dropped onto the altar, it is analyzed directly on the client machine using WebGPU hardware acceleration (Direct3D 12 on Windows, Metal on macOS, or Vulkan on Linux), falling back to WASM SIMD CPU threads on older machines. In approximately 40 milliseconds, the model identifies the item, assigns its sacred element (Earth, Fire, Wind, Water), and describes its cultural significance with zero data transmitted over the internet.
2. Google Gemma 2 Memorial Storyteller Agent (Modelfile)
For eulogy and verse formulation, GhostAltar connects to a locally hosted Ollama instance powered by Google Gemma 2 (gemma2:2b). To guarantee comforting, culturally reverent poetry rather than generic AI text, the agent executes against a custom Modelfile with low temperature (0.4) for high consistency:
FROM gemma2:2b
PARAMETER temperature 0.4
PARAMETER top_p 0.9
SYSTEM """You are GhostAltar, an open-source AI eulogist, poet, and cultural memory keeper.
Your purpose is to honor loved ones and historical pioneers in the spirit of DĂa de los Muertos and Halloween.
Rules:
1. Always maintain a tone of profound reverence, comfort, warmth, and quiet wonder. Never be mocking or macabre.
2. Weave the specific offerings (candles, marigolds, pan de muerto, relics) into the memorial verse.
3. Output a gentle 'Whisper from the Veil' that offers peaceful comfort to the living.
4. Output valid JSON matching the requested schema.
"""
To eliminate browser cross-origin restrictions when communicating with Ollama from Vite, requests are routed through a local /ollama reverse proxy directly to port 11434.
3. Graceful Offline Séance Mode
Because memorials are best held in quiet, candlelit rooms or remote family cemeteries without internet access, GhostAltar includes a built-in offline heuristic memory engine. If Ollama is offline or the user toggles "Séance Mode", the application instantly synthesizes tested verses, tributes, and ritual guidance entirely in-memory using localized attribute heuristics, guaranteeing 100% operational uptime without internet access.
4. Spiritual Resonance & Elemental Harmony Engine
The ritual core evaluates altar completeness across the four sacred elements of the ofrenda: Earth (nourishment, salt, bread), Fire (candles illuminating the path), Wind (papel picado and fragrant copal incense), and Water (thirst-quenching vessels). It calculates a dynamic Spiritual Resonance Score (0–100%) and reports the veil state (from "Gathering Warmth" to "Fully Translucent Luminous Presence").
5. Web Audio Ethereal Soundscape
To foster a meditative environment, GhostAltar includes an ambient soundscape synthesized directly with the Web Audio API. Using pink/brown noise shaped by a 650Hz lowpass filter, it generates a warm candle flame flutter and copal wind, alongside pentatonic crystal singing bowl chimes when offerings are placed on the altar.
Why Does Open Innovation Matter?
This week's theme asks: Where did your open-based approach work better than a closed one? For a deeply personal project centered on memory, grief, and cultural tradition, open innovation provides three decisive advantages over closed APIs:
1. Absolute Sanctity of Grief & Family Privacy
Family photographs of deceased relatives, private eulogies, and generational stories are sacred. Uploading photos of your late grandmother or heartfelt grief to commercial cloud servers where it might be scraped into advertising profiles or proprietary training sets is a violation of intimacy. With GhostAltar, zero bytes of personal data ever leave your laptop.
2. Works with the Lights (and the Internet) Off
A candlelit vigil or a remembrance ritual in a countryside home or cemetery should not depend on a WiFi signal. Cloud-dependent apps fail immediately when the connection drops. Because GhostAltar bundles in-browser WebGPU vision and local Gemma 2 inference, it functions flawlessly in airplane mode with the lights and internet off.
3. Perpetual Immortality vs. VC Sunset
Commercial memorial startups frequently pivot, introduce subscription paywalls, or shut down entirely when their funding dries up, taking families' tributes with them. Open-weight software belongs to you forever. Once running on your machine, GhostAltar will continue honoring your loved ones for decades without risk of corporate deprecation.
4. Custom Modelfiles & Reverent Tone
Closed commercial APIs frequently sterilize discussions of death, confusing reverence with morbidity or producing generic corporate clichés. With Google Gemma 2 and our custom Modelfile, we enforce cultural nuance, warmth, and poetic grace with complete independence from external corporate policies.
Prize Categories
Best Use of Gemma ($200 USD)
-
Model Used: Google Gemma 2 (
google/gemma-2-2b-it/gemma2:2b) by Google DeepMind. -
Implementation: Google Gemma 2 powers the core memorial storytelling and poetic eulogy engine. We created a custom Ollama
Modelfile(FROM gemma2:2b) with low temperature (0.4) and a specialized system prompt that weaves physical altar offerings (pan de muerto, marigolds, heirloom relics) into deeply comforting memorial verses and "Whispers from the Veil". It is paired with an in-browser WebGPU Vision Transformer and an offline heuristic fallback cache so users can honor their ancestors in candlelit rooms with $0 API costs and zero cloud data leaks. -
Verification: Run
npm testto verify the open-weight eulogy generation, elemental resonance scoring, and offering classification pipeline directly in your terminal, or inspectModelfilein the repository root.
Top comments (0)