Show HN: Browser based state machine simulator and visualizer

Community tries to brew coffee in a browser—hits 404, then gets XState vibes

TLDR: A browser demo visualizes a coffee machine’s steps, but the initial link was a 404 until a commenter fixed it. The thread turned into comparisons with [Stately’s XState viz](https://stately.ai/viz), capped by XState’s creator’s approval, sparking playful debate over originality versus homage — and why simple tools still matter.

Show HN promised a browser toy that lets you “see” how an app moves through steps — using a playful Coffee Machine that tracks water, beans, cups, and revenue. But the first taste? 404. Commenter smusamashah sounded the alarm (“I get a 404 immediately”) and promptly served a fix, dropping the right link: svylabs.github.io/smacthat. Cue the caffeine jokes: “No espresso until debugging,” “404 before coffee,” and a collective chuckle as the demo finally poured.

Then came the XState vibes. steve_adams_86 nodded to the popular state-machine tool, pointing to Stately’s visualizer and essentially saying, “Love this, feels familiar.” And in a plot twist, davidkpiano — the creator of XState — popped in with a grin: “Love the XState-inspired API ;-)”. Half the crowd took it as a blessing, half as a “we’ve seen this” nudge. That sparked a friendly debate: Is this a cute learning tool or just a remix of an existing classic? For non-nerds: a “state machine” is basically a smart flowchart that keeps an app from getting confused — like making sure your coffee only brews if there’s water and beans. Today’s drama: from broken link to tech royalty cameo — and yes, Hacker News delivered chaos and laughs.

Key Points

  • The article presents a browser-based state machine simulator and visualizer.
  • An example configuration, “Coffee Machine Simulator,” has id “coffee-machine” and initialState “idle.”
  • Context tracks resources: water=100, beans=100, cups=5, and totalRevenue=0.
  • The SELECT_ESPRESSO event transitions from “idle” to “brewing” and updates water, beans, cups, and revenue.
  • Additional labeled operations include Latte (40% Water, 15% Beans), Refill All, and Coffee Ready.

Hottest takes

"I get a 404 immediately" — smusamashah
"The configuration reminds me a lot of XState" — steve_adams_86
"Love the XState-inspired API ;-)" — davidkpiano
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.