DEV Community

Cover image for Phantom Logs: Turning 3:00 AM Server & Smart-Home Telemetry into Ghost Stories
Jayesh Jain
Jayesh Jain

Posted on AI-assisted

Phantom Logs: Turning 3:00 AM Server & Smart-Home Telemetry into Ghost Stories

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

Every developer and smart-home tinkerer knows that weird things happen inside our machines at 3:00 AM. A cron job fails with an unknown permission error, a hallway motion sensor triggers when everyone is asleep, or a zombie process refuses to die. Usually, we just clear the logs and move on.

For the "Ghost in the Machine" theme, I took the prompt literally and built Phantom Logs—a paranormal telemetry analyzer that transforms raw, boring server crashes, git commit histories, and smart-home sensor logs into a chilling gothic investigation.

When you paste your raw logs into the terminal interface, the AI acts as a Paranormal Systems Investigator and generates a structured 3-part incident report:

  1. Spectral Threat Level: Classifies the haunting based on the severity of your errors (e.g., "Class 4 Poltergeist in node_modules" or "Level 5 Silicon Possession").
  2. Possessed Telemetry Anomalies: Translates specific timestamps and error codes from your logs into eerie paranormal observations.
  3. What Happened While You Slept: Weaves the exact timestamps, file paths, and device triggers from your input into a two-paragraph ghost story detailing what walked through your file system in the dark.

Demo

(Click *"Load haunted 3:00 AM sample logs"** inside the app to test it immediately, or paste your own terminal output!)*


Code

The complete source code is public and open-source under the MIT License:

GitHub logo Jayesh-JainX / Phantom-Logs

Turn Boring 3:00 AM Server & Smart-Home Logs into a Chilling Ghost Story

đź‘» Phantom Logs

Turn Boring 3:00 AM Server & Smart-Home Logs into a Chilling Ghost Story

Live Demo


📸 Demo Preview

Phantom Logs Demo Screenshot

đź”— Try it Live: https://phantom-logs.vercel.app


🕯️ The Vibe

Every developer and smart-home owner has boring logs sitting around—like 3:00 AM git commit histories, crashed terminal outputs, or late-night smart-home sensor events ([02:14 AM] Living Room Motion Detected).

What if those glitches weren't bugs, but something lurking inside your machine?

đź”® How It Works

  1. Paste Your Logs: Drop in raw terminal output, git history, or smart-home activity (or click "Load haunted 3:00 AM sample logs" to test it instantly).
  2. Optional Quick-Redact: Scrub sensitive IPs and secret keys with one click right in your browser.
  3. Uncover the Haunting: Our AI Paranormal Systems Investigator reads the exact timestamps and error codes to generate a complete Paranormal Incident Report
    • 🚨 Spectral Threat Level: A spooky classification rating (e.g., "Class 4 Poltergeist in…

How I Built It

Phantom Logs is engineered around a strict, stateless full-stack architecture:

  • Frontend: Built with Next.js, Tailwind CSS, and Lucide React, styled in an atmospheric dark-mode terminal palette (deep obsidian, glowing spectral purple, and crimson alert badges).
  • Backend: A decoupled Node.js and Express server operating entirely in-memory with zero database persistence.
  • Open-Source AI Core: The backend routes requests through OpenRouter to open-weight models (nvidia/nemotron-3.5-super-vl:free / meta-llama/llama-3.1-8b-instruct:free).
  • 3-Layer Resilient JSON Extraction: Open-weight and reasoning models occasionally wrap JSON output in conversational text, <think> blocks, or markdown fences—or reject strict response_format headers altogether. To keep the frontend UI bulletproof, I built a 3-layer fallback parser in the backend:
    1. Layer 1: Strips reasoning tags and attempts standard JSON.parse().
    2. Layer 2 (Boundary Extraction): Dynamically locates the outermost { and } brackets, sanitizes unescaped control characters, and extracts the JSON payload.
    3. Layer 3 (Aggressive Regex Fallback): If the model truncates mid-sentence, custom regular expressions extract threat_level, anomalies, and story directly from the broken text stream so the UI never crashes.

Why Does Open Innovation Matter?

System logs and smart-home telemetry are among the most sensitive data footprints we generate:

  • Server and Git logs contain internal file paths, IP addresses, environment structures, and proprietary module names.
  • Smart-home sensor logs reveal exact physical routines—when doors unlock, when motion is detected in the living room, and when a household is asleep.

Pasting raw server telemetry or home automation logs into a closed commercial API is a massive security and privacy risk, as closed platforms log prompts and harvest user inputs for corporate model training.

Open innovation makes Phantom Logs safe to actually use:

  1. Zero Data Retention (Stateless RAM Purge): By pairing open-weight models with a zero-database Node.js backend, your logs exist in temporary memory for a few seconds during inference and are immediately exorcised the moment your story renders.
  2. Unfiltered Creative Persona: Closed frontier models are heavily sanitized for corporate neutrality and frequently break character when prompted to act "possessed" or sinister. Open-weight models allow full control over system prompts and temperature (0.4), letting the gothic storyteller persona shine without corporate guardrails watering down the atmosphere.

The Spirit of It

While testing the app late at night, I fed it a mix of a failed cron backup daemon and a smart-thermostat temperature drop at 02:14:09 AM.

Watching the terminal indicator pulse "Scanning timestamps for ectoplasmic anomalies..." and return a story describing how an unknown_entity locked the backup daemon from the inside while draining the heat from the living room to cool down the silicon genuinely gave me chills. It turned routine debugging telemetry into a campfire story—and made me look twice at my terminal before shutting my laptop for the night.

Top comments (0)