sveltekit eventsourced funnel - demonstates how to build sveltekit app with event sourcing via the sourced lib and svelte stores backed by local storage
This article discusses a project called “sveltekit-eventsourced-funnel” which showcases the creation of a SvelteKit project using event sourcing. The project demonstrates several key features, including the use of Plain Old JavaScript Object (POJOs) for event sourced models, the implementation of the repository pattern for persistence using local storage, and the separation of logic from components. The article also mentions the inclusion of Tailwind with a JIT compiler for easy UI copying and pasting. The project itself is a marketing and sales funnel, where each step is represented as a route in the application. The Funnel model, located in the src/lib/models/Funnel.js file, contains the main logic of the application. The article mentions that the project has been bootstrapped with create-svelte and provides further reading resources on event sourcing.
To install the “sveltekit-eventsourced-funnel” project, follow these steps:
Clone the project repository:
git clone <repository_url>
Navigate to the project directory:
cd sveltekit-eventsourced-funnel
Install the project dependencies:
npm install
Start the development server:
npm run dev
Access the project in your browser at the specified URL.
The “sveltekit-eventsourced-funnel” project demonstrates the implementation of event sourcing in a SvelteKit project. It showcases the use of POJOs for event sourced models and the repository pattern for persistence using local storage. The separation of logic from components allows for easy integration of additional functionality through event hooks. The project also includes Tailwind with a JIT compiler for convenient UI component copying. This project serves as a useful example for developers looking to create SvelteKit projects with event sourcing.