DEV Community

Suraj
Suraj

Posted on

GhostWriter: The Haunted AI Story Generator | Hacktoberfest 2026

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

What I Built

GhostWriter – The Haunted AI Story Generator

What if a machine could bring your darkest imagination to life?

GhostWriter is a spooky AI-powered story generator that transforms simple ideas into mysterious, supernatural and horror stories.

Inspired by Halloween and the theme "Ghost in the Machine", I wanted to build something creative that combines the mysterious world of ghosts with the possibilities of open-source AI.

Users can enter a story idea, select their preferred horror genre and choose the story length. GhostWriter then generates a unique story using an open-weight AI model.

Key Features

👻 AI-powered horror and ghost story generation.

🌙 Multiple genres, including supernatural horror, psychological horror, ghost mystery and dark folklore.

📖 Short, medium and long story options.

📋 Copy generated stories with one click.

🔄 Regenerate stories with the same idea.

🎨 A dark, mysterious and responsive user interface.

🔐 Browser-based AI inference without a paid AI API.

Demo

https://ghostwriter-blue.vercel.app/

Code

https://github.com/dev-suraj07/GhostWriter

How I Built It

I wanted to keep the project simple while making open-source AI the core of its functionality.

  1. HTML5

Used to create the structure of the application, including the story input form, genre selection, story length options and output section.

  1. CSS3

Used to create the haunted-library-inspired design with dark backgrounds, purple gradients, glowing effects, animations and responsive layouts.

  1. JavaScript

Handles user interactions, prompt creation, AI model loading, story generation, copying and regenerating stories.

Why Does Open Innovation Matter?

For me, open innovation means having the freedom to experiment, learn, modify and build without depending entirely on closed AI services.

I chose an open-weight model because I wanted to explore how AI could work directly inside a browser.

The Spirit of It

Halloween is all about mystery, imagination and stories that stay with us.

With GhostWriter, I wanted to bring that atmosphere into a small web application.

A forgotten railway station, an abandoned mansion or a mysterious voice coming from the darkness — sometimes a simple idea is enough to begin a story.

The machine may not have a soul, but it certainly knows how to create a little mystery. 👻

Prize Categories

Open-Source AI / Hacktoberfest Challenge.

Top comments (0)