This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine
What I Built
La Ofrenda Digital is a zero-dependency, local-first virtual memorial altar (ofrenda) built for Día de los Muertos (Day of the Dead), powered by open-weight AI running directly on your machine through Ollama.
The Inspiration & Theme Interpretation
When I read this week’s theme, "Ghost in the Machine", I thought about what a "ghost" means across different cultures. In Mexican tradition, spirits are not haunting monsters to be feared—they are our grandparents, parents, siblings, and friends who return each autumn on November 1st and 2nd to visit the living.
To welcome them, families construct an ofrenda (altar) adorned with glowing orange cempasúchil (marigolds), flickering candles (velas), copal incense, sugar skulls (calaveritas), photographs, and their favorite foods and drinks.
Most people today live far away from family or don't have the physical space to build a traditional multi-tiered altar. But commercial cloud AI services require you to paste your most vulnerable grief and personal family photos into corporate APIs that store, log, and train on your memories.
La Ofrenda Digital brings the sacred into the machine—privately, locally, and respectfully:
- 🌼 Local Open-Weight AI Memory Core: Connects directly to local models hosted on Ollama (
http://localhost:11434), auto-detecting models (Llama 3, Mistral, Gemma 2, Phi-3, Qwen) to compose heartfelt, poetic remembrances. - 🕯️ Interactive Candle Ceremony: Light virtual candles with custom dedications, accompanied by real-time flame physics and a persistent local vigil counter.
- 🏺 Dynamic 3D Multi-Tier Altar: Displays your loved one’s photo in an ornate golden marigold frame surrounded by interactive offerings (pan de muerto, copal smoke, salt crosses, and personal favorite items).
- ✨ Golden Petal Particle Physics: An HTML5 Canvas engine simulates the sacred path of cempasúchil petals and spiritual sparks guiding spirits home at 60 FPS.
- 🔔 Synthesized Sacred Soundscape: Pure Web Audio API procedural synthesis creates a meditative 432 Hz drone and resonant Tibetan singing bowl chimes with zero external audio assets.
- 🗄️ Zero-Cloud Memory Vault: Saves altars locally via
localStorage. No accounts, no subscriptions, and zero data leakage.
Demo
- GitHub Repository: https://github.com/Master66999/La-Ofrenda-Digital
-
Zero-Build Instant Launch: Simply clone the repo and open
index.htmlin any browser. Nonpm install, no build step, no bundler needed. - Offline / Airplane Mode Ready: If Ollama isn't installed or is offline, a built-in poetic heuristic generator seamlessly steps in so the ceremony is never interrupted.
Code
💀 La Ofrenda Digital
A Virtual Memorial Builder for Día de los Muertos
Honor the ones you have loved. Keep their stories alive.
A private, offline-first memorial builder powered by local open-source AI
🌼 Overview
La Ofrenda Digital is a browser-based application that lets you build a beautiful, heartfelt digital ofrenda (altar) to honor loved ones who have passed. Inspired by the rich Mexican tradition of Día de los Muertos, the app combines stunning visuals with local AI to craft a personalized remembrance — all without a single byte of your memories ever leaving your device.
"They are not truly gone as long as someone remembers them."
✨ Features
Feature
Description
🤖 AI Remembrance
Generates a poetic tribute using a local LLM via Ollama — completely private
📷 Photo Portrait
Upload a photo or use a monogram initial as the centerpiece of the altar
🍽️ Offerings
Add favourite foods,
Key Components:
-
index.html— Semantic 6-stage single-page experience (Hero, Setup, Offerings Selection, AI Memorial Generation, Altar View, Memorial Gallery & Candle Ceremony). -
style.css— Bespoke Day of the Dead design system: obsidian palette (#0c0608), marigold gold (#f5a623), flame flicker keyframes, swaying papel picado bunting, and responsive glassmorphism. -
app.js— Core application logic: Ollama REST API discovery, canvas petal physics, Web Audio synthesizer, tag management, and localStorage persistence.
How I Built It
1. Open-Weight AI at the Core
The app communicates with open-weight models via Ollama's local HTTP API without requiring SDKs or external dependencies:
// Auto-detect installed models and prioritize optimal reasoning architectures
async function getOllamaModel() {
try {
const res = await fetch('http://localhost:11434/api/tags');
const data = await res.json();
const names = data.models.map(m => m.name.toLowerCase());
const preferred = ['llama3', 'mistral', 'gemma2', 'phi3', 'qwen'];
for (const pref of preferred) {
const match = data.models.find(m => m.name.toLowerCase().includes(pref));
if (match) return match.name;
}
return data.models[0]?.name || null;
} catch (e) {
return null; // Fallback to local heuristic engine
}
}
The system prompts the model to honor the cultural tradition—focusing on celebrated traits, cherished foods, and fond memories rather than cold biographical facts:
const prompt = `Write a warm, deeply touching, and poetic Día de los Muertos remembrance in English (2 short paragraphs).
Person: ${lovedOne.name} (${lovedOne.relationship})
Passions/Traits: ${lovedOne.tags.join(', ')}
Favorite Offering: ${lovedOne.favoriteOffering}
Favorite Memory: "${lovedOne.memory}"
Tone: Celebratory of their spirit, honoring Mexican ofrenda tradition, comforting, heartfelt. No preamble.`;
2. Procedural Soundscape with Web Audio API
Rather than burdening the user with heavy audio assets, all sacred audio is synthesized mathematically in real time:
- A dual-sine oscillator (432 Hz & 434 Hz) creates a soft binaural ambient drone.
- Exponential gain envelopes produce crystalline singing bowl bell tones whenever a candle is lit.
3. Pure Vanilla Web Philosophy
Built with pure HTML5, CSS3, and modern JavaScript. It requires zero compilation, loads in under 100ms, and runs on mobile and desktop alike.
Why Does Open Innovation Matter?
1. Privacy for Sacred Memories
Memorializing a lost family member is deeply personal. When you write about your grandmother's cooking or an uncle's laughter, that grief shouldn't be ingested into a proprietary training dataset or monetized for ad targeting. Open-weight models running on local hardware keep your family history strictly on your own device.
2. Free, Perpetual Inference
Commercial AI pricing changes, APIs get deprecated, and monthly subscriptions lapse. When an altar is built with open weights and open-source code, it costs $0.00 in perpetuity. You can return to honor your loved one five or ten years from now, and your altar will still be there.
3. Model Sovereignty & Offline Resilience
You can take a laptop into the mountains, visit a cemetery with no cellular signal, or turn on Airplane Mode, and the entire memorial experience—including AI remembrance generation—remains 100% functional.
My Agent Session
This project was developed collaboratively with an AI coding agent pair-programming across all modules: architecting the multi-stage SPA, crafting the Day of the Dead CSS design system, wiring the Ollama REST client, and synthesizing the Web Audio acoustics.
The Spirit of It
During testing, I entered a memorial for my grandfather:
- Offering: Black coffee and sweet bread (pan dulce).
- Memory: Teaching me how to plant tomatoes in his backyard garden while listening to the radio.
When the local model streamed back the remembrance—describing the scent of rich dark roast coffee mingling with fresh garden earth, and reminding us that love doesn't vanish with the body, but blooms like marigolds every autumn—it genuinely gave me chills.
Watching the virtual flame flicker as the 432 Hz bell rang brought a quiet sense of peace. That was the moment this ceased to be just a coding exercise: the "ghost in the machine" wasn't a spooky anomaly; it was a warm, enduring memory kept alive through open technology.
Prize Categories
- Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine
- Best On-Device / Local AI Application
Top comments (2)
good
local only for something like this makes sense. the memorial part is what makes it more than a demo.