Ghostlight: Every Machine Has a Ghost Story π»
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine.
What I Built
I built Ghostlight, a spooky AI-powered story generator inspired by the theme Ghost in the Machine. The idea is simple: what if every machine had a story hidden inside it, waiting to be discovered?
Ghostlight allows users to enter a story idea, choose an atmosphere, and generate an eerie tale. Whether it's a forgotten arcade machine, a mysterious signal at midnight, or a room filled with old memories, Ghostlight transforms these prompts into atmospheric storytelling experiences.
The project offers two modes:
- Local AI Mode: Uses Ollama to connect to an open-weight language model running locally.
- Offline Mode: Uses a built-in JavaScript story generator, allowing users to create stories without installing an AI model.
I wanted to combine Halloween-inspired creativity with the principles of open-source AI, privacy, and accessibility.
Demo
π» Live Website: https://ehtishamhaque1212-arch.github.io/Ghostlight/
Explore the interface, choose a story prompt, select your preferred atmosphere, and summon a story from the darkness.
Code
π» GitHub Repository: https://github.com/ehtishamhaque1212-arch/Ghostlight.git
The project is built with HTML, CSS, and vanilla JavaScript, with optional integration with Ollama for local AI inference.
How I Built It
I built Ghostlight using:
- HTML to structure the application and its interactive controls.
- CSS to create a dark, atmospheric interface with purple accents and a responsive layout.
- JavaScript to manage user inputs, generate offline stories, and communicate with the local AI service.
- Ollama to run an open-weight language model locally and generate original stories without relying on a hosted AI API.
For local AI generation, Ghostlight sends a prompt to Ollama's local API, which returns a generated story. Users can customise the prompt, atmosphere, and story length.
I also implemented an offline fallback so the application remains usable without an AI model. This fallback is template-based rather than an LLM, but it makes the experience accessible even when local AI is unavailable.
Why Does Open Innovation Matter?
Open innovation matters because AI should be something developers can understand, experiment with, and adaptβnot just consume through closed APIs.
With Ghostlight, using an open-weight model through Ollama gives users more control over model selection and allows story generation to happen locally. Prompts can remain on the user's computer instead of being sent to a remote AI provider through a hosted API.
This approach also provides flexibility. Developers can experiment with different compatible models, modify prompts, adjust generation settings, and improve the application without depending on a single proprietary AI service.
The offline mode adds another layer of accessibility by allowing users to explore the project without needing a model or a continuous internet connection.
For me, open-source AI makes experimentation more accessible and gives developers the freedom to build tools that reflect their own ideas.
My Agent Session
I used AI-assisted development to help plan and build the interface, implement the story-generation logic, and document the project.
The project code and implementation are available in the GitHub repository above.
Note: I haven't included a DevRelay session link because I don't have a session URL to share.
The Spirit of It
Ghostlight began with a simple thought: what if the machines we use every day could tell stories about the things we've forgotten?
A flickering screen, an abandoned arcade machine, or an old message appearing at midnight can all become the beginning of a mystery.
But not every ghost story needs to be frightening. Some stories are about memories, people, and moments we want to preserve. That is why I wanted Ghostlight to explore both eerie fiction and the emotional side of remembering.
This project is my small experiment in bringing open-source AI and creative storytelling togetherβone mysterious signal at a time.
Prize Categories
My project is intended to align with the open-weight AI / local inference theme through its optional Ollama integration.
I'll confirm the official partner prize categories against the challenge rules before selecting any specific partner category.
Built with curiosity, code, and a little bit of darkness. π»
Project: Ghostlight
Live Demo: https://ehtishamhaque1212-arch.github.io/Ghostlight/
Source Code: https://github.com/ehtishamhaque1212-arch/Ghostlight.git


Top comments (0)