Svelte 5 runes, component patterns, reactivity, and SvelteKit data loading best practices
99
99%
Does it follow best practices?
Impact
99%
1.11xAverage score across 10 eval scenarios
Passed
No known issues
A small e-commerce startup is building a product browsing page with a shopping cart sidebar. The engineering team needs a reusable Svelte 5 component that manages cart state: items can be added, removed, or have their quantities updated. The component must display a running total, the count of unique items, and flag when the cart exceeds a configurable maximum item count.
The team recently migrated their codebase from Svelte 4 and wants the new component written entirely using Svelte 5 conventions. The component will consume a static list of available products passed in from the outside, and expose a callback so the parent can react when the user checks out.
A large product catalog (the full inventory JSON, potentially thousands of entries) is sometimes passed in for search/filter purposes, but it is always replaced as a whole rather than mutated item-by-item.
Produce a single file: CartManager.svelte
The component should:
Also produce a notes.md file briefly explaining the reactivity approach and which rune was chosen for each piece of state and why.
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
skills
svelte-best-practices