Examples
In this page, we list the official examples in the main repository. Feel free to ask more, creating an Issue or a Pull Request example.
Random quote
This examples is a good starting point to understand how SeqFlow works: it fetches a random quote from an API and shows it in the application. The user can click on the button to fetch a new quote.
The Get Started tutorial is built on top of this example. The tutorial is available here. The final code is available here.
In the tutorial, you will learn how to:
- create a new SeqFlow application
- create components
- split your logic into domains
- handle events
- perform async operation like data fetching from an HTTP API
Counter
Even if we don't believe that no one will create a Counter application for production, it is a common example of other frameworks. This project shows a simple counter that can be incremented or decremented. There is also a form to set the counter to a specific value.
This is a good example to start with SeqFlow, showing how you can structure an application into domains and how the application handles events.
The code is available here.
E-Commerce
This is a complex example where multiple domains interact each other. In this example, a simple e-commerce website shows a list of products, the user can log in and add/remove products to/from the cart and can also place an order. In this example, there's also a simple router that handles the navigation between the pages.
The code is available here.
Counter with custom element
SeqFlow supports custom elements and it is easy to build a custom element from existing applications. This example shows how to create a custom element using SeqFlow.
The code is available here.