This is a practical project that demonstrates how to implement a State Machine using Java.
The example simulates a pizza order flow, going through states like ORDER_RECEIVED, PREPARING, ASSEMBLING, and BAKING, until reaching READY or being CANCELLED.
- raw-statemachine: Manual implementation, no frameworks.
- fw-statemachine: Implementation using Spring StateMachine-Framework.
📌 Check the README.md of each module for more details.
This project is part of a video series on my YouTube channel, aiming to:
- Teach the concept of state machines
- Show how to implement them manually
- Demonstrate how Spring can help simplify the setup and transitions
-
Implementing a State-Machine manually in Java (No Frameworks)
-
This Spring Framework Is RARELY Used – And EXTREMELY Powerful | Spring State Machine in Practice!
I'm Gabriel, a backend developer passionate about bringing ideas to life through code! Also a big fan of coffee ☕ and a good TV series 🎬.
🔗 Connect with me: LinkedIn, Twitter | 📺 Subscribe: YouTube Channel
➡️ If this project or the series helped you in any way, consider ⭐️ starring the repo and subscribing to the channel!
You can also:
- 🍕 Share it with other devs who want to learn about state machines
- 💬 Drop your feedback or suggestions — I'm always open to new ideas
- 📢 Tag me on LinkedIn if you implement your own version — I’d love to see it

