DEV Community

Cover image for πŸ’€ Inside BugMortem: Building a Cyber-Gothic Digital Morgue for Production Crashes with Kiro
Adam Gierczak
Adam Gierczak

Posted on

πŸ’€ Inside BugMortem: Building a Cyber-Gothic Digital Morgue for Production Crashes with Kiro

Every software engineer and Site Reliability Engineer (SRE) knows that cold, paralyzing dread: it’s 3:17 AM, PagerDuty is sounding alarms like an air-raid siren, the monitoring dashboard is flatlining at 0 BPM, and the terminal is vomiting thousands of incomprehensible red stack traces.

Most post-mortem tools treat catastrophic production outages like boring administrative chores β€” spreadsheets, sterile ticketing forms, and tedious retrospectives.

For the Kiroween {2026} Hackathon (Costume Contest: Spooky & Distinctive Developer Tools track), I set out to flip that dynamic completely.

Meet BugMortem β€” an interactive, cyber-gothic digital morgue and automated forensic report generator for catastrophic software failures.


⚑ What is BugMortem?

BugMortem transforms real software catastrophes into a forensic, surgical investigation:

  1. Flatline HUD & ECG Monitor: A cybernetic emergency room interface with audio-visual flatline cues, vitals monitoring, and instant incident severity classification (P0 Critical / P1 Major).
  2. The 4 Canonical Nightmares: Preloaded, forensic deep-dives into industry-standard software horrors:
    • React SSR / Next.js: Hydration Mismatch Nightmare (P0) β€” DOM tree divergence caused by illegal client-only browser state accessed during server render.
    • Node.js Heap: Silent Memory Leak & Linux OOM Killer 137 (P0) β€” Dangling EventEmitter closures retaining 4GB+ until the OS kernel sends SIGKILL.
    • HTTP Handshake: CORS & Auth Headers Preflight Massacre (P1) β€” Unhandled OPTIONS preflight cascades breaking SPAs on cross-domain APIs.
    • PostgreSQL / Prisma: Connection Pool Starvation (P1) β€” Leaked database connections locking payment checkouts under high concurrency.
  3. Forensic Timeline of Doom: Chronological reconstruction of the fatal seconds and telemetry alerts leading up to the collapse.
  4. Side-by-Side Code Autopsy: Direct juxtaposition of the cursed code against the resurrected, safe SRE solution β€” complete with 1-click clipboard copy.
  5. Custom Incident Ingestion (Live Morgue Intake): An interactive intake form allowing teams to paste their own real-world crash logs, select severity, and auto-generate an incident protocol.
  6. 1-Click SRE Incident Protocol Exporter: Instant export to standardized, professional Markdown (.md) formatted for Jira, Confluence, and GitHub Issues.

πŸ—οΈ Technical Architecture & Ironclad Rules

BugMortem was engineered using modern web standards without sacrificing UX performance or accessibility:

  • Framework: Next.js 16.4 App Router, TypeScript 5.9, Turbopack, and pnpm.
  • Styling & Theme: Tailwind CSS v4 with custom dark/light cyber-morgue tokens (@variant dark) and zero inline-styles.
  • Pure i18n Architecture: Complete bilingual support (English default for Kiroween judges + Polish) driven by modular dictionaries (src/i18n/locales/en.ts and pl.ts). Zero hardcoded UI strings β€” 100% dynamic token resolution via typed hooks.
  • Advanced Polish & Typography Polish: Automated non-breaking space insertion (text-wrap: pretty;) to eliminate ugly hanging single-letter conjunctions on mobile viewports.
  • Zero Bloat & Mobile-First: Responsive forensic layout engineered from 320px screens to ultra-wide 4K workstations.

πŸ€– Architected for Kiro: Specifications as Code (/.kiro)

One of the most powerful requirements of the Kiroween hackathon was embracing Kiro β€” an agentic development paradigm driven by formal project specifications.

Instead of writing code blindly, the BugMortem codebase was structured around dedicated Kiro steering directories tracked in Git:


text
bugmortem/
β”œβ”€β”€ .kiro/
β”‚   β”œβ”€β”€ specs/bugmortem/
β”‚   β”‚   β”œβ”€β”€ requirements.md   # Formal functional/non-functional criteria
β”‚   β”‚   └── tasks.md          # Step-by-step verified roadmap
β”‚   └── steering/
β”‚       └── rules.md          # Strict architectural invariants
Enter fullscreen mode Exit fullscreen mode

Top comments (0)