4 ms·
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 usi
by sonicrocketman 4y ago
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.
- jrvarela56 4y agoSounds awesome, given it died could you publish the source? Would be great to see how something like this is structured.
- sonicrocketman 4y agoUnfortunately 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.
- jjclane 4y agoWe're currently building something that sounds superficially similar, would you be interested in having a chat?
- sonicrocketman 4y agoSure. Check bio. Email in blog's about page.
- yagodragon 4y agoI'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?
- sonicrocketman 4y agoDirect 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.