GhostLore AI:保存故事的詭秘互動網站
GhostLore AI — The Haunted Story Keeper
GhostLore AI 是一個互動故事網站,可按用戶的構想生成不同氛圍的故事,並提供回應提問的 haunted terminal。用戶可在瀏覽器儲存故事、複製或下載文字檔,也可連接 Ollama 和 Qwen2.5,在本機生成故事,無須把提示詞傳送至託管 AI 服務;離線示範模式則使用範本回應,並非 AI 推理。
What I Built
Meet GhostLore AI, a spooky interactive storytelling website inspired by the idea that some stories never truly disappear.
For the Hacktoberfest Week 4 theme, Ghost in the Machine, I wanted to build something that combines the mystery of Halloween with the power of open-source AI.
GhostLore AI allows users to:
👻 Create spooky stories from their own ideas.
🌙 Choose different atmospheres, from eerie mysteries to folklore and remembrance.
💻 Explore a haunted terminal that responds to questions.
📚 Save stories in a personal archive directly in their browser.
📥 Copy stories or download them as text files.
🔒 Connect a local open-weight AI model to generate stories without sending prompts to a hosted AI service.
The goal is simple: make storytelling fun while giving users more control over their data and creative tools.
Live Demo:
Screenshot or Video: file:///C:/Users/Rishi/OneDrive/Documents/MY%20PPT%20AND%20NOTES/GhostLore%20AI/index.html
The project includes an offline demo mode. Actual open-weight AI generation requires Ollama and a compatible local model to be installed and running.
GitHub Repository:https://github.com/rishiyadavcreator/GhostLore-AI.git
Built with:
HTML5 for the website structure
CSS3 for the dark, atmospheric interface and responsive design
Vanilla JavaScript for story generation, the haunted terminal, and the local archive
Ollama for running a local language model
Qwen2.5 as the example open-weight model
How I Built It
I built GhostLore AI using HTML, CSS, and vanilla JavaScript, keeping the project lightweight and beginner-friendly.
The interface uses a dark background, glowing purple and pink accents, spooky typography, and responsive layouts to create a mysterious atmosphere.
The application has three main parts:
- The Story Chamber
Users enter a story idea and select an atmosphere and story length. The website can connect to Ollama's local generation API to request an original story from a locally running model.
- The Haunted Terminal
Users can enter questions and receive mysterious responses. When Ollama is available, the terminal can use the local model. Otherwise, it provides clearly labeled demo responses.
- The Story Archive
Users can save stories in browser local storage, reopen them, copy their content, or download them as text files.
For the open-weight AI component, I chose Ollama with Qwen2.5 as an example configuration. This allows the model to run on the user's own computer rather than requiring a paid, hosted AI API.
The demo fallback makes it possible to explore the interface even before installing the model, but it is template-based and is not itself AI inference.
Why Does Open Innovation Matter?
For a project about mysterious stories and personal memories, privacy matters.
A closed, hosted AI API can be convenient, but it may require sending prompts to an external service. With a properly configured local model, GhostLore AI can generate stories on the user's own machine.
Open innovation makes several things possible:
Privacy: Prompts can remain on the local computer when inference is performed locally.
Control: Users can choose and replace compatible models.
Cost flexibility: Local inference avoids per-request hosted API fees, although running a model still uses computing resources.
Offline potential: After downloading the model and required files, local generation can work without an internet connection, provided the local runtime is available.
Freedom to experiment: Developers can explore different models and adapt the experience without depending entirely on one closed AI provider.
For me, open-source AI is not just about using a model for free. It is about learning how the technology works, having choices, and building tools that people can control.
My Agent Session
This section is optional.
If I record a development session using DevRelay, I can share the session link here so readers can see how GhostLore AI was built and improved.
The Spirit of It
Every family, community, and generation has stories worth preserving.
Some are spooky tales told at night. Others are memories of people, places, and traditions that shaped us.
GhostLore AI takes inspiration from that idea: technology can help us create new stories and keep the stories we care about close to home.
The ghost in the machine is not necessarily something to fear. Sometimes, it is simply a story waiting to be told.
Prize Categories
Add the partner prize categories that apply to your project according to the official challenge rules. Remove this section if you are not entering a specific partner category.
Built with curiosity, a little mystery, and an appreciation for open-source AI. 👻
Hacktoberfest #OpenSource #AI #JavaScript #Ollama #GhostInTheMachine
來源:DEV Community · dev.to
