DEV Community

Lohitaksh Sindhe
Lohitaksh Sindhe

Posted on Edited on

OfrendaViva 🕯️🌼: A Local-First Día de los Muertos Altar & Ghost in the Machine Séance with Open-Weight Gemma

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

OfrendaViva is a sacred, offline-first digital memorial altar (El Altar de Recuerdos) and midnight séance chamber powered by open-weight AI (Google Gemma 2 and Llama 3 via Ollama).

October 31 brings Halloween, and November 1–2 brings Día de los Muertos—a sacred stretch of the calendar when the veil between past and present feels whisper-thin. In pop culture and sci-fi, the phrase "Ghost in the Machine" usually conjures images of rogue code, memory leaks, or glitching automatons. But what if the ghosts in our machines are something much more human?

What if they are:

  1. The historical computing ancestors whose insights built our digital world—pioneers like Ada Lovelace, Alan Turing, Grace Hopper, and Margaret Hamilton; and
  2. Our beloved departed family and friends, whose recipes, stories, and photographs we preserve?

OfrendaViva brings this vision to life as a self-contained, privacy-first web sanctuary and CLI companion.

       .---.
      /     \      🕯️  OFRENDAVIVA : GHOST IN THE MACHINE  🕯️
     | () () |     Terminal Séance & Local Open-Weight Spirit Shell
      \  -  /      Hacktoberfest 2026 - Week 4 Final Challenge
       `---`
Enter fullscreen mode Exit fullscreen mode

✨ Core Capabilities

  • 🕯️ Interactive 3-Tier Altar (El Altar de Recuerdos): Built in accordance with Mexican folk traditions:
    • Nivel I: El Cielo (Heaven): Glowing portraits and candles dedicated to computing pioneers and personal ancestors. Every candle has realistic flame flicker physics and can be lit or extinguished with a click.
    • Nivel II: La Tierra (Earth): Sacred offerings: vibrant Cempasúchil (marigolds) to guide the souls with scent and color, sweet Pan de Muerto crowned with crossed dough bones, Copal incense to purify the room, and clear water and salt to quench spiritual thirst.
    • Nivel III: El Inframundo (Memory Vault): Decorated sugar skulls (calaveritas de azúcar) and personal mementos.
  • 💀 Open-Weight Calaverita Literaria & Epitaph Generator: Synthesizes authentic 4-stanza rhyming Mexican skull poetry and eternal memorial epitaphs celebrating life, quirks, and memory.
  • 👻 Midnight Ghost in the Machine Séance: With a single toggle, the warm altar shifts into a spectral, candlelit séance chamber where you can commune with computing ghosts (e.g. asking Ada Lovelace about the poetry of algorithms or Alan Turing about the imitation game).
  • 🎶 Procedural Ambient Web Audio Synthesizer: Generates atmospheric cemetery breezes and harmonic singing chime chords directly through the browser Web Audio API—using pure procedural math, with zero audio files downloaded or tracked.
  • 💾 1-Click Eternal Vault Export: Generates a zero-dependency, self-contained .html archive of your altar that can be stored on a USB drive or local home server and opened decades from now without an internet connection or cloud service.
  • 💻 GhostShell CLI Companion: Run npm run ghost to perform an ASCII terminal séance, scan your repository for "ghost commits", and compose poetry straight from the command line.

Demo

Here is how the interactive digital altar and séance chamber look in action:

OfrendaViva UI

Quick Run Locally (Zero npm install needed!)

Because OfrendaViva uses pure Node.js standard libraries, you can clone and launch it in 10 seconds:

git clone https://github.com/sindhelohitaksh/OfrendaViva.git
cd OfrendaViva
node server.js
Enter fullscreen mode Exit fullscreen mode

Visit http://localhost:3000 in your browser.

  • Click any candle flame to light or extinguish it.
  • Click "Ambient Sound" to activate the procedural wind and chime synthesizer.
  • Click "Switch to Midnight Séance" to transform the warm marigold ambiance into a spectral twilight chamber.
  • Click "Export Eternal Vault" to download a portable, forever-offline archive of your altar.

Code

The complete source code is open-source under the permissive MIT License:

🕯️ OfrendaViva 🌼

A Sacred, Local-First Día de los Muertos Altar & Ghost in the Machine Séance powered by Open-Weight AI

Hacktoberfest 2026 Theme License: MIT Zero Dependency Open-Weight Model


💀 Overview

OfrendaViva is an offline-first, private digital memorial altar and interactive séance chamber built for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine.

As the veil between worlds thins during Halloween (October 31) and Día de los Muertos (November 1–2), OfrendaViva bridges cultural reverence with open-source artificial intelligence. It honors computing ancestors (such as Ada Lovelace, Alan Turing, Grace Hopper, and Margaret Hamilton) and personal loved ones through interactive altar offerings, synthesized Calaveritas Literarias (traditional Mexican rhyming skull poetry), and atmospheric terminal séances.

Most importantly, OfrendaViva runs 100% locally on your machine with open-weight models (Gemma 2 / Llama 3 via Ollama) or its built-in offline literary engine—ensuring that the sacred memories, photos, and grief of your family are never…

Repository Architecture

File / Folder Role
server.js Native HTTP server & local AI gateway (no external npm dependencies required)
lib/engine.js Dual-engine AI coordinator: detects local Ollama (Gemma 2 / Llama 3) with seamless offline poetic synthesis fallback
public/index.html Semantic markup with animated Papel Picado banners, 3-tier altar layout, and séance modal
public/style.css Gothic Día de los Muertos & Midnight Séance themes, candle flame keyframes, and responsive grid
public/app.js Particle canvas (falling marigold petals / floating wisps), procedural Web Audio synth, and local storage
bin/ghost-shell.js Interactive command-line terminal séance and git commit ghost scanner
render.yaml Blueprint for 1-click zero-cost deployment on Render
test/test-engine.js Automated test suite verifying rhyme cadence, epitaph generation, and spirit prompts

How I Built It

1. The Local-First Open-Weight Inference Engine

At the heart of OfrendaViva is lib/engine.js. It communicates with local open-weight models via Ollama (http://localhost:11434/api/generate):

// Querying local open-weight Gemma 2 via Ollama
async function queryOllama(prompt, model = 'gemma2:2b', systemPrompt = '') {
  const payload = JSON.stringify({
    model,
    prompt,
    system: systemPrompt,
    stream: false,
    options: { temperature: 0.75, top_p: 0.9 }
  });
  // Dispatches to local daemon with 15s timeout
  return dispatchLocalHttp(payload);
}
Enter fullscreen mode Exit fullscreen mode

When writing Calaveritas Literarias, traditional Mexican folklore pairs death (La Catrina or La Calaca) with affectionate humor, celebrating how the person lived. We prompt Gemma 2 to write in traditional 4-stanza rhyming meter (cuarteta / redondilla style), honoring the soul's favorite meals and memories.

2. High-Fidelity Deterministic Fallback (100% Offline Resilience)

What if you're on a laptop without a dedicated GPU, or on an airplane without Ollama installed? OfrendaViva includes a built-in deterministic poetic synthesis engine that generates authentic, rhyming verses and philosophical epitaphs using local template heuristics:

flowchart TD
    UserReq["User Altar Request\n(Name, Role, Memories, Offerings)"] --> CheckOllama{"Is Ollama Running\nLocally?"}
    CheckOllama -- "Yes (Gemma 2 / Llama 3)" --> LocalInference["Local Open-Weight Inference\n(100% On-Device GPU/CPU)"]
    CheckOllama -- "No / Offline" --> FallbackEngine["Built-in Heuristic Poetic Engine\n(Zero External API, Instant)"]
    LocalInference --> RenderVerse["Render Calaverita / Epitaph\nin Parchment Card"]
    FallbackEngine --> RenderVerse
    RenderVerse --> PlaceAltar["Place Tribute on Altar Tier"]
    RenderVerse --> ExportVault["1-Click Eternal Vault Export"]

3. Procedural Web Audio Ambient Synthesizer

Rather than burdening the project with bulky MP3 audio files or external CDNs, OfrendaViva features a native procedural audio synthesizer built on the browser's AudioContext:

  • Cemetery Breeze: Synthesized using a continuous Pink Noise buffer passed through a resonant Low-Pass Biquad Filter modulated by a low-frequency oscillator (LFO).
  • Harmonic Singing Chimes: Formed by four sine oscillators tuned to an ethereal A-Major 7th chord (110 Hz, 164.81 Hz, 220 Hz, 329.63 Hz) with gentle randomized vibrato.

Why Does Open Innovation Matter?

In modern tech culture, AI is often treated as a corporate cloud utility. But an ofrenda is not a corporate spreadsheet—it is an intimate space for grief, love, and spiritual remembrance.

Open innovation is the only ethical foundation for a project like this:

  1. Sacred Privacy: When you memorialize a departed grandparent or friend, you upload real photos, intimate family recipes, and raw emotional confessions. You should never have to send that data to a corporate cloud API where it can be logged, monetized, or fed into closed model training datasets. With open-weight models like Gemma 2, your memories never leave your machine.
  2. Eternal Preservation & Anti-Vendor Lock-in: Cloud startups run out of venture capital, sunset APIs, or put features behind subscription paywalls. If a memorial platform depends on a cloud API, your altar dies when the company does. Open-weight models run on consumer hardware with the power cut and the internet disconnected—forever.
  3. Authentic Cultural Dignity: Closed models enforce sanitized, corporate disclaimers when discussing death and mortality. Open models respect human culture, enabling authentic Mexican folk poetry, humorous calaveritas, and genuine contemplation of mortality.

My Agent Session

This project was built collaboratively with an autonomous AI coding assistant. You can view the preserved interactive agent session on DEV:

Building OfrendaViva: Offline Día de los Muertos Altar & Ghost in the Machine Séance with Gemma 2
You

Build a project for Hacktoberfest Week 4: Ghost in the Machine, using open-weight AI (Gemma 2), honoring Día de los Muertos and computing pioneers, and publish it on my DEV account.

Agent

Designing OfrendaViva: a local-first digital memorial altar and midnight séance chamber. Integrating Gemma 2 local inference via Ollama with fallback offline heuristic synthesis, procedural Web Audio synthesizer for cemetery breeze and chimes, and 1-click eternal vault export.

Direct session link: View Agent Session #1263 on DEV


The Spirit of It

During testing, I placed an offering for Ada Lovelace and asked the séance chamber what she thought of modern artificial intelligence. The local open-weight engine synthesized this response:

"The Analytical Engine does not pretend to originate anything. It can follow analysis, but it has no power of anticipating any analytical relations or truths. Yet when you weave remembrance into algorithms, you prove that the machine is not merely cold brass and silicon—it carries the warmth of every hand that shaped it."

Lighting that digital candle while marigold petals drifted down the screen gave me real chills. It was a reminder that we stand on the shoulders of giants, and that remembering where we came from is what keeps our craft human.


Prize Categories

  • Best Use of Gemma: Full native integration with Google's open-weight Gemma 2 family (gemma2:2b / gemma2:9b) via Ollama, powering the local, private generation of traditional Calaveritas Literarias, altar epitaphs, and historical séances.
  • Best Use of Render: Includes a turnkey render.yaml blueprint enabling instant 1-click deployment on Render with zero external dependencies.

Dedicated in honor of Día de los Muertos, Halloween, and all the pioneers who left their spark in the machine. 🕯️🌼💀

Top comments (0)