777

June 3rd, 2024 × #webdev#programming#productivity

The Modern Dev CMS - Pocketbase

Pocketbase provides a full backend with database, authentication, file storage, and more in an easy to use interface.

or
Topic 0 00:00

Transcript

Wes Bos

I have been lucky. You've been talking about this bucket base for a while, and this seems really cool. It kinda reminds me of, like, back in the Graph cool days Wes, like, you'd sign up and you get, like, a database and an API all in 1, but, like, this also does auth and file storage. I'm very curious to hear a bit more about this. And it's you can it's local. Right? Like, it's not some service? That's correct. In fact, there is

Wes Bos

I always do the whole, like, search for pricing. You know? You land on something, and it's, like, open source, and you're like, where's the pricing tab? You know?

Topic 1 02:34

Pocketbase is a modern backend for UIs with auth, realtime, storage

Wes Bos

here? Yeah. I've been I've been researching it. I've not run it myself, but I've gone to it a few times. We always get recommended it. And then I know that you built your breakdancing app in it Yeah. That I saw. And, like, you did it on the flight with your kids. And I was like, oh, that's

Wes Bos

And Spotify. If you're on Spotify, just open the app, and you can see what we're talking about. Oh, perfect. Yeah. That's actually that's a huge win for Spotify, honestly. I use that a lot. Often, I'm, like, listening to something, and then you hear them talking about something as reference. So just I'll just open the app and watch it for a few seconds and then close it and keep going on audio.

Topic 2 04:02

Pocketbase provides database, ORM, server, API, file storage, auth

Wes Bos

if you're trying to, like, understand, like, okay. I wanna build an application. I wanna build a mobile app. I wanna build something.

Wes Bos

There's a couple things you're gonna need. Right? You're gonna need a database.

Wes Bos

You're gonna need a ORM or something that sits on top and allows you to give you queries. You're gonna need a server. You're gonna need to write the code to build an API so that you can interface with it. You're gonna need file storage to upload images and and videos and logs and things like that, and then you're gonna need auth so that the access control of those types of things. And, Keystone is is another really good example of that. We've talked about that in the past.

Wes Bos

And there's yeah. This is this does all of those things, right, where you just it gives you it does not give you templating or front end or I guess there is, like, a a JavaScript SDK, but, like, there's there's no implementing this in, like, React Hooks or something like that. It's simply just, like, the whole back end part of your application.

Topic 3 06:40

Pocketbase uses SQLite, handles 10K+ connections on $4 server

Wes Bos

Oh, it looks like yeah. There's there's so there is a JavaScript API like you just said, and I Wes thinking that that is if oh, it's great. But when you need to step in and do something totally custom, are you able to do that? So it looks like there are a bunch of hooks where you can just kinda jump in and do something like send an email.

Wes Bos

And I want to use middleware.

Topic 4 10:46

UI is perfect hybrid of CMS and database

Wes Bos

but also does all the database stuff. And when you add a field here, does that also mirror it to some config file, or does this done entirely in this UI?

Wes Bos

to use? How how do I how does my app know what the UI is? Because we've talked about this before, click ops. Right? Yes. Do do you have to tell me to make them? Oh, there you go. That's what I'm looking for. So Scott just showed me a, JSON collection

Wes Bos

Yeah. But there is a JSON representation of these fields. Sanity feels like you would want to, like, put that in your git config, wouldn't you? Because, like, that's your your whole back end schema is based on that. Yeah.

Wes Bos

but I'm sure there's definitely work flows from that one. Can get to that. I think the huge benefit here is that, like, often Wes you have an idea, you don't necessarily care about that type of thing. Even, like, I find myself being like, oh, I need to save this somewhere.

Wes Bos

I guess I'll make a quick schema. I guess I'll quickly get a lite file and, like, yeah, like, pretty quick. But yeah. This is even faster.

Wes Bos

like a like a more complex evaluation? Because I remember, like, Firebase had that. And then when you wanted to get into a little bit more complicated Wes, you can update this item if you own it or if you have the like, a specific role or if you are an admin. And I would get into these, like, really complex, like, declarative rules Wes often I find myself being like, I just want, like, a function that returns true or false, which is Keystone has that. Keystone allows you to, like, declaratively pass a true or false create, read, update, delete, or you can pass a function which will either return true or false based on your calculation.

Wes Bos

Headers, method, data.

Wes Bos

Johnny from Bulgaria.

Wes Bos

your application, it's the best. Like Stripe does that at a very high level, which is the the copy paste examples include your tokens.

Wes Bos

And I love that because it it understands. Like, you don't have to copy paste it, and that's where the issues pop up. Oh, you Yes. You it was move you you type move, and it was moves with an s. Deno Yeah. You know who else does that? Sentry does that. Whenever you log in, Yeah. You know who else does that? Sentry does that. Whenever you log in

Wes Bos

the email reset your password template, any of these things are just here. And I have a question about, like, the actual code part. So, like, when you you obviously install this thing locally, it's it's actually a bit weird because it's you download, like, an executable. It's not like a NPM install, which I think they should do that. I know it's go, but they probably could ship the pocket Bos server as, like, an npm start thing, which I think would be a little bit more because, like, JS soon as I started it, my OS is like, this is from developer. Mhmm. And you gotta, like, jump through a whole bunch of hoops. So I tried it twice now, and I'm just like, whatever.

Wes Bos

Yeah. But I'm curious. You what? You npm install something, and then you connect to that endpoint with their Wes t k JavaScript SDK?

Wes Bos

That's it right here. These first two lines right here. Is it is it fully typed? JS there type do you get typings? Like, how well, how's the connection between that work?

Wes Bos

Beautiful. Cool. Well, I'm I'm certainly gonna try this out. I need to get, I need to get a Coolify running. I really wanna do it on my, like, local Vercel like my Synology just for the sake of of doing that because things like this, we're like, ah, I just I wanna run it really quickly, and I don't feel like having to spin up a $5 server.

Wes Bos

Yeah. Have somewhere to to throw it.

Wes Bos

What? That's insane.

Wes Bos

Wicked. Alright. Thanks, everybody, for tuning in. We'll catch you later. Peace.

Share