991: Vite’s Bet on Cloudflare ![rw-book-cover](https://wsrv.nl/?url=https%3A%2F%2Fmegaphone.imgix.net%2Fpodcasts%2F5197fe5a-42f7-11f0-affd-87d9985a1760%2Fimage%2Fc86a54acd72683732c4773e25bf0ae14.png%3Fixlib%3Drails-4.3.1%26max-w%3D3000%26max-h%3D3000%26fit%3Dcrop%26auto%3Dformat%2Ccompress&w=512&h=512) 🔗 **Source:** [991: Vite’s Bet on Cloudflare](https://share.snipd.com/episode/50274635-a188-405d-80b7-312c532655e7) ## Highlights - **Void Is A Batteries Included Vite Framework** - Void is a full‑stack framework built as a Vite plugin that bundles routing, SSR, ORM, auth, KV, queues, and other Cloudflare services into one developer experience. - It supports React, Vue, Svelte, or Solid frontends while unifying a single backend layer and deployment model tied to Cloudflare's infra. Transcript: Wes Bos So what the heck is this? So the folks behind Veet, it's a company called Void Zero, have come out with a full stack JavaScript framework called Void. It exposes itself via a Vite plugin, and it is heavily tied or bound to the Cloudflare environment. And it gives you a whole bunch of stuff, like kind of just set up right away, right? It gives you server actions and whatnot. And it gives you a database, a key value, authentication, better auth, you know, like kind of all the stuff that you would want if you're building out an application. And we're going to go kind of go through it and talk about all the different pieces and whether or not this is Cloudflare lock-in and whether or not this is something that you should be Excited for or not. Scott Tolinski Sick. Yeah, I'm excited to dive into it. It's actually very funny because CJ and I had been both working on our own frameworks and the amount of things that this landed on that are very similar to mine is both simultaneously Disappointing, but also very exciting. Because now what I can do instead of releasing mine is that I can take this and build on top of it. Or at least possibly because we'll get into some of the reasons why I might not want to do that. But it is very validating to me personally, just how many of the choices they landed on that are very similar to what I landed on. Definitely. CJ Reynolds And I would say they took a lot of inspiration from Svelte. We'll get into it. But like this idea of like a separate server file, like loaders, actions. And one of the things off the bat is like, I also consider this one of the great unifiers, right? Like you can use React, Vue, Svelte, or Solid, but the backend layer is the same for everything. I think this is one of the things that's missing in the JS ecosystem is pick a framework and you have a separate meta framework that you have to plug into. But this is one meta framework where you can choose the Vue layer, like similar to Astro, but this is more like instead of for content sites, this is more like full stack apps, dashboards, Those kinds of things. Wes Bos Yeah, that is really cool. So being able to use React Vue, Svelte, or Solid is really cool. I don't know that you can mix and match them. I don't know that you would want to, although I know plenty of companies who have lots of mix and match apps out there. But I guess the templating layer can be whatever you want, which is really neat. You can also, so like this is a framework, meaning that you can, it will do server-side rendering. It does caching, actions, forms, validation, tip to tail, does absolutely everything for you. But it apparently will also work with SvelteKit, 10Stack Start, Nuxt, all of those things that you may be using. ([Time 0:01:37](https://share.snipd.com/snip/2313da94-c899-427e-9d32-cc3e1d5a9257)) - **Void As Vercel For Cloudflare** - Void functions as both a framework and a deployment platform, similar to Vercel but built on Cloudflare's stack to provide an opinionated DX with integrated services. - The team positions this as a Cloudflare‑first product that trades portability for tighter integration and smoother developer workflows. Transcript: CJ Reynolds Yeah, the way I think about it is like, Void is a framework, but it's also a deployment platform. And if you don't want to use the framework, but you want to use the deployment platform, that plugin will allow you to plug it into SvelteKit or HandStack Start, too. Wes Bos Now, where have we heard of this type of deployment platform before? Vercel. Yes, I think they're essentially trying to make the Vercel for Cloudflare here, which is like, as much as people say, like, I don't like Vercel or whatever, it's very obvious to a company Making money that they are, they're by far the best DX for this type of thing. And they are doing extremely well, right? Like, like, lots and lots of people host on Vercel. And it is a fantastic hosting platform. The reasons why people don't like it is because it's expensive, right? But you can't argue against it being a fantastic platform. And they're probably looking at this being like, yeah, we should make that for Cloudflare. Scott Tolinski Yeah, right. Yeah, you know what I do? Is funny because Vercel has like resisted the Vite train for so long, even though like, you know, even at the detriment of their own projects. They've also resisted anything that's not I mean, it's not like they've resisted SvelteKit because they they fund the development of SvelteKit. Like the Next platform and the Svelte platform and all these things are so separate. And then some of them use Vee. The Next is like really like we are going to own this whole thing without using ([Time 0:04:36](https://share.snipd.com/snip/eee70b08-c919-4927-a566-630c9d50a37f)) - **DB And End To End Type Safety Are First Class** - Void bundles Drizzle ORM and Cloudflare D1 (SQLite) or Postgres via Hyperdrive for database access, with helpers that hide config and make the DB feel like a first‑class import. - It aims to give end‑to‑end type safety: typed DB schema to loaders, API calls with editor autocomplete, and server‑side short‑circuiting to avoid network hops during SSR. Transcript: Wes Bos So it has an ORM baked in, which is Drizzle. And then if you want a database, you either have to use SQLite via D1, or it also supports Postgres via Hyperdrive, which Hyperdrive is... Scott, you use Hyperdrive. Can you explain what that is real quick? Scott Tolinski No, I use it and I cannot explain it. My understanding is it's like, it's a, my understanding is that it's like, it allows for connection pooling of databases. It's like a layer that sits in between your actual database your app for serverless applications. Because if you don't, then there's something with the connection. All I know is that I have to use it, and it's a necessary evil, something that I do not like using. Yeah. Wes Bos Like Cloudflare doesn't have sockets. And if you want to connect to a database, you are generally using like sockets, right? And so Cloudflare has this product called hyperdrive which will also part of the reason that they have it is like if your database it's not living anywhere close to where your your code Is running that that can introduce a lot of latency so part of what their pitch for that is that like they've got a fat orange pipe from like where your database lives like in like like what Where do we host our our mysql database planet scale planet scale you know if you want to connect to like planet scale straight to they've got a fat pipe from planet scales office to the Scott Tolinski Cloudflare office piping the the database between the two fat pipe yeah i i wonder one thing i think about this is the local data story because it is so tight everything is so tightly integrated, It's like, but what about my local data? Do I now have to step outside this? What tools do I like to use that would work well with this? It doesn't seem like XeroSync would work super well with this because it takes over so much. But yeah, I would want to think about that quite a bit because I need my local data story. Wes Bos Yeah, there's lots in the Cloudflare ecosystem that just doesn't run on Cloudflare, right? Like Sharp is one, right? It needs C++ bindings. And they either have an alternative to running that in Cloudflare or they recently just ran a rolled out containers, which is basically just like, fine, you want to run a Docker image On Cloudflare? Like if that's the last thing that's stopping you, then you can do that. Scott Tolinski Yeah. And if you want to see all of the errors in your application, you'll want to check out Sentry at sentry.io forward slash syntax. You don't want a production application out there that well, you have no visibility into in case something is blowing up, and you might not even know it. So head on over to sentry.io forward slash syntax. Again, we've been using this tool for a long time, and it totally rules. All right. Wes Bos Let's talk about type safety. So obviously, one of the big things in a meta framework is end to end type safety, meaning that all the way from your ORM database schema, you get types all the way through your route handlers, Your API requests, your page loaders, your actions from the server into the client. And that is beautiful. I think like the first time that I had that was probably three or four years ago with SvelteKit when we were building the syntax site. And I was like, this is absolutely beautiful. You know, you define your schema in the database. You say, oh, this is a page loader that loads these data pieces from the database. And we pick and choose and we map and filter and then we return that data. And then you go into the client side and you start to template that out. And those types just flow all the way through. And it's absolutely beautiful. So this, of course, has I think most frameworks have this type of thing these days. Yeah. CJ Reynolds But this has a couple of extra things, too. So like you in the way this they set this up is similar SvelteKit. You have a separate.server file. That's where you define your loaders. And then in your template file.view or whatever, you get access to those typed loaders, but they also have an API layer that's fully typed. So this is one of the things that they borrowed from Nuxt. On the client side, if you do fetch, you actually get type completion as to your API endpoints. And it does the smart thing of if that code is running during a server-side render, instead of a network hop, it just calls that function directly. I think there's a screenshot with the API fetch. Yeah, right here. Wes Bos So this is just a regular-ass fetch request to an API endpoint, but the response from that fetch is fully tight, right? Cool. Yeah. CJ Reynolds And like in your editor, like you would get autocomplete for slash API slash AI. It knows about what all your routes are. And like I said, no network hop. ([Time 0:07:11](https://share.snipd.com/snip/9086af7a-d7d4-44d6-9cfb-dd5c1680795e)) - **Prefer Typed API Calls And Component RPC** - Use Void's typed API fetches to get editor autocomplete and avoid unnecessary network hops during server‑side rendering by letting the runtime call functions directly when possible. - Prefer server actions/loaders for small tasks but use component‑level RPC for reusable data to avoid duplicating loader logic across routes. Transcript: CJ Reynolds But it's smart enough to know where the code is running and actually just call the function directly. This is one of the things that really bugs me about Next.js. Like there's no built-in way to do this. Scott Tolinski What about RPC here? It is funny because we just mentioned loaders and form loaders, page actions and stuff. And I got to say, I'm far over those i i like doing that at a route level sucks to me i i'm past that and i'm doing everything with the svelte remote functions and async svelte and being able To just call functions and uh do the form actions in a way that's not at a route level because i my stuff my stuff doesn't like think at a route level it thinks at a component level they support CJ Reynolds Both. So what we just showed was, let's say you have a separate API definition and you want to call it from a component or a page that works. And then they also have define a loader and an action and then call it directly from the component, at least from what I saw. Yeah. Wes Bos Yeah, you'd be able to just like very similar to how React server components works or like page action, server actions and Tansac start where you would just simply import that server Action from your dot server dot TS file. And then it will just replace that with like a network call behind the scene. ([Time 0:12:00](https://share.snipd.com/snip/e7bb66c3-5eb6-41a5-8332-a3e2f5780765)) - **Component Loaders Reduce Duplication** - The hosts prefer component‑level data fetching (component loaders / RPC) over page‑level loaders to avoid duplicating data logic and to take advantage of React/Svelte suspense patterns. - Void supports both route loaders/actions and RPC-style imports, giving flexibility for component reuse and server‑centric patterns like Inertia. Transcript: Scott Tolinski About RPC here? It is funny because we just mentioned loaders and form loaders, page actions and stuff. And I got to say, I'm far over those i i like doing that at a route level sucks to me i i'm past that and i'm doing everything with the svelte remote functions and async svelte and being able To just call functions and uh do the form actions in a way that's not at a route level because i my stuff my stuff doesn't like think at a route level it thinks at a component level they support CJ Reynolds Both. So what we just showed was, let's say you have a separate API definition and you want to call it from a component or a page that works. And then they also have define a loader and an action and then call it directly from the component, at least from what I saw. Yeah. Wes Bos Yeah, you'd be able to just like very similar to how React server components works or like page action, server actions and Tansac start where you would just simply import that server Action from your dot server dot TS file. And then it will just replace that with like a network call behind the scene. Right. Like if we take a look at the like the kitchen sink example that they have here and I've just defaced it with some syntax listeners here. But if we were to like add something to it, I'm pretty sure when they've coded this, I don't know if it's using a fetch request or like an RPC call, but it doesn't really matter because you Just hit it and it will send a network request to the backend and then come back. And on top of that, it's also using the whole like idea is very much like inertia JS inspired, which is like very much server centric. Your server will compute your state lives on the on the server. The props come from the server and simply just will will populate. That's very popular in like non JavaScript land, right? Like Laravel is huge. Inertia.js is really big. In Rails land, this idea is really popular as well. CJ Reynolds Yeah, and Scott, can we dig in a bit more to what you were talking about for like pages? You don't like the requests being tied to pages. Like, are you leaning more towards like, I'm going to define my API layer separate and then just call it from whatever pages need it? Is that more of what you're talking about versus trying to define them side by side? Scott Tolinski The way I tend to work here is I'm defining my API as basically functions. If I need endpoints, then I have separate endpoints that then just call those functions. But in this SvelteKit way of doing things, you're creating just a query or a command or whatever. And then you're essentially just importing that into your client-side code and calling it RPC. And at a component level, it's way nicer because you're oftentimes duplicating a lot of code from loader to loader. If you have a component that lives on one page and a component that lives on the other page, they have the exact same data. Now I have duplicate code or I'm creating an abstraction that I'm importing into both of those layers. It just gives like, and then what you're doing is that that information comes in at a loader level, a route level, and you hot potato that data all the way down into whatever component You need. ([Time 0:12:10](https://share.snipd.com/snip/bc3eef97-cd79-4c0b-b153-9fdb3a6181c2)) - **Auth And Cloudflare Bindings Are Simple Imports** - Void ships BetterAuth for authentication and exposes Cloudflare bindings (DB, KV, Storage, Auth) as simple imports so developers can 'just import DB and use it' without wiring provider details. - That convenience mirrors Vercel's DX tradeoff: you gain simplicity while coupling to the Cloudflare stack. Transcript: Wes Bos Fan yeah big fan of that what else is is there with it it comes with auth baked in um which is using better auth which i thought was pretty interesting to to include it it seems like a lot of These tools like drizzle and better auth and they're they're not that old but i feel like everyone is finally like this is it can we stop changing them better off rips and it's it's it's Scott Tolinski Flexible enough you can do anything with it which is one of the reasons why i like it it's easy enough to just drop into anything i'm a big big fan so again this is all the stuff i like yeah CJ Reynolds And i i didn't see like evan didn't show examples of auth during the demo but i'm hoping that it also like by default gives you some pretty zero config stuff because BetterAuth is nice, But you do have to configure things, obviously. But to get just a basic username password login with no config would also be really nice for just the sites you want to spin up like that. Wes Bos I was curious about that as well. Does this just give you auth and tokens, or does it give you users like a like a like a database user that you can then associate stuff and in looking at their like cli there's void auth login Oh no that's probably for the cloud provider oh that's for the cloud provider yes yes yeah i i think i think that's just for logging into void um but if you take a look at the example code They have here, they have import auth, which is powered by better auth. So I'm curious if it like kind of goes one step further and gives you like a Laravel or a Rails will give you, if it gives you those users or not. CJ Reynolds I would say just looking at this one slide, it has what, it's like dream code, right? Just import the DB and use it, import KV and use it, import storage and use it, import auth and use it. So that's nice um like we said earlier this is tied to cloudflare so each one of those things has a cloudflare black backed service that's actually managing all of that for you um but and Wes Bos And probably even further it it like does all of the wrapping of Drizzle for you. ([Time 0:18:21](https://share.snipd.com/snip/198a5ae6-4416-4846-b025-122c83561cfe)) - **Void Chooses Developer DX Over Portability** - The major community concern is Cloudflare lock‑in: Void intentionally embraces tight coupling to Cloudflare to enable superior DX, and Evan said 'if you don't want to lock‑in, it's not for you.' - Many core pieces (D1, Durable Objects, Queues, Hyperdrive) are Cloudflare‑specific and may require migration work if you switch hosts later. Transcript: Wes Bos They're all running in an AWS East one. Yeah. So the big like feedback and the big like talk that everybody had when this was announced is like, is this not just lock-in to Cloudflare? If it is so tightly coupled to Cloudflare, will this work on self-hosted? Can I use Bun? Can I put it on a Raspberry Pi, that type of thing? And Evan came out and says, I want to be very upfront about void being tightly coupled to Cloudflare. The lock-in is what makes the DX possible. If you don't want to lock-in, it's not for you and that's fine v will forever be platform agnostic use it with nitro version 3 or adonis the choice is yours and void just gives you another Option so i i quote tweeted this and unapologetically cloudflare um meaning that if you want to have next js for cell level of dx you do need integration between your infrastructure And the actual code that you're writing and as much as people absolutely hate that because they want to be able to move around to all of the different platforms it's interesting that He comes out and just says, like, look, you can do it yourself. And like, I've done pretty much this whole stack myself several times on Cloudflare, and it's not that bad. But if you want one step further, you're willing to pay for that, it will be. Scott Tolinski Yeah, I wonder a little bit about like, when you are picking this stack, are you picking all of the stuff in the stack? And how does that? Wes Bos I don't think so. Like, it's just code, whatever code you want to run, you want to use a different database, as long as it can run on Cloudflare, you can bring whatever you want. CJ Reynolds That's the main thing. Can it run in Cloudflare workers? And if it can, use whatever you want. But the thing is, a lot of things can't, which is why they introduce things like D1 and some of these other offerings, because it specifically works inside of workers. Wes Bos But I thought what would be kind of a neat exercise for the team here is like, let's go through each of these choices and ask ourselves, is this, is this lock in, you know? So like, if you're building on top of this thing, your database, SQLite or Postgres and Drizzle, that's, to me, that's not, that's not lock in, right? And people say that a lot of like, oh, why are you using this like specific Cloudflare database? I'm like, well, I'm just using, I try to keep things as standards as possible. And if I use Drizzle, I know that I could, in not every case, but like I could move it to SQLite somewhere else. And in many cases, I could move it to MySQL somewhere else, you know, or Postgres. CJ Reynolds Yeah, it'd be a little bit of a migration. Because what I think about is like, if you're using D1, you're using like that specific D1 binding. But if you are running a deployed app that talks to a SQLite database, you're probably using LibSQL or Terso. Wes Bos So I don't know. It's a different adapter. CJ Reynolds Yeah, you can swap out the adapter. I don't know if that's going to change your table definitions, but that would be the one step. Wes Bos I'll tell you, because in local dev, if you want to use Drizzle Studio in local dev with Cloudflare, you have two options. You use the HTTP API or you write some weird thing that finds the SQLite database on your local machine and then uses the better SQL adapter for that. And I do that for all of my sites, meaning that I'm running different adapters in prod versus local, and I've had zero issues. Scott Tolinski I don't like doing that, though. I agree. Not because there's issues, but it's just annoying. CJ Reynolds But I agree. Single config swap out, it's not necessarily lock-in. Auth. Is this lock-in? It's kind of one of the scarier things to get locked in. But I will say it doesn't seem like it's locking you into an auth platform. It's locking you into an auth library, right? ([Time 0:22:53](https://share.snipd.com/snip/fd5d0549-9f86-41ec-b531-a2dbda33e5c9)) - **Choose Void Only If Cloudflare Lock In Is Acceptable** - Accept lock‑in deliberately: if you value batteries‑included features like queues, crons, and managed services, use Void to avoid the setup friction and gain rapid productivity. - If you need full portability or native Node APIs (Electron/Tauri), test whether Void's Cloudflare worker output and local tooling meet your needs before committing. Transcript: Wes Bos Your own like yeah the thing about this is that you can get the cloudflare binding directly and then if you don't want to be locked in then just build your own take take the yeah right like A six line six lines of code um where you can import and export this thing yourself true through ai um let's loop this in with like i guess like there's there's cloudflare cron there's Cloudflare queues and and there's Cloudflare AI. I would say that these things are fairly high on the lock-in aspect. Because if you're building on top of durable objects, there are some open source implementation of durable objects now with the same API, which is great. But I would say those are pretty high in on the lock-in. But a lot of people are willing to take that trade-off for the DX or the cost for this type of thing. Yeah. Scott Tolinski Yeah, I will say it is lock-in, but one thing I do like, I like that this is baked in. That's something I do like about Vercel, like being able to have crons baked in. But like queues are something that i explicitly never take advantage of because i just don't ever set it up it's like which is the dumbest thing to say i've i've built yeah i've worked With cues before but like it's one of those things that like if it was there and i didn't have to do any work for it i would use a hell of a ton more i i i totally agree i have a project. Wes Bos I'm working on my uses.tech website, and I'm moving it over to Cloudflare. And there's one thing that is like a fairly large ingestation process. And it needs to wait and all of this stuff. And it's a perfect use case for queues. And normally, I would just stick that thing in like a long-running endpoint, which I did with our transcripts as well on the syntax site. But since the queues were so easy, they were just there. I was like, oh, might as well. You know, I don't have to set up a whole thing for it. So this is one thing that is more Rails or Laravel like because they come with systems for this. CJ Reynolds So this will be interesting because like you're saying, like if it's there and devs know that they can use it and they don't have to set anything up, we can build more complex systems that Use queues in the right way instead of having like a long running endpoint. I do agree. Lock in because you're tying it to the specific Cloudflare way of doing it. ([Time 0:29:14](https://share.snipd.com/snip/3977fc27-09a9-450b-89ef-16e3251b8a98)) - **Queues Were Trivial To Adopt For A Heavy Ingest Job** - Wes moved a ingestion job to Cloudflare queues because they were trivial to enable, replacing a long‑running endpoint and simplifying the workflow. - The ease of built‑in queues made him adopt them quickly instead of building custom background processing. Transcript: Wes Bos I i totally agree i have a project. I'm working on my uses.tech website, and I'm moving it over to Cloudflare. And there's one thing that is like a fairly large ingestation process. And it needs to wait and all of this stuff. And it's a perfect use case for queues. And normally, I would just stick that thing in like a long-running endpoint, which I did with our transcripts as well on the syntax site. But since the queues were so easy, they were just there. I was like, oh, might as well. You know, I don't have to set up a whole thing for it. So this is one thing that is more Rails or Laravel like because they come with systems for this. CJ Reynolds So this will be interesting because like you're saying, like if it's there and devs know that they can use it and they don't have to set anything up, we can build more complex systems that Use queues in the right way instead of having like a long running endpoint. I do agree. ([Time 0:30:43](https://share.snipd.com/snip/8f6712b2-bec3-4ccd-a20c-0e0b0b610724)) - **Void Targets Cloudflare Workers Not Node** - Void's runtime output targets Cloudflare Workers (Hono and worker runtime), not Node, which affects where apps can run and may limit use cases like Electron or other non‑worker environments. - The team built the framework on web standards (Request/Response) and Hono for consistent handler portability within worker ecosystems. Transcript: Wes Bos I could take a handler from my React hono application and move it into a svelte kit handler and and do very little um work and it would just it would transfer over very well yeah i will say CJ Reynolds Huge points for using building this whole thing on hono because hono is great and yes yeah i like it i'm big fan big fan as well. ([Time 0:32:21](https://share.snipd.com/snip/6ebd669e-5a6a-4d7a-83ed-d74e669a029b)) - **Confirm BYOC And Deployment Model Before Committing** - Before adopting Void commercially, verify deployment options: confirm whether you can deploy Void apps to your own Cloudflare account (BYOC) or must use Void's managed cloud. - If BYOC is unavailable, expect potential operational and cost tradeoffs similar to Vercel's hosting model and plan accordingly. Transcript: Wes Bos And I asked this in their chat room. I said, like, will you be able to self-cloud flare your own void apps? Meaning that like, will you, if you're deploying a void app, can you deploy that to only to void? Or can you just take this adapter and it to your own Cloudflare, given that you're going to have to do all the Wrangler commands and whatnot yourself? And they said they don't know yet, which is kind of interesting, quite honestly. Like, maybe you can't deploy this to your own Cloudflare account, but you have to use the void cloud one. I think if that's the case, I'd probably be a big no from me on these types of things because I would want to use my own account. BYOC, bring your own Cloudflare. Scott Tolinski I agree with you, yeah. I don't want to put my stuff in another place and have to worry about DNA. Like I got all my stuff at Cloudflare already. I would love to just keep all my stuff there as well. CJ Reynolds But I will say, this is what Vercel brought to AWS, right? It made it, it hit all the details. You can deploy with one command. You don't have to do anything. I don't think Vercel supports like setting an AWS key or anything like that. Like they upcharge you and that's how it goes. ([Time 0:32:46](https://share.snipd.com/snip/aac40ee9-2a4d-4fdc-9a5a-47972de54eb8))