DEV Community

Tripurala Spandana
Tripurala Spandana

Posted on

Ghostlight: Turning Personal Memories into Stories with Local AI πŸ‘»

What I Built

Have you ever remembered a small moment from your past and wished you could put that feeling into words?

That was the idea behind Ghostlight β€” Memories That Stay.

Ghostlight is a small project I built to turn personal memories into written stories using local AI. You can enter a memory, choose a writing style, and let the AI help you turn it into a heartfelt letter, short story, remembrance note, or even a spooky tale.

I liked the idea of connecting AI with something personal rather than using it only for coding or answering questions. Our memories are often made up of simple thingsβ€”a conversation with a friend, a childhood experience, or a moment we don't want to forget. Ghostlight is my attempt to give those moments a place to stay.

The name Ghostlight fits the Hacktoberfest theme, Ghost in the Machine, because there's an AI working quietly behind the scenes, helping bring memories back to life through words.

Demo

Live Demo: Ghostlight currently runs locally on my computer.

To try it, start the Python server and open http://127.0.0.1:8000 in your browser.

I plan to share a screen-recorded demo showing how to enter a memory, generate a story, and save it to the memories library.

Code

GitHub Repository:

πŸ‘» Ghostlight β€” Memories That Stay

Ghostlight is a local AI-powered memory-writing app that transforms personal memories into meaningful written pieces. Enter a memory, choose a writing style, and let a locally running AI help you preserve it.

The project uses Ollama to generate text locally, allowing your memories to stay on your own computer instead of being sent to a cloud AI API.

✨ Features

  • πŸ“ Transform personal memories into AI-assisted writing.
  • 🎭 Choose from four writing styles
    • Heartfelt Letter
    • Short Story
    • Remembrance Note
    • Spooky Tale
  • πŸ’Ύ Save generated memories with a custom title.
  • πŸ“š Browse saved memories in your personal library.
  • πŸ” Read the original memory alongside the generated writing.
  • πŸ“‹ Copy generated text to use elsewhere.
  • πŸ”’ Local-first design using Ollama on your computer.

🧰 Tech Stack

  • Python β€” Local server and API endpoints
  • HTML, CSS, JavaScript β€” User interface
  • Ollama β€” Local AI model runtime
  • Qwen2.5-Coder…

The repository contains the Python server and the HTML, CSS, and JavaScript used to build the application.

How I Built It

I wanted to keep this project simple and run the AI locally instead of depending on a paid AI API.

Here is what I used:

  • Python to run the local server and handle requests.
  • HTML, CSS, and JavaScript to build the user interface.
  • Ollama to run the AI model on my computer.
  • Qwen2.5-Coder 3B as the language model.
  • JSON files to store saved memories locally.

When someone enters a memory and selects a writing style, the application sends the information to the local Ollama model. The model generates the writing, which can then be reviewed, copied, and saved with a title.

I also worked on a saved memories section so that users can revisit their earlier entries instead of generating everything from scratch each time.

One thing I wanted to be careful about was keeping the original meaning of a memory. The AI should help express the experience, not freely invent personal details that were never provided.

Building Ghostlight helped me understand how a local language model can be connected to a simple web interface and used for something more personal than a typical chatbot.

Why Does Open Innovation Matter?

For me, open innovation means being able to experiment, learn, and build things without needing access to expensive tools or closed AI services.

Using Ollama and an open-weight model gave me the opportunity to experiment with AI on my own computer. I could work on the prompts, test different writing styles, and improve the application without making every generation request to a cloud API.

It also made me think about privacy. Personal memories can be sensitive, so I wanted a project where the AI generation process could happen locally.

Open-source tools made this experiment possible with the resources I already had. They gave me room to learn by building, making mistakes, and improving the project step by step.

My Agent Session

I built Ghostlight by experimenting with the code, testing different memories, and improving the application as I went.

I haven't included a DevRelay agent session yet.

The Spirit of It

While testing Ghostlight, I thought about how a simple memory can carry a lot of emotion.

For example, remembering a school friend who shared lunch with you every day might seem like a small thing. But years later, that ordinary moment can still make you smile.

That's the feeling I wanted Ghostlight to captureβ€”not just generating text, but helping someone revisit a moment that still means something to them.

The AI doesn't own the memory. The person does. Ghostlight simply helps put it into words.

Thanks for checking out Ghostlight! Building this project was a chance to explore local AI in a different way, and I hope it inspires someone else to experiment with their own ideas.

Top comments (0)