DEV Community

Cover image for Ofrenda: A Private Altar for the People We Miss, Powered by a Local Model
Simran Jaiswal
Simran Jaiswal

Posted on

Ofrenda: A Private Altar for the People We Miss, Powered by a Local Model

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine

What I Built

Ofrenda is a private altar builder for Día de los Muertos. You tell it about someone you miss: their name, who they were to you, their favorite foods and songs, and a story you carry. A language model running on your own computer turns those details into a short remembrance and a gentle four-line calaverita verse. The page then lays everything out as a candle-lit, three-tier ofrenda with flickering candles, a papel picado banner, and your foods and songs as offerings. You can save the finished altar as a single HTML file and keep it.

I read "Ghost in the Machine" as honoring the people who have gone, rather than haunting anyone. The "ghost" is a memory, and the machine's job is to help you put it into words. The model is told to use only the details you give it, never to invent facts, and never to speak as the person who died. It helps you say what you already feel, and it doesn't pretend to be them.

Demo

Live site: https://er-simran-jaiswal.github.io/Ofrenda/

The hosted page is static, so it shows the altar design. Generating the remembrance needs the local model, so for the full experience run it on your own machine (steps below). [Add a screenshot or short screen recording of a finished altar here.]

Code

[Paste your GitHub repo link here. DEV will embed it if you use {% embed https://github.com/er-simran-jaiswal/Ofrenda %}, assuming that is the repo URL.]

To run it locally:

ollama pull llama3.2
python3 ofrenda.py
# opens http://localhost:8484
Enter fullscreen mode Exit fullscreen mode

To use a different model: OFRENDA_MODEL=gemma3 python3 ofrenda.py

How I Built It

  • Model: an open-weight model served locally by Ollama. It defaults to llama3.2, and you can swap in any model Ollama can run.
  • Backend: one Python file using only the standard library (http.server and urllib). It receives the form, builds a prompt, and calls Ollama's /api/chat endpoint on localhost. There are no pip installs, API keys, or accounts.
  • Prompting: the system prompt tells the model to be warm and specific, use only the details provided, and never speak as the deceased. The model returns the remembrance and the verse separated by ---, and the app splits them.
  • Frontend: a single HTML file with plain CSS and JavaScript, using no frameworks and no external fonts, so it still looks right offline. The candles use a CSS animation that respects prefers-reduced-motion.
  • Export: "Save altar as a file" bundles the altar and its styles into one standalone HTML file that doesn't depend on the app or the model.

Why Does Open Innovation Matter?

  • Privacy: grief and family stories are about as personal as data gets. With a local model, nothing leaves the machine, so there is no server log, no account, and no company holding someone's memories of their grandmother.
  • Offline: once the model is downloaded, Ofrenda works with the Wi-Fi off, like candles in a power cut.
  • Longevity: a remembrance shouldn't disappear because an API changed its pricing or shut down. The tool depends on no hosted service, and the saved altar is a plain HTML file that will open for years.
  • Control: I can swap the model, for example to one that writes better in Spanish, or edit the system prompt to change its tone. Neither is possible with a closed API.

My Agent Session

[Optional: embed your DevRelay session with the agent_session tag, or link to it. Delete this section if you don't have one.]

The Spirit of It

[Optional, and this is the section I'd most encourage you to fill in. If you try Ofrenda with a real memory (a recipe, a song, a story about someone you've lost), describe the moment it landed in your own words, even if it's just a few sentences. Remove this section if you'd rather not share.]

Prize Categories

[List the partner categories you're entering, or delete this section. I don't know which ones apply, so I haven't guessed.]

Top comments (0)