ACA
Convex Community2mo ago
5 replies
AC

Server Side XState in Convex Demo

This is a demo modelling a real-time, in-person live auction house.

It is built on server-side XState state machines in Convex. Xstate is normally thought of as a client side library but it can work in Convex with a restricted model,

I'm sure there is a catch, but -- coding agents seemed to whip this up with no problem, whereas other approaches go around in circles. It seems quite robust. Scaling is probably another question.

If there is interest I could publish a library or blog post.


https://www.loom.com/share/b253253c828d42379a778cbb1aea4a87


Hosted at:
https://convex-xstate-ui.vercel.app

Note this is purposefully one shared state for all, everyone else will see exactly the same thing.
Loom
In this video, I demonstrate a stress test of using XState in Convex for a live auction scenario, showcasing real-time bidding and state management challenges. I illustrate how both human participants and a simulated AI bot interact in the auction, highlighting features like bid increments and auction pausing. I also discuss the benefits of usin...
Stress Testing State Management in Real-Time Auctions with XState a...
Was this page helpful?