Today's Deep-Dive: PocketBase
Ep. 163

Today's Deep-Dive: PocketBase

Episode description

This episod introduces PocketBase, an open-source toolkit designed for building the backend components of apps and websites. It aims to simplify the process of backend development, making it accessible even for those without extensive technical knowledge. PocketBase is characterized by its all-in-one nature, packaged into a single file that includes a built-in database, user account management, file storage, and a visual admin dashboard. This setup allows for real-time data updates, which is especially useful for applications like chat services and dashboards.

Users can easily start by downloading the file and running a simple command, while developers familiar with Go can integrate PocketBase as a library for more control. The tool is particularly beneficial for individuals, small teams, and startups looking to build web or mobile applications without the complexity of multiple backend services. However, as it is still in active development and not yet at version 1.0, users should be aware that future updates may introduce changes that could affect existing projects. Contributions to the project are encouraged, especially from developers who can help improve the code and documentation. Overall, PocketBase aims to democratize backend development, making it easier for more people to create their own applications.

Download transcript (.srt)
0:00

ever feel like building something online is just impossible? Like you're trying to

0:04

assemble IKEA furniture, but the instructions are, I don't know, in ancient

0:07

Greek. Yeah, you're definitely not alone there. That's exactly why we're doing

0:12

this deep dive today to try and make things a bit clearer. We're zooming in on

0:16

something called PocketBase. Think of it as like an open source toolkit for

0:20

building the parts of your apps and websites that run, you know, behind the

0:24

scenes. So if you've ever thought about creating your own little corner of the

0:27

internet or maybe you're just curious how the apps you use actually work, well,

0:33

this

0:34

might be surprisingly useful even if you're not super techie right now. We've

0:38

basically gone straight to the source pulled info from the PocketBase GitHub

0:42

page and their main website. So it's the real deal, our mission for this session,

0:47

just to give you a really clear, hopefully beginner-friendly idea of what

0:51

PocketBase is and maybe why it could be useful for your next project. But before

0:56

we jump right in, just a quick word about the folks making this possible. Safe

0:59

Server. They handle hosting software and support your digital transformation. You

1:02

can find out more over at www.safeserver.de. Okay, so yeah, let's start right at

1:09

the

1:09

beginning. What even is a backend? Good question. Imagine, like, your favorite app.

1:14

You tap stuff, you see pictures, information pops up, that's the front end,

1:18

it's the bit you actually interact with. But behind all that, there's this whole

1:22

engine room, right? Storing data, managing your login, making sure when you tap

1:28

like, it actually registers somewhere. That's the backend. It's kind of like a

1:32

puppet show. You see the puppets moving, that's the front end. But underneath,

1:35

hidden away, someone's pulling all the strings, that's the backend. PocketBase

1:39

helps you build those strings. Okay, so PocketBase is one specific way to build

1:44

those strings. Got it. What makes it stand out from, say, other ways of doing it?

1:50

Exactly. It's a specific approach. And a big thing is that it's open-source. Think

1:53

of it like a community cookbook recipe for your backend. Everyone can see it, use

1:57

it for free, tweak it, even suggest improvements. So it's always getting

2:01

better, thanks to lots of people chipping in. Right, open-source, that's cool.

2:04

Community driven. Yeah. And another really key thing is it's a real-time backend.

2:09

You know how, like, on a live sports app, the score just updates instantly, you

2:13

don't have to keep hitting refresh? That's real-time. PocketBase lets your

2:17

apps data update automatically like that. Super useful for chat apps, dashboards,

2:22

things like that. And maybe the thing that makes it really appealing, especially

2:25

for beginners, is how it's often described in one file. In one file? Yeah, it

2:30

sounds

2:31

almost too simple, right? But it basically means all the core backend

2:34

stuff is packaged neatly into this single manageable file. Makes getting

2:39

started feel much less daunting, like having your essential kitchen gadgets in

2:43

one box instead of scattered everywhere. Okay, in one file that does sound

2:46

incredibly simple. So what kind of tools are actually in this this one file

2:51

toolbox? What can it do? Well, it's surprisingly packed for just one file.

2:55

First off, it includes its own database. Schoolite is the name. Now, a database is

3:00

just, you know, an organized place to store all your apps information, like a

3:03

digital filing cabinet. The built-in part means you don't need to find, install,

3:08

and

3:08

connect a separate database system. It's all right there. And naturally, it

3:13

supports those real-time updates we just talked about. Second, it has built-in ways

3:17

to manage files, think user uploads, like profile pictures or documents. Oh, nice.

3:22

And it handles user accounts, so sign-ups, logins, password resets, all that

3:27

stuff that's usually a pain to set up. It's included. You don't have to build it

3:30

from the ground up. That alone saves, like, a ton of time. Wow, okay. That does

3:36

sound

3:36

like it strips away a lot of the complexity. What else comes in the box?

3:39

Well, there's also this really handy visual thing called an admin dashboard.

3:43

Think of it like the control panel for your backend. You just open it in your

3:46

web browser and you can see all your data, manage users, change settings, all

3:51

with clicks. No code needed. Like a point-and-click interface for the engine

3:54

room. Exactly. Makes managing everything much easier, especially when you're

3:58

starting out. And finally, it provides something called a REST-ish API. Now, API

4:03

sounds technical, I know, but really just think of it as the language your app, the

4:07

Puppets uses to talk to PocketBase, the puppeteer. REST is just a very common,

4:12

straightforward way for them to communicate. And PocketBase even offers

4:16

these helpers, they call them SDK clients, for popular languages like JavaScript,

4:22

which is huge for web stuff, and Dart, which is big for mobile apps that work

4:26

on different devices. These SDKs make it even easier for your app code to talk to

4:31

PocketBase. Like having a fluent translator built right in. Okay, so it's

4:35

almost like a pre-assembled backend engine that's just ready to go. Yeah. How

4:39

would someone actually, you know, use it, get started with a project? Yeah, the

4:42

absolute easiest way is to use it as a standalone app. Like you literally go to

4:46

the PocketBase website, download one single file for your computer, Windows,

4:50

Mac, Linux, whatever you've got. Okay. Then you open up your terminal, or command

4:54

prompt sounds a bit technical, but just where you type commands, and you just

4:57

type .pocketbase serve. That's literally it. That's it. That's it. Boom. Your

5:01

PocketBase backend is running. Then you just build your app to connect to it.

5:04

This pre-built version even lets you add little bits of custom logic using

5:08

JavaScript, which is pretty neat for web developers. But that really does sound

5:11

incredibly simple. Like almost too simple to get a backend running. Yeah.

5:16

Is there another way for people who maybe want to tinker a bit more? Oh, yeah.

5:21

Definitely. For developers who are comfortable with code or want more

5:25

control, PocketBase can also be used as a Go framework. Go is this programming

5:30

language known for being pretty fast and efficient. So if you know Go, you can

5:35

basically use PocketBase as a library, a set of pre-built components inside your

5:39

own Go application. Oh, okay. More integration. Exactly. The documentation

5:44

shows a tiny example, just a few lines of code. You import PocketBase, create a

5:48

new app instance, maybe add a custom rule or two, and then you start it using a

5:51

command like go run main dot go serve. Before that, you'd probably use some

5:56

standard Go commands like go mod and knit my app and go mod tidy to set up

6:00

your project structure. And if you want to package your custom Go app into that

6:03

neat single file, just like the prebuilt one, there's command for that too,

6:06

something like cgo enable d0 go build, then you run your version with dot my app

6:10

serve. So it's flexible, easy start, but room to grow for coders. Right, right. So

6:15

it caters to both ends of the spectrum, sort of. Who do you think this is really

6:19

for then? Who benefits most? Well, they don't explicitly list like use case

6:23

hashtag one dot x, but based on everything, the simplicity, the all-in-one

6:27

nature. It really feels perfect for individuals, maybe building a personal

6:31

project, small teams, maybe startups. If you're building a web app, a mobile app,

6:36

and you need those standard backend things, user accounts, storing data, maybe

6:41

some real-time features, file uploads, but you don't want the headache of

6:45

setting up five different complex services and making them talk to each

6:49

other, PocketBase looks like a fantastic choice. It really lowers that barrier to

6:53

entry, you know, lets you focus more on the actual app features, the fun part.

6:57

Yeah, I can see that being huge, especially for people just getting

7:00

started or without huge resources. Now, you mentioned it's still actively

7:06

developed. Is there anything people should be aware of, like downsides? Good

7:09

point. Yes, it's actively developed, which is great. Lots of improvements happening,

7:12

but they are upfront about it. Because it's not at version 1.0 yet, they might

7:17

introduce changes in future updates that aren't fully backward compatible.

7:20

Meaning an update could potentially break something in an older project.

7:24

Potentially, yeah. It's something to keep in mind, especially if you're building

7:27

something, you know, mission critical or planning for the very long term. It's

7:32

definitely stable enough to use. Lots of people are. But just manage expectations

7:36

that things might shift slightly before that big v1.0 release. Okay, good to

7:40

know. Manage expectations. And since it's open source, how can people get involved

7:45

if they find it useful, if they want to contribute? Yeah, that's the beauty of

7:50

open source. The community is key. If you're a developer, you can definitely

7:54

contribute code, fixing bugs, adding features, improving the docs is always

7:58

helpful too. The GitHub repository is the place for that. They do suggest though,

8:03

if you have a big new feature idea, it's probably best to chat with the

8:07

maintainers first, maybe open an issue to discuss it, just to make sure it aligns

8:11

with the project's direction. Right, collaboration. Exactly. And importantly,

8:16

if you happen to find a security issue, like a vulnerability, they ask that you

8:20

don't post it publicly on GitHub. Instead, there's a dedicated email address

8:24

support at pocketbase.io for reporting those privately and responsibly. Got it.

8:28

Okay, so let's try and wrap this up. Pocketbase. It's open source. It's this

8:34

all-in-one backend thing, designed to be really easy to use, especially if you're

8:37

newer to this. It bundles a database, user stuff, file storage, even a visual admin

8:42

tool, often into just one file. Plus, it does real-time updates. You can run it

8:47

super easily with one command, or if you're a Go developer, you can integrate

8:50

it more deeply. Sounds like a brilliant option for individuals, small teams,

8:54

anyone who wants to build an app without getting totally bogged down in complex

8:59

backend setup. Just got to remember it's still evolving towards that version 1.0.

9:03

That sums it up perfectly. It really feels like it's trying to make backend

9:07

development more accessible, democratizing it almost. Democratizing. I

9:11

like that. Great way to put it. So, maybe here's something to chew on. You know,

9:16

all

9:16

those slick apps and websites we use, they all have complex backends powering

9:20

them. Could a tool like PocketBase actually make it feasible for more

9:23

people, maybe even you, to understand that stuff better or even build your own

9:27

simpler versions? Does seeing behind the curtain a bit, even with a tool like this,

9:31

change how you think about the tech you use every day? Perhaps it's worth

9:35

exploring their documentation. HTTPS.pocketbase.io docs just to see what

9:40

sparks your interest. And remember, this deep dive was brought to you with

9:43

help with your digital transformation. Check them out at www.safeserver.de

9:43

help with your digital transformation. Check them out at www.safeserver.de