Hacker News new | past | comments | ask | show | jobs | submit login

I was one half of a team that heavily leveraged XState in 2020. We used it to build a general-purpose kiosk app (in Electron) that could be updated remotely using an Xstate configuration served by a graphene-django app. One of the most technically impressive pieces of software I've ever had the pleasure to work on. (I mostly did server/backend stuff).

The entire kiosk device could be repurposed on the fly and Xstate + JSON schema form allowed for completely customizable & swappable UI.

Shame the project died.




I'm also exploring xstate for a similar use case and would love to know more about your experience with it. I'm particularly interested in understanding the level of customizability you allowed in your implementation.

My use case involves implementing various user flows in my app and I'm currently weighing the benefits of using xstate versus react-router.

Also, I'm curious about how you integrated graphql into this project. Could you share some details on that?

Lastly, I wanted to ask if you stored all the different configurations on a database or on git? If you used a database, how did you manage different schema versions?


Direct from the mouth of the other half of the team:

We used Xstate over react-router by using a parallel machine:

- One for application state - One for view state

We had to hack the innards of the events a bit to get the two machines to communicate. This allowed the view to re-render the jsonschema form at the exact right time, and not flicker on multiple state transitions.

In hindsight, graphql wasn’t as necessary as we initially thought. The important part was storing the mutation as a string as an xstate transition parameter. We used federation, so it did help us deal with multiple backends.

All database. Versions were handled by having a core machine that pulled the kiosk’s workflow from the server and ran it as a submachine. So the code on the device (core machine) could switch sub machine workflows on the fly between runs.


Sounds awesome, given it died could you publish the source? Would be great to see how something like this is structured.


Unfortunately no. It was proprietary.

(we pushed to open source the guts, but to no avail)

Both of us reminisce about it though. We literally retooled the fleet of devices in a weekend to adapt to COVID and it worked. We interfaced with tons of hardware and even ran a customized debian image, all powered by RPis. Truly a nerd's dream project.


We're currently building something that sounds superficially similar, would you be interested in having a chat?


Sure. Check bio. Email in blog's about page.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: