DEV Community

Ronit Solanki
Ronit Solanki

Posted on

Ofrenda: A Local AI Altar That Keeps Your Loved Ones’ Memories Alive

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

Ofrenda is a private, local altar for the people you remember.

In Día de los Muertos, an ofrenda is an altar built from the things a person loved: their favorite food, their songs, the objects they kept close, the stories people tell about them. I wanted to build a digital version, one that keeps those memories alive and can be talked to.

You add a person, then place "offerings" on their altar: a food, a song, a story, or an object. Then you can:

  • Ask the Keeper. A chat that answers only from the memories you placed. Ask "What did she love to cook?" and it tells you what you wrote, in a gentle voice.
  • Write a remembrance. A short tribute written from the memories.
  • Write a calaverita. A playful rhyming verse in the Mexican tradition of teasing Death while celebrating the person.

I interpreted "Ghost in the Machine" in a gentler way than haunting. The ghost isn't a fake version of your loved one. It's their memory, kept safe by a machine. That's why the Keeper is deliberately not allowed to speak as the person. It's a storyteller who looks after the memories, speaks about them in the third person, and says "that story isn't on the ofrenda yet" instead of making something up.

Demo


Code

GitHub logo ronitsolanki-01 / Ofrenda

Ofrenda: a private, local altar for people you remember. Place foods, songs & stories, then ask a Keeper that answers only from your memories, or get a calaverita. Spring Boot, Next.js, Spring AI, llama3.1:8b & nomic-embed-text via Ollama. Nothing leaves your laptop.

Ofrenda

A private, local altar for people you remember. Place foods, songs, stories and objects on it. Memories are embedded with nomic-embed-text into a Spring AI vector store. The "Keeper" (llama3.1:8b) answers using retrieval (RAG) from those memories only, and can write a remembrance or a playful calaverita.

Run

  1. ollama pull llama3.1:8b && ollama pull nomic-embed-text (Ollama running on :11434)
  2. Backend (Java 21): cd backend && mvn spring-boot:run → http://localhost:8080
  3. Frontend: cd frontend && npm install && npm run dev → http://localhost:3000

Data is saved to backend/data/ofrenda.json and re-embedded on every startup.




How I Built It

Everything runs on my own machine with open-weight models.

Layer Tech
Chat model llama3.1:8b via Ollama
Embeddings nomic-embed-text via Ollama
AI framework Spring AI 1.0 (ChatClient, VectorStore, EmbeddingModel)
Backend Spring Boot 3.4, Java 21
Frontend Next.js 15 (App Router, TypeScript)

The core idea is RAG (retrieval-augmented generation), kept small and honest:

  1. When you place an offering, the backend embeds the text with nomic-embed-text and stores it in Spring AI's SimpleVectorStore, tagged with the person's id.
  2. When you ask the Keeper a question, the backend runs a similarity search filtered to that person's memories and pulls the top 5.
  3. Those memories go into the system prompt for llama3.1:8b, with strict rules: use only these memories, invent nothing, never pretend to be the person.
  4. Memories are saved to a small JSON file and re-embedded on startup, so the altar survives restarts without needing a database.

The calaverita and the remembrance use the same approach: all of a person's memories go into the prompt, and the model is told which style to write.

The design comes from the subject itself: a papel picado banner across the top, and a marigold, pink and teal palette on deep plum, like candlelight against a night sky.

Why Does Open Innovation Matter?

Grief is private. The things people write about someone they've lost, such as a grandmother's recipes, a father's songs and the story from the hospital, are some of the most personal data a person owns.

With a closed API, every one of those memories would have to leave my machine and pass through someone else's servers. With open-weight models and local inference, nothing leaves the laptop. There's no account, no API key, no usage bill and no terms of service sitting between you and your own memories.

Open tooling also let me build exactly what I wanted. Spring AI let me plug Ollama into a normal Spring Boot backend, and I could swap models, tune the prompts and filter retrieval per person. Because the project is open too, someone else can fork it, translate it, or point it at a different model.

The Spirit of It

The goal isn't to bring anyone back. It's to make sure that the small, specific things that made a person who they were don't get lost.


*Built for Hacktoberfest 2026 with open-weight models.

Top comments (0)