examples
SvelteKit
examples | SvelteKit | |
---|---|---|
5 | 611 | |
892 | 17,733 | |
4.7% | 1.3% | |
8.7 | 9.8 | |
6 days ago | 3 days ago | |
TypeScript | JavaScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
examples
-
Using Remix or NextJS
Real time data update: Remix supports Server Sent Events e.g. https://github.com/remix-run/examples/tree/main/_official-realtime-app https://github.com/remix-run/remix/discussions/2622
-
Server Actions, databases, and the future of data handling
Check out the official Xata template in this Remix example.
-
Is React Router V6 over-engineered?
Combobox example (from remix but the code is the same - remix is just react-router running on the server rather than the browser)
-
Starchart: Playwright and Chakra UI Setup
Setting up Chakra UI was relatively simple. I followed their instructions for the most part. I also found this example to be really helpful. My process for this went like this: I looked at the instructions in Chakra UI docs for the client, server and root files, and compared them with the existing code in starchart. Then, I also referenced them against the example code.
-
Svelte CSS Image Slider: with Bouncy Overscroll
import { error } from '@sveltejs/kit'; import { createReadStream, statSync } from 'node:fs'; import type { Readable } from 'node:stream'; import { PassThrough } from 'node:stream'; import { join } from 'path'; import sharp from 'sharp'; import type { RequestHandler } from './$types'; async function metadata( source: string ): Promise<{ format?: string; width?: number; error?: string }> { try { const image = sharp(source); const { format, width } = await image.metadata(); if (format) { return { format, width }; } } catch (error: unknown) { console.error(`Error reading image metadata: ${source}: ${error}`); } return { error: `Error reading image metadata: ${source}` }; } function resize(imageStream: Readable, width: number, format: string): ReturnType { let sharpTransforms; switch (format) { case 'jpeg': sharpTransforms = sharp().resize(width).jpeg({ mozjpeg: true }); break; case 'avif': sharpTransforms = sharp().resize(width).avif({ quality: 80 }); break; case 'webp': sharpTransforms = sharp().resize(width).webp({ quality: 80 }); break; default: sharpTransforms = sharp(); } const passthroughStream = new PassThrough(); imageStream.pipe(sharpTransforms).pipe(passthroughStream); // @ts-expect-error respond with passthrough stream return new Response(passthroughStream as unknown); } // Based on: https://github.com/remix-run/examples/blob/main/image-resize/app/routes/assets/resize/%24.ts export const GET: RequestHandler = async function get({ params, url, setHeaders }) { try { const { filename } = params; const srcPath = join('src/assets', filename); const fileStat = statSync(srcPath); if (!fileStat) { throw error(404, 'Not found'); } const metadataPromise = metadata(srcPath); const readStream = createReadStream(srcPath); const { format, width } = await metadataPromise; if (!format || !readStream || !width) { throw error(404, 'Not found'); } const { searchParams } = url; const outputWidthString = searchParams.get('w'); const outputWidth = outputWidthString ? Math.min(parseInt(outputWidthString, 10), width) : width; const outputFormat = searchParams.get('format') ?? format; setHeaders({ 'Content-Type': `image/${outputFormat}`, 'Content-Disposition': `filename= ${filename.split('.')[0]}.${outputFormat}`, 'Cache-Control': 'public, max-age=31536000, immutable' }); return resize(readStream, outputWidth, outputFormat); } catch (err: unknown) { const httpError = err as { status: number; message: string }; if (httpError.status && httpError.message) { throw error(httpError.status, httpError.message); } const { pathname } = url; const message = `Error in load function for path "${pathname}": ${err as string}`; console.error(message); throw error(500, message); } };
SvelteKit
-
ChatCrafters - Chat with AI powered personas
Svelte Kit for the fullstack framework It has first class support for Cloudflare Pages Svelte is a very elegant framework, and Svelte Kit is a very good meta-framework for Svelte. Svelte was probably the reason that…
-
Fun, Beautiful, Printable 'Story Cards' for Kids with Cloudflare AI
This AI-powered Story Card Maker is built as a SvelteKit application with Typescript. Using Flowbite Svelte component library, the whole application was laid out. The layout for the Story Card (emulating the size of a postcard - 4" x 3") is created as an HTML Canvas using Fabric.js.
-
Image Generator with Cloudflare
Svelte kit
- Cannot CRUD cookies in SvelteKit from another port
-
The State of Angular SSR Deployment in 2024
These adapters, for example, were built by the community: https://github.com/sveltejs/kit/tree/master/packages/adapter-vercel https://github.com/nuxt/vercel-builder If somebody builds a working one for Angular Universal, we will gladly add it to our Framework Presets → https://vercel.com/docs/concepts/deployments/build-step#framework-preset.
-
AI for Web Devs: Deploying Your AI App to Production
UPDATE: If you liked this project and are curious to see what it might look like as a SvelteKit app, check out this blog post by Tim Smith where he converts this existing app over.
-
Ask HN: Looking for lightweight personal blogging platform
I've played around with several platforms in the last year or so. I've landed on the following setup that works very well for me and ticks all your boxes:
A SvelteKit[0] app hosted on Cloudflare pages. The repo is hosted on GitHub and hooked up to the Cloudflare Pages app [1]. On PRs, I get preview environments. On merge, the changes get deployed to my "production" website. I write blog posts and other content in markdown, which is then processed by mdsvex[2] with very minimal setup.
Mostly, my requirements were more focused around getting the actual framework, hosting, etc. out of my way so that I could focus on writing. Gatsby and Next.js were too configuration heavy and turned me off once I scratched beyond the surface.
[0] https://kit.svelte.dev/
-
Mini site for recommending songs using Svelte & Deno
Behind the scenes is a simple Sveltekit-powered server function to fetch a Spotify client token then find a user's recommendation playlist and its track information. A Deno edge function to performs this data fetch and renders server-side Svelte.
-
Removing React is just weakness leaving your codebase
It’s 2024, and you are about to start a new project. Do you reach for React, a framework you know and love or do you look at one of the other hot new frameworks like Astro, Enhance, 11ty, SvelteKit or gasp, plain vanilla Web Components?
-
CryptoFlow: Building a secure and scalable system with Axum and SvelteKit - Part 5
From part 0 to part 4, we built out CryptoFlow's backend service. Though we can quickly use Postman, VS Code's ThunderClient or automated tests to see the endpoints working easily, this isn't all we want. We want to actively interact with the backend service via some intuitive user interface. Also, a layman wouldn't be able to "consume" the service we've built in the last parts. This article introduces building out the user interface of the system. We will be using SvelteKit, a framework that streamlines web development, and TailwindCSS, the utility-first CSS framework. Let's dig in!
What are some alternatives?
epic-stack - This is a Full Stack app starter with the foundational things setup and configured for you to hit the ground running on your next EPIC idea.
Next.js - The React Framework
blues-stack - The Remix Stack for deploying to Fly with PostgreSQL, authentication, testing, linting, formatting, etc.
Nuxt.js - Nuxt is an intuitive and extendable way to create type-safe, performant and production-grade full-stack web apps and websites with Vue 3. [Moved to: https://github.com/nuxt/nuxt]
starchart - A self-serve tool for managing custom domains and certificates [Moved to: https://github.com/DevelopingSpace/starchart]
Express - Fast, unopinionated, minimalist web framework for node.
2022-css-day_oh-snap
astro - The web framework for content-driven websites. ⭐️ Star to support our work!
chakra-ui - ⚡️ Simple, Modular & Accessible UI Components for your React Applications
vite - Next generation frontend tooling. It's fast!
Playwright - Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
Svelte - Cybernetically enhanced web apps