Dynamic Catastrophe

Dynamic Catastrophe

An AI-powered interactive flowchart experience exploring complex decision-making and ethical dilemmas.

Every day, we are bombarded with complex decisions, ethical dilemmas, and a constant stream of global crises. To visualize this overwhelming reality, I built Dynamic Catastrophe: an AI-powered web application that turns any user-defined topic into an interactive, confrontational flowchart. Inspired by Andrew Boyd's book "I Want a Better Catastrophe", the project takes the concept of navigating societal collapse and adds a generative twist. Instead of exploring a pre-written static map, an AI crafts a personalized existential crisis in real-time.

Dynamic Catastrophe Flowchart Preview

The core experience is designed to be engaging, thought-provoking, and slightly unforgiving. After you enter a topic, a Large Language Model generates a customized, branching narrative filled with moral conflicts, psychological traps, and sarcastic observations. To keep the tension high and prevent users from simply skimming to the end, I implemented a "Fog of War" mechanic. Future paths and consequences remain completely hidden from the canvas. New nodes only reveal themselves after you make a conscious choice, forcing you to actively engage with the narrative step by step.

Grid Image 1Grid Image 2Grid Image 3

Behind the scenes, the application is built with Next.js and utilizes xyflow/react to render the interactive canvas. The biggest technical hurdle was taming the non-deterministic nature of LLMs. Through extensive prompt engineering via LiteLLM, the AI is forced to return a strictly structured, playable graph consisting of exactly 15 interconnected nodes—without dead ends or broken loops. A custom parser then translates this raw data into modular React components, while automatically adapting the visual atmosphere using dynamically assigned color themes like Toxic, Fallout, or Abyss.

Themes

Ultimately, Dynamic Catastrophe is an experiment in using generative AI not just as a tool for productivity, but as a mirror for self-reflection. It provides a safe, virtual space to explore the consequences of our choices and confront the hard truths of any given topic, while wrapping the entire experience in a modern, highly interactive web interface.