sveltekit-data-fetching Svelte Themes

Sveltekit Data Fetching

A sample repo showing off different ways/places to fetch data in sveltekit

SvelteKit Data Fetching Example

VIDEO: https://youtu.be/j9Wf_nyKin4

To replicate this project locally you will need a free turso account for the database

Getting Started

  1. Clone the repo
  2. Install the deps with bun install
  3. Fill in your .env with you turso creds (https://docs.turso.tech/quickstart), filling in:
DATABASE_AUTH_TOKEN="..."
DATABASE_URL="libsql://..."
  1. Push your schema bunx drizzle-kit push
  2. Fill in some fake data from the turso console if you want to
  3. Start the dev server bun run dev

Diagrams from Video

Ways to fetch data:

Data and rendering trees:

Top categories

Loading Svelte Themes