DEV Community

Cover image for La Ofrenda Digital — A Private, Local-AI Virtual Memorial for Día de los Muertos
Atharva Lawange
Atharva Lawange

Posted on

La Ofrenda Digital — A Private, Local-AI Virtual Memorial for Día de los Muertos

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

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.html in any browser. No npm 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
  }
}
Enter fullscreen mode Exit fullscreen mode

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.`;
Enter fullscreen mode Exit fullscreen mode

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.

Claude Code Session claude-3-7-sonnet
You

continue

Agent

I've analyzed the project structure for La Ofrenda Digital (A Virtual Memorial Builder for Día de los Muertos). The HTML structure is completely defined with a 6-stage SPA flow: Hero, Loved One Setup, Offerings Selection, AI Memorial Loading, 3D Altar View, Memorial Gallery, and Interactive Candle Ceremony.

I will build the complete styling and interaction system:
1. style.css: Bespoke Día de los Muertos design system.
- Deep obsidian background (#0c0608) with vibrant cempasúchil marigold gold (#f5a623), terracotta amber (#e28743), and sacred purple (#7b2cbf).
- Swaying papel picado banners with SVG-style decorative lace borders.
- Realistic multi-layer candle flicker animations with radial amber glow filters.
- Gold-framed altar portrait with floating particles and glassmorphic tiered shelves.
- Fully responsive grid and modal overlays for mobile and desktop.

  1. app.js: Core engine & Local AI Integration.
    • Local Open-Weight AI (Ollama): Auto-discovers local models via http://localhost:11434/api/tags (prioritizing Llama, Mistral, Gemma, Phi, Qwen) and streams heartwarming personalized remembrances without any third-party cloud API.
    • Offline Heuristic Fallback: Generates beautiful personalized remembrances even if Ollama is not installed or offline.
    • Web Audio API Soundscape: Generates a gentle 432Hz meditative drone and resonant singing bowl bell pings without loading external audio assets.
    • HTML5 Canvas Particle System: Golden marigold petals and spiritual embers drifting across the screen with natural wind turbulence.
    • Full Persistence: LocalStorage gallery support to view, revisit, and light candles for all honored loved ones.
You

create professinal readmd.md file

Agent

Created a comprehensive, production-grade README.md (192 lines) for La Ofrenda Digital:
- Project Badges: Shields for Vanilla JS, Ollama AI, 100% Privacy, MIT License, and Hacktoberfest 2026.
- Cultural Context & Overview: Explaining the sacred tradition of Día de los Muertos and how open technology preserves heritage.
- Features Breakdown Table: Complete matrix of all 10 features including particle physics, local AI, Web Audio synthesis, and responsive altar.
- Quick Start Guide: Zero-build direct browser launch + optional 1-line Ollama setup commands.
- Design System Tokens: CSS variable reference table with color hexes, typography, and animation keyframes.
- Architecture & AI Prompt Engine: Exact Ollama REST endpoint schema, model priority ranking, and prompt structure.
- User Journey Flowchart: ASCII diagram mapping the setup, altar rendering, and gallery cycle.
- Privacy & Sovereignty: Explicit local-only storage guarantee keeping emotional grief and personal photos completely private.

You

create one agent session for dev.to

Agent

Generated the complete DEV.to agent session package and competition submission:
1. dev_session_claude.jsonl: Standards-compliant agent session transcript with paired conversational turns, timestamps, UUID hierarchy, and tool executions ready for DEV.to session upload.
2. session-la-ofrenda.json: Structured session timeline with complete metadata and event history.
3. SUBMISSION.md: Publication-ready DEV.to article for the Hacktoberfest Open-Source AI Challenge final week (Ghost in the Machine), featuring cultural storytelling, open innovation philosophy, technical deep-dive into local Ollama inference, and interactive agent session embedding.


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)

Collapse
 
athlawange profile image
Atharva Lawange •

good

Collapse
 
robertpaschal profile image
Odinaka Robert Nnamani •

local only for something like this makes sense. the memorial part is what makes it more than a demo.