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 SaaS analytics company needs a dashboard page built with Svelte 5 and SvelteKit. The page displays metric widgets and allows users to filter data.
The main dashboard page at /dashboard loads metric data from the server. It has:
MetricCard component that wraps content in a styled card. It accepts a title, an optional header area, and default body content from the parent. The card also has a "Refresh" button that calls a parent-provided callback.The team wants all components written in idiomatic Svelte 5 with TypeScript. They want to ensure the composition approach uses the modern API (not slots), and that the filtering is done with derived values (not legacy reactive declarations).
Produce the following files:
src/routes/dashboard/+page.server.ts -- loads metric data from serversrc/routes/dashboard/+page.svelte -- dashboard page with filter bar and metric cardssrc/lib/components/MetricCard.svelte -- card wrapper componentThe API can be simulated -- use https://jsonplaceholder.typicode.com/posts as the data source, treating each post as a metric record. Write the files as they would appear in a working Svelte 5 SvelteKit project.
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
skills
svelte-best-practices