Devessier / xstatebyexample

Collection of state machines with interactive examples
https://xstatebyexample.com
MIT License
39 stars 0 forks source link

Idea: A whole API or a backend service #8

Open a-y-u-s-h opened 5 months ago

a-y-u-s-h commented 5 months ago

How about modelling backend processes (express as the event source and statechart as the backend functionality - server side authentication, authorization, database interactions, security checks, etc). Good job on the product the way.

Devessier commented 5 months ago

Thank you a lot, @a-y-u-s-h, for raising this issue!

Do you have a specific example in mind? What would it look like on the website?

a-y-u-s-h commented 5 months ago

From frontend's point of view, it could be as simple as a promise executing for a call and then showing a response, or it could be a flow - like credit checking flow - except the frontend machine will look different (navigation + making API calls) and backend machine will look different (starting from listening from requests to various things that that Gavin demonstrated in the video I linked above). But feel free to take in simpler similar examples as well. A full backend might go in advanced section.

Devessier commented 5 months ago

Thanks a lot, @a-y-u-s-h. I added these examples to my list of ideas. I will think about that carefully and come back with something great (I hope)! 😄

Do you have other ideas? Maybe more front-end focused? Your feedback is precious to me!

a-y-u-s-h commented 5 months ago

There are some on Xstate Catalogue. I'll let you know as I recollect more. You can also try to create component statecharts (like Ark UI does).