Sveltekit use cases reddit. svelte is ugly, yet +page.

Sveltekit use cases reddit I use it as my main back end with API routes and use those endpoints to contact other services that my site uses. Did you figure out the Supabase integration by the way? If you did something better, I would like to know. However, I'm wondering if the same setup is required for hosting SvelteKit applications. Sveltekit uses vite, and there are quite a few teething issues you can see on other posts here. E. Sveltekit is great for greenfields, but pretty hard to use when transitioning a large existing application. the routes folder is a good place. Understanding the practical use cases and seeing real-world examples of applications built with Svelte and SvelteKit can help you evaluate their suitability for your projects. Hosted on simple nodejs hosting without any issues. I'd like to create a single connection to my database from the SvelteKit backend like I would on my Fastify backend which serves the endpoints, but I cannot find an answer for that. basic CRUD to a db, with examples of where to The following are dockerfiles that could be used to build sveltekit apps images using different adapters. Or As a Java dev learning Svelte/SvelteKit, very used to using javadocs, etc. I would love to have the official router separated from sveltekit for SPA, they just say “use any js router available out there” but sometimes is a pain in the ass to use a backend other than node (with sveltekit), I need to use a golang backend for performance issues and it’s just easier with other frameworks like react. SvelteKit offers hybrid rendering options, easy progressive enhancement, data loaders, server actions, and api routes. You get to choose what you share, with whom, and how. You can check the demo here: https://demo-svelte-shortener. SvelteKit doesn’t support this natively, but this could be added / simulated by writing some extra JS code. There are Material UI and Bootstrap CSS packages to get you going fast. SvelteKit is like that sauce you put on the end that makes everything taste as good as it Knowing only js, I developed many apps with sveltekit and the learning curve is about 2 days. If it’s run on an azure server, a lot of companies would already have customer data on them as a trusted partner. Would Svelte (or Sveltekit) + Supabase be able to handle the scheduled tasks and external API calls or do I need to have Express/Node backend to do this? Svelte is a radical new approach to building user interfaces. I did use Astro+Svelte AND moved 2 projects from SvelteKit to Astro. However you still likely need to pull in some extra goodies, but it is impossible to answer this question Between the svelte. Of course you can come up with examples where I would probably not use it, but the point of a full-stack framework like SvelteKit is that you can use it full stack. Whereas traditional frameworks like React and Vue do the bulk of their work in the browser, Svelte shifts that work into a compile step that happens when you build your app. I was facing another issue with Supabase when testing from my mobile locally (by accessing 192. Hello. The additional compilation step is well worth the benefits TS brings to the table even for library authors like myself. Can anyone shed some light on whether I need to use Nginx with SvelteKit, or if I can skip it altogether? Use SvelteKit to learn Svelte. Every large enterprise has an agreement with AWS, Azure or Google for cloud hosting of data, and has had them go through the approvals to ensure that If you are planning to use SvelteKit for the front, you need to compile the site statically. I don't need the backend stuff and feel overwhelmed with all the extra stuff you get. Depending on the use case, SvelteKit backend itself might be enough and likely is enough. Thanks. server. App state is leaking through tests. Please read till the end. In some use cases, your main page can be designed to function without Firebase having to be initialized. Unit testing of SvelteKit Form Actions . Now that I’ve converted to SvelteKit, I find it very hard to go back to Vue. My The buildchain is still largely in flux and full of undocumented gotchas. If you're familiar with , SvelteKit is Sapper's successor. Basically, i'm running docker-compose to spin up a postgresdb and want to use node-postgres to connect to it. 168. I automatically call the respective fastapi endpoint from SvelteKit when it detects a . I still use endpoints for receiving I'm looking for the tools, packages or anything else that the Svelte community is using or would be using the next year to create web apps. It’ll configure the sveltekit app for you so that you don’t have to do anything. g blog, I built several projects in SvelteKit and come up with a tech stack that works very good! Background jobs = Graphile Worker Front-end = SvelteKit Back-end = SvelteKit API routes ORM = Drizzle + PostgreSQL How was your experience with similar tech stack or what are the other tools you guys use? We use vanilla svelte (and a routing lib) in our embedded SPAs for our desktop apps, and also for web apps with our own . Or check it out in the app stores SvelteKit: Use local database in the browser . And of course TS can express so much more. When you're ready, jump into SvelteKit routing, make a simple route and use your Svelte knowledge for making the new page visually appealing. In those cases, take a look at u/testokaiser answer (what a username! :) ). 0 yet I believe) and now that we're getting signals the allure of Admittedly, I don't think SvelteKit is a good framework for developers that want to learn web development. Svelte is particularly well-suited for: Small to Medium-sized Projects: If you want to make SvelteKit accessible to newbies, it may be necessary to either compile a list of especially helpful articles or else add best practices to the SvelteKit docs. I came from Ruby on Rails + AngularJS (1. I personally think it's silly to use SvelteKit just for the routing. While this might not be the typical use case, I would not (yet?) use SvelteKit for anything outside a standalone web site, and only if you don't have other types of backends. For me, Astro is great for: simple content-focused site, e. Svelte and sveltekit was best in this Yep. It can be hosted for free, and it is open-source. Keep feeling I’m missing something dumb about how to read JS/TS/Svelte etc docs which is not the case here Get the Reddit app Scan this QR code to download the app now. Learning curve 2weeks+ and still feel I am using state management wrong. You'll have to use some library for routing if you need to do that. ts. I think your post is unfortunately poorly informed and in general shows a misunderstanding of frontend frameworks, because every frontend framework has a bunch of caveats and footguns to reconciliate SSR with client I use django for a rest / graphql api, and sveltekit as my frontend. SvelteKit is already doing some things around this to enable similar developer experience (like streaming responses). I find it amusing the author also thinks __layout. So, I still must use Sveltekit? It's basically a drop-in replacement for most use cases. Personally I feel Tailwind was created to solve problems with the difficulties in React world and styling React components, and is less needed for Svelte as HTML, CSS ja JS all travel in the same file. radix-svelte was created as an attempt to port radix-ui to svelte, but it was abandoned because the radix-ui approach was not well suited for svelte. Any argument saying otherwise is outdated or biased. Hence we immediately decided to switch to rest api as for ecommerce apps No, you don't need to do this in +page. Secret Network's unique functionality helps secure decentralized applications and unlocks hundreds of never-before-possible use cases for Web3. Leaving SvelteKit was actually a bummer, I don't think there's anything you can do in Astro+Svelte but can't in SvelteKit, if not even easier. and understand the problem they solve, you'll be able to place most of SvelteKit's offerings and understand its goals, without much overhead or cognitive load. So you can just use "export let data" on your page. SvelteKit is the official framework for Svelte that pairs Svelte components/tools with routing, server-side rendering, form handling, endpoints, deployment tools, and tons more to make it easy to build a full I'm relatively new to SvelteKit, I've worked with React in the past and for those projects, I typically utilized Nginx in conjunction with Express. I've written both Svelte and Sveltekit apps and I more or less disagree with the main change around routing and magic files starting with runes (+). js modules. This makes tests extremely fragile, prone to cascading failures. I have a complex SvelteKit Form Action, where I want to use unit testing (vitest) to ensure that all edge cases are handled correctly. when something is not shared (domain specific) is should reside in its domain. As my site grows I’m concerned we may have to implement hacks to achieve what we want with the current api. The only reason to go without SvelteKit is if you already Sveltekit is nice for most crud usecases for sure. svelte littered all over the code base is just fine. Installation of packages and script running were much faster for me. Partly it was due to me not being used to the syntax, but much bigger part is the ugliness and clunkiness of JSDoc. Using Node/Auto Adapter Create a Dockerfile with the following content: Channels and being able to send arbitrary events to those channels are my most important use cases but it's not clear to me how I would implement them using this library. There's support for several light and dark themes built in. It depends on what you want. It might be fine for certain use cases, but I don't think you can go wrong with sessions, which makes it a better choice for a general use library. Personally I am not fully sold on RSC because of their custom "wire format" and because it seems a bit antithetical to classic web standards - for example, how would you efficiently cache RSC pages in something like Varnish or CloudFront? I use it paired with trpc-sveltekit. Not just it, but it also seems different, yes as we code, we get used to it, but I am writing this to point you that I never felt this way with svelte or sveltekit. As soon as I started with SvelteKit I realized that an authentication library would be great to have, which can cover all your use-cases for third-party and first-party auth. That being said, SSR is not necessarily appropriate for every use case, which is why SvelteKit lets you disable it. Analog and Next respectively offer some of those features, but not all. For the backend, I used Pocketbase. x was EOL'ed), I was going to go with Vue before I stumbled on Rich's video. The reason was that we needed partial hydration. That said, there are some advantages. Hey. If you want to take advantage of other SvelteKit features like SSR, then it makes more sense, otherwise, vanilla Svelte is more than sufficient for building an SPA, especially if you already have a backend/are an experienced backend developer and standing But for some use cases, it could be not optimal or overkill, yes. It’s flexible so you can use it whichever way serves your use case best. Is it better than REST? Yes! Svelte is a radical new approach to building user interfaces. ts then your client and server will make the fetch request. I tried to use JSDoc for VSCode extension and man was it pain. Mind you, I've written several express/handlebars websites If you are searching google on how to do supabase auth in sveltekit, welcome. Even with SSR disabled, using SvelteKit's load functions means it can fetch data as quickly as possible when routing to a new page, instead of waiting for the entire component tree to finish rendering. NET based backends and microservices. Agree on rolling your own custom application framework, we are just choosing to leave the initial page render and auth to MVC, a very established app framework fasthttp, which is used by fiber, is faster in very specific conditions only, but it is a complete reimplementation of the HTTP protocol that is not compatible with Go's stdlib and isn't even a full implementation of the HTTP spec, with some edge cases maybe being left unhandled. I migrated my Svelte apps with express backends to Sveltekit and haven't looked back. They probably show "import {page}" in the sample code because that will work in a component, layout or page, while "export let data" will only work on a page. Hello, I am using SvelteKit for a project of mine and am wonder what is a good way to import and use svgs in it? I've been [EDIT] Thanks to the very helpful and detailed answers I received, I realise that dynamic routes and endpoint are not at all mutually exclusive. When I thought about building a web version of the book, SvelteJS is a modern JavaScript framework designed for the development of user interfaces. I had no experience in any of those tools and it was awesome experience for me. There isn't really a holy grail of web dev. Secret Network is the first L1 blockchain with customizable privacy. I don't know about performance but I don't see why you couldn't just use sveltekit for your backend with a non-sveltekit svelte app even if you can't/don't want to use it for You don't have to run a separate node server for SvelteKit, you can use the SvelteKit +server routes, the reason there's Kit in SvelteKit. I started using SvelteKit before form actions were a thing, so it took me a little bit to convert my apps over to form actions from endpoints, but at this point they are my default for frontend -> backend communication. I understand that SvelteKit is equivalent to React-NextJs, right? What if I dont wanna use SSR features, I still need to use Sveltekit? In my case, a SPA will do the job, and I dont wanna handle the things related to deploying a SSR app, I just wanna some client-side bundle (html, css and js) as a output. Neither Angular nor react offers any of that. Having said that, having everything together may not be a good thing for larger apps or teams as there are many cases when you want the front and back end code to be managed separately. Just hopping on and off frameworks according to your liking will never bring you the satisfaction of understanding the intricate aspects of the system and knowing the use cases. Alpine is for client-side reactivity (effects, easily adding event listeners, managing local state), while HTMX is for swapping out page fragments from server responses (so like server-side reactivity). I've been looking, but the examples and posts about using SvelteKit to create full-stack apps seem to be out I have really fallen in love with Svelte and SvelteKit. vercel. x) before using Svelte/Sveltekit. 32 votes, 27 comments. I used to be all team Vue, but haven't been able to work with it in a while since I use React at work and Svelte has been so good I keep using it in new side projects. In this case, we started the project with Bootstrap and then migrated away to custom components. The current state of web dev is like when you start cooking something and it goes a little wrong and then everything spills everywhere but you just keep throwing ingredients in to make up for it, scooping things off the floor before counting to 5, etc. I also understand these will bring very useful use cases and improvements but I feel we have find a I won't rewrite it, but I agree with you that SvelteKit covers 80% of the use cases and definitely used by 90% of the Svelte devs out there, indeed in many interviews I have done to select candidates many just thought that SvelteKit is If you want to build a social media app or some AI app then you would use SvelteKit. Stores in SvelteKit are only required in extremely special cases such as when you have some sort of realtime data streaming where load functions don't fit in well. SvelteKit represents extra overhead and an extra headaches for my usecase. this applies to location as well. If you deploy to Vercel, you need to use the “vercel adapter”. The folks who created radix-svelte are now working on I am a little surprised about the pushback on using SvelteKit in a backend only project. Yes I have used GraphQL with Sveltekit for my ecommerce application and surprisingly the sveltekit app bundle size was 1MB and the graphql files alone sum up to 1. It's also impossible to reproduce some use cases. Svelte by itself has a very narrow use-case in production, and works best for those with custom implementations and specific use cases. It's a really good port; all of the svelte stuff like bind:toggled, custom Svelte events, etc. You'll still get your menus, banners, and any other static assets via SSR. g. However for one of the projects I was forced to use Nextjs because of React-fiber Drei threejs components which are not ported all to svelte. There's no good reason to use it as a default. Which includes frontend-only and backend-only use cases. js (formerly nextauth) with django simplejwt and django allauth. 1. 2MB. Or I’m building a SvelteKit + Supabase app and I have some doubts regarding as SvelteKit is not primarily for SPAs, but the other use cases: SSR & SSG. However, there are a few things to keep in mind: In my SvelteKit projects, I had to use `bun --bun run dev` in order to use It would be more like HTMX and Alpine vs SvelteKit. I'm gonna go against the grain and say just use Svelte. As to the other question. If that's not something you'd need for your use case sticking with just Svelte, with client side routing You can use the “static adapter” to host a static website. I made a sample repo[1] to prep for this that should get you started out of the box if you'd like to try this setup. In your case, perhaps they need to traverse to another page before seeing the available videos. Former Vue fan here: Svelte (particularly SvelteKit) all the way. Unlike traditional frameworks like React or Vue, which rely on a virtual DOM for Understanding its strengths and ideal use cases can help developers make informed decisions. I'd like to use Svelte for the frontend and potentially Express/Node + Postgresql for the backend/DB. Also, Sveltekit requires less boilerplate overall and is better for anything related to animation or 3D graphics. I’m currently using it for that. This is a real bummer -- Sveltekit is optimizing away from readability (which is by far it's I created some apps ( beginner level ) with Sveltekit now. Let me tell you that i have built 3 big CRM ( internal tools ) that handle many different use cases without any issue using sveltekit, bank application that handles millions of transactions without any issue, also before you write a single line of code and before you choose any tech, you need to create a few documents, one is your project +1 for carbon. I feel Svelte learned from all the things we don't like about React and Vue and addressed them as best it could. py in the same path / url. However, eventually, you will have to have pretty complex workflow that makes working in javascript Use cases are very different for both, it does not fit in that list. When I was choosing a new framework (Angular 1. I wouldn’t directly know how to expand fastapi routes. Svelte is great and the learning curve and the simplicity is really slightly better then for React IMHO, but in your case I would go for React. Django and Svelte combined however are an iconic duo to use, blazing fast and secure service ecosystem ftw! As long as it’s not used like a gross Laravel/Inertia kinda setup. It is intended for personal use cases (that's why there isn't a signup form, although it would be easy to implement). I use Svelte for my own stuff (I don't have an employer telling me what to use, so I have that freedom). Svelte just feels so much lighter and has less boilerplate. Reply reply luckynummer13 It really isn't that rough! If you've experience with or know about the concept behind Next. Svelte (the component framework) definitely is because it can be very simple to use but SvelteKit assumes you have an advanced understanding of how web applications and the web standard works. Let’s explore the use cases and highlight He collected questions in a reddit thread called "What frustrates you in using Svelte?" and answered some of them in his talk at SvelteSummit (great format!). shadcn-svelte is based on radix-svelte and may now founder. I've used sveltekit + skeleton + tailwind (used by skeleton) and managed to develop small application POC in 1-2 days and polished it in 2 weeks. Svelte+Vite+TS have served me exceptionally well. ) you manage the config and host it on a VPS or dedicated computer (with More robust layout features, and upgrades to file routes around grouping and inheritance, currently just barely serves all my site’s use cases and feels fragile / overloaded. In your case, if you want to deploy on a linux server, you need to select the “node adapter” since you’ll most likely be Is SvelteKit supposed to eventually be the way all Svelte apps are built, or is there intentionally room for frameworks like Vite to fill niche use cases like mine? Locked post. The server will make it first and the response will be inlined in the HTML response of your page, which the client version of load() will pick up on and reuse so you don't have to do The only pain point I'm having is the lack of a mature general-purpose headless UI, something analogous to radix-ui. Sapper (which is being depricated for Sveltekit) works with rollup, but there are some intricacies to learn. Managing two type of tokens brings its own complexity, and there are obvious downsides to JWTs (biggest one being you can't revoke them). :) Create a Skeleton project with npm create svelte@latest my-app and use a single page to go through the Svelte tutorials, and gradually build on what you're learning. the IP is whitelisted and everything. In this post, I want to share my experience with Svelte and SvelteKit, and explain why I liked this technology so much. It's a framework for building apps with Svelte, complete with server-side rendering, routing, code-splitting for JS and CSS, adapters for different serverless platforms and so on. On my side, I now do most of my projects using sveltekit now ( SPA/MPA, static websites, static apps, library engine ) Get the Reddit app Scan this QR code to download the app now. js, Nuxt, etc. Was wasting so much trying to get it work with SvelteKit, the premier place on Reddit to discuss Eldar, Dark Eldar and Harlequins for Warhammer 40,000! If you don't use use:enhance on the form, you can use it for the html standard client validation (the constraints store). By the time they click on the link to go there, Firebase is initialized. Topics we're gonna talk about: A) sveltekit routing B) Supabase auth client and supabase session sveltekit routing: Note: I'll only teach you stuff that you'll need for supabase auth. I noticed. I've started with a few points which came to my mind but since I haven't used Astro longer than few hours, I wonder what you guys think, so we can extend following table. all works really nicely. If you use +page. Svelte itself seems to be focusing on the metaframework side of things right now, (that will probably change with Svelte 4 which is around the corner) although I personally am not really convinced of metaframeworks, it is an official "clear future" as you call it. This makes implementing slightly off-spec OAuth providers like Reddit, which uses URL Form Encoded POST data, I think you could use the "Kit" part as a backend, but also works to preload html from the server, instead of waiting on the client for data, if you wanna know more, read the docs, but to be honest, what are you doing is completely fine, the only thing is that you just not using all the sveltekit features, you could just use svelte client side only, that also works really great without server Get the Reddit app Scan this QR code to download the app now. If you want a website then you would use Webflow. You will then use adapter-static, and cannot use the backend capabilities of SvelteKit. My personal preference would be to use Sveltekit for the following reasons: The opinionated structure is well thought through and is generic enough for 99% of use cases You don't need to build any tooling, Vite is all setup for you and ready to go I made a simple URL Shortener that uses SvelteKit with PocketBase. View community ranking In the Top 5% of largest communities on Reddit. You basically have two options: host a DB yourself (whether it's sqlite, postgres, mysql, mongo, etc. This means you can't use any Node. I'm guessing i'll need to use the node-adapter and use the server hook file? I'll list out the rest to make it easier to read: I don't want to misname the patterns or generalized them incorrectly so I'll just list some common use cases: authenticated users only web app, some pages for non logged in. I recently pivoted to using auth. I know it's an anecdote but Svelte still needs anecdotes and use cases for newcomers to get convinced. x). I left a comment on the issue here detailing my thoughts a bit more. Hey peeps, i'm starting my first sveltekit project and would like to know how to work in a database connection. svelte is ugly, yet +page. Unfortunately even the Svelte docs force you to use Sveltekit. SvelteKit is more battle-tested atm (Solid Start isn't even 1. js docs, sveltekit docs, and the seemingly endless number of REPL examples, I had a great time learning sveltekit. I generally also use Postgres with Graphile for a graphql api but also have been interested in looking at Cassandra with Stargate to leverage the distributed aspects. I integrate with Firebase, Sendgrid, Stripe as well as access some data from static json files all from Sveltekit API routes. The only time I found myself scratching my head was deciding on an authentication solution, but I’m not sure I’d fault sveltekit docs for that. " this means that you shouldn't waste time making something soooooo reusable, but rather make it for your use case and only share it when the need arises. The npm package is really well-made; all of the Carbon components are native Svelte components and the docs are excellent. I think Sveltekit is nice but I personally prefer Svelte over Sveltekit. Especially now as Sveltekit has just gone public beta. User details available in a store. app/ Where the login data is Email: test@user. I used to love Vue because I found it easier to understand than React. New comments cannot be posted. when Hi, I just started to use SvelteKit to replace a Svelte + Fastify app by using @sveltejs/adapter-node. The issue was it was failing with PKCE codeVerifier mismatch. What I meant to ask is rather the following: Assuming I am going to use the static adapter to create a simple blog with weekly updates and nothing more, what would be the advantage of using an endpoint to fetch the list of posts, Use the preview, test the feature and provide your feedback before abandoning the ship. When you add use:enhance it expects an ActionResult being sent back, so that may cause some trouble Every test case starts where the previous test ended. com The tricky thing about databases, is that they need to live somewhere. . Just for context beforehand - a simplified version of my It gives you a flexible set of architecture tools so you can distribute your website in practically any way you want, depending on what makes most sense to you and your application’s use case. This protects users, and empowers developers to build a better Web3. If you're also writing server side code where you're creating the APIs to be called from your front-end, then SvelteKit makes that very easy. The ecosystem is huge and most of the issues you'll ever face are solved in frameworks like I'm heavily invested in SvelteKit but checked Astro a few times briefly and wonder if it might be a suitable option for my use case (see below). The framework still gives you page load functions, routing, testing framework, etc. They do different things. Also, there's associated charts and icons that both work great. i have a general rule on sharing that relates to this: "dont share too soon. Some mongodb under the hood. RSC is interesting technology. But the idiom in sveltekit seems to be to use "export let data" for a page, so I'd stick with that. You can refer to the docs for further info. I'm currently working on a web app in Svelte for a school project and need to include a database in it so that the data used in the app can be stored offline. I'm still deciding if I gonna use both trpc and trpc-sveltekit in my current project, reasons are it's in alpha (I use next), the development focuses a lot on React (but shouldn't bother us) and I don't know if I should let rely my entire codebase on this new lib. ygcbt zugp lobtq vygu pdoc hqrlqx ffptj njmqf bcpbuu smzj