This is a basic experiment with Svelte and event sourcing.
Borrowing naming from Elm:
Events -> Update -> Model -> View
User interaction fires events, which are reduced into a model state, and the view is a function of this state.
For each component
events.ts store the event types that can be published.reducer.ts creates an instance of createEventSourcedState, which links events to the reducer and populates the state.{Component}.svelte creates a view based on the state, and any user interactions publish events to the event store.Install node with mise install
Activate mise shell with eval "$(mise activate)"
npm run install
npm run dev