Here is your complete, publication-ready submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine:
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine
What I Built
"The dead are never truly gone as long as they are remembered."
Spiritus is an offline, privacy-first virtual ofrenda builder and commemorative AI companion. Built for the intersection of Halloween and Día de los Muertos, it creates a digital altar to honor departed loved ones and generates heartfelt, poetic remembrances using open-weight AI running 100% locally on your machine.
How it interprets the theme: "Ghost in the Machine"
In Latin, Spiritus means breath, spirit, and soul. We often think of AI as cold silicon, but in folklore and philosophy, a "ghost in the machine" is consciousness emerging where you least expect it.
During Día de los Muertos, tradition holds that the boundary between the living and the spirit world grows thin, guided home by the scent of cempasúchil (marigolds) and candle flame. Spiritus reclaims this concept: instead of a faceless cloud scraping personal data, an open-weight model acts as a gentle, local memory keeper living quietly inside your hardware. It helps you articulate memories that are hard to put into words—safeguarding intimate family stories without a single packet ever leaving your device.
✨ Key Features
- 🕯️ Interactive Live Altar: Dynamic digital altar with live candle flames, animated floating marigold petals, a portrait frame, and real-time altar tier displays.
- 🪶 Tone & Style Controls: Tailor the voice of the remembrance to match their personality:
- Poetic: Lyrical, evocative imagery of marigolds and golden bridges.
- Celebratory: Joyful, vibrant toasts to a life lived without regret.
- Solemn: Dignified, calm, and reverent peace.
- Storyteller: Narrative warmth like a story shared around a family dinner table.
- 🌾 Traditional Offering Chips: One-tap additions for authentic ofrenda items (Cempasúchil, Veladoras/Candles, Pan de Muerto, Café de Olla, Music, Photos).
- 🔊 Voice Recitation (TTS): Built-in speech synthesis recites the remembrance aloud with an amber glow effect, giving physical voice to the memorial.
- 📡 SSE Streaming: Token-by-token generation that appears like an ethereal typewriter.
- 💬 Multi-Turn Chat Companion: Ask the model to translate into Spanish, write an accompanying altar poem, or refine specific memories.
- 💾 Local File Persistence & Export: Saves ofrendas directly to local storage (
data/ofrendas.json) and exports formatted.txtmemorial scrolls. - 🔄 Auto-Save Drafts: Client-side state persistence ensures you never lose a draft if you step away.
- 🎭 Built-in Demo Mode: Fully functional with pre-crafted poetic responses even if Ollama is not installed yet.
Demo
- Repository: github.com/rachiittt/Hacktober_dev2
-
Local URL:
http://localhost:3000
Altar Preview & Generation
Quick Walkthrough:
- Build the Altar: Enter your loved one's name, dates, relationship, and a cherished memory.
- Lay the Offerings: Select their favorite foods, music, or flowers.
- Choose the Tone: Select from Poetic, Celebratory, Solemn, or Storyteller.
- Invoke the Remembrance: Watch Gemma 3 stream the memorial in real time.
- Recite & Save: Click "Recite Aloud" to hear it spoken or "Save as Text" to export a permanent memorial file.
Code
You can explore the complete codebase on GitHub:
💀 Spiritus — Virtual Ofrenda Builder
"The dead are never truly gone as long as they are remembered."
Spiritus is a full-stack web app built for the Hacktoberfest 2026 Open-Source AI Challenge: Ghost in the Machine. It lets you build a digital ofrenda (altar) and generate a heartfelt, AI-written remembrance for someone you've loved and lost — all running 100% locally on your machine, with zero cloud, zero data collection.
✨ Features
| Feature | Details |
|---|---|
| 🕯️ Interactive Altar Builder | Add offerings, names, dates, and memories — the altar preview updates live |
| 🪶 Tone & Style Controls | Choose between Poetic, Celebratory, Solemn, or Storyteller styles |
| 🔊 Recite Aloud (TTS) | Hear the remembrance read aloud with gentle browser speech synthesis |
| 🤖 Local AI Generation | Runs Gemma 3 / Mistral / LLaMA via Ollama — no API key needed |
| 📡 SSE Streaming | Remembrances stream token-by-token like a typewriter |
| 💬 Multi-turn Chat | Continue |
Architecture Overview
spiritus/
├── server.js # Express backend (proxies Ollama SSE & local persistence)
├── data/
│ └── ofrendas.json # File-backed local memorial storage
└── public/
├── index.html # Single-page application UI
├── style.css # Día de los Muertos design system & particle styling
├── app.js # Canvas particles, SSE streaming, Web Speech TTS, draft sync
└── hero.jpg # Visual assets
How I Built It
Spiritus is designed from the ground up as a zero-cloud, local-first stack:
-
Model Engine: Google Gemma 3 4B (
gemma3:4b), with runtime compatibility forgemma3:1b,gemma2:2b,mistral:7b, andllama3.2:3b. -
Local Inference: Ollama serving as the local inference runtime via its native REST API (
/api/generateand/api/chat). -
Backend: Lightweight Node.js/Express service that translates Ollama's ndjson streaming chunks into standard Server-Sent Events (SSE) for the browser, while managing local JSON persistence in
data/ofrendas.json. - Frontend: Vanilla HTML5, modern CSS with custom properties and CSS animations, HTML5 Canvas for floating marigold petal physics, and the Web Speech API for voice narration. No bundling, no build steps, no telemetry.
Prompt Engineering for Emotional Resonance
Rather than generic boilerplate, the system prompt frames Gemma as a compassionate writing companion that weaves together concrete physical offerings with lyrical prose:
const prompt = `You are Spiritus, a compassionate AI writing companion for a Día de los Muertos digital ofrenda.
Tone: ${tone.toUpperCase()} (${toneGuides[tone]})
Person being honored: ${name} (${dates})
My relationship to them: ${relation}
A cherished memory: ${memory}
Offerings placed on their altar: ${offerings}
Write a beautiful, personal, and emotionally resonant remembrance of 3–4 paragraphs in this style.
Weave in the specific details above naturally. End with a poignant closing line that feels like lighting a digital candle.
Speak from the heart.`;
Why Does Open Innovation Matter?
When building something as deeply vulnerable as an ofrenda for someone you have loved and lost, closed proprietary APIs fail on every moral and technical front:
1. Radical Privacy for Sacred Memories
A remembrance of a deceased parent or friend often contains intimate family details, private regrets, and tender memories. Sending those words to a closed cloud API means transmitting them to corporate servers where they may be logged, analyzed, or indexed for telemetry. Open-weight models like Gemma run on your machine's CPU/GPU. Your words never touch a network card.
2. Grief Has No Subscription or Deprecation Date
Closed AI services regularly alter pricing, enforce token limits, or shut down entirely. Grief is not a SaaS subscription. A .gguf weight of Gemma sitting on your hard drive will execute identically today, next month, or twenty years from now, completely independent of whether an AI startup stays in business.
3. It Works with the Lights (and Internet) Off
Whether you are on a remote cabin retreat, experiencing a storm outage, or simply sitting in a quiet room with the Wi-Fi disabled, Spiritus lights its candles and runs inference completely offline. Open innovation ensures that technology serves human ritual, not the other way around.
My Agent Session
This project was built, refined, and documented collaboratively using an autonomous AI coding agent session via DevRelay.
(Optional: Embed your DevRelay session transcript using {% agent_session <session_id> %} or link to your saved session transcript on DEV).
The Spirit of It
During development, we tested Spiritus with a prompt for a grandmother who passed away in 2021—someone whose presence was defined by the aroma of morning cinnamon coffee, worn recipe cards, and old bolero records playing on Sunday afternoons.
When the local model began streaming:
"In the soft amber glow of cempasúchil light, we summon the spirit of Abuela Rosa... We have laid out fresh café and the boleros she loved, because memory is not a monument of stone—it is the warmth of coffee still shared across the veil."
And when the browser recited those words aloud with the soft yellow digital candles flickering on screen, it didn't feel like a synthetic language model predicting the next token. It felt like a space of honor. That is what open-source AI makes possible: human dignity encoded into open weights.
Prize Categories
- 🏆 Best Use of Gemma (Featured Category): Spiritus is built specifically around Google's open-weight Gemma (
gemma3:4b/gemma2) executed locally via Ollama to produce nuanced, compassionate memorial prose and multi-turn conversations without cloud dependencies. - 🌟 Overall Winner
🌐 Community Wisdom
- 💡 Local-First Privacy: Developers in the DEV community consistently emphasize that emotional and personal utilities must prioritize local open weights over cloud endpoints to eliminate data leakage and subscription fatigue.
- ⚡ Streaming Responsiveness: Implementing SSE streaming with Ollama dramatically improves perceived latency compared to buffered responses, creating a natural "typewriter" effect suitable for contemplative reading.


Top comments (0)