Remix.run Logo
Pocketbase – open-source realtime back end in 1 file(pocketbase.io)
221 points by modinfo 5 hours ago | 87 comments
throwaway77385 21 minutes ago | parent | next [-]

I see Pocketbase, I upvote. Using it in a few production apps and it's been a very solid experience. Some breaking changes from time to time, but generally very solid. Also has a lot of extensibility built in. Sometimes you might hit a scenario where it doesn't provide what you need, which is when things can get a bit hairy, but nothing a skilled dev can't work around.

olav an hour ago | parent | prev | next [-]

I love it and use it for personal projects and internal tools. I tend to combine it with https://pocketpages.dev/ which gives me file-based routing and nice templates.

Ah, and Pocketbase has automatic database migrations, so all schema modifications can go into version control.

I even hacked a Gemini protocol server into it, so that I can browse my personal knowledge graph using Lagrange.

phl 37 minutes ago | parent [-]

What is Lagrange? I couldn’t find any project in the context of LLM or knowledge graph.

foul 25 minutes ago | parent | next [-]

They said they hacked a Gemini server, Lagrange is a Geminispace browser.

https://github.com/skyjake/lagrange

andsoitis 29 minutes ago | parent | prev [-]

There is a minimalist browser named Lagrange built for the Gemini protocol (a lightweight alternative to HTTP).

I’m guessing that’s what they refer to.

Humphrey 2 hours ago | parent | prev | next [-]

I've been trying out Pocketbase on a side project idea. I'm super impressed!

Having worked for many years on Django projects, Pocketbase seems like a perfect fit for those small to medium sized projects for which you don't want to create and maintain a traditional backend for.

Happy to answer any questions.

JodieBenitez 2 hours ago | parent | next [-]

Django has great GIS integration. How does Pocketbase compare here ? Also, can Pocketbase work with PostgreSQL or is it SQLite only ?

Humphrey 35 minutes ago | parent [-]

SQLite only. I haven't come across any GIS integration. I think you should choose Pocketbase when it "not having features" and being lightweight is the feature you need.

jdthedisciple 2 hours ago | parent | prev | next [-]

How easily can I migrate from an existing sqlite-based backend?

Humphrey 26 minutes ago | parent [-]

I haven't tried this... but Pocketbase is opinionated in how it's schema is structured - and it needs to be the tool managing your schema.

Therefore if it was me, I would use the Admin UI to create a new db with a similar data structure, and then use a third-party tool to select data and insert into the new database.

parkersweb an hour ago | parent | prev [-]

I’ve been using on a personal side project - but found that LLMs seem to be permanently confused over how to interact with pocketbase - to the point where I’ve even tried creating a Claude Skill to try and reduce the confusion.

Wondering if anyone else has had a similar experience?

input_sh a minute ago | parent | next [-]

From the top of https://pocketbase.io/faq/

> If you don't have the time to at least skim through the documentation and you plan to solely rely on some AI tool, then please do NOT use PocketBase!

Humphrey 21 minutes ago | parent | prev [-]

Not with Pocketbase - as I haven't found I've needed to look into the docs too much. But I have come across a whole bunch of areas LLM's seem to always answer incorrectly for. For example, ChatGPT has almost never corrected told me how to use the UI in Davinci Resolve.

9dev 36 minutes ago | parent | prev | next [-]

I'd love to read the docs, but I'm still busy playing with the googly-eye-gopher on the landing page. Super cute idea.

olalonde 2 hours ago | parent | prev | next [-]

For those unfamiliar: this is a backend server you can configure via a GUI, so you can get a working backend with little or no code. It’s great for quick prototypes, MVPs, and simple apps. The concept was popularized by Firebase.

dotancohen 2 hours ago | parent [-]

What does it actually do? Yes, I know what a backend is - and the backends I write have hundreds to thousands of lines of code that do very specific things. How can that be eliminated? What types of applications can be built with these tools?

olalonde an hour ago | parent | next [-]

It does the same things a typical CRUD backend does (REST/realtime API, authentication, authorization, validation, etc.). For example, you could use it when building a simple todo mobile app that syncs your data in the cloud. The catch is that the moment your requirements fall outside what the system supports, you are more or less f*cked.

d1sxeyes an hour ago | parent [-]

While that may be true, it is worth seriously checking the docs and working out what requirements you have or might have. Pocketbase does an awesome job of providing extensibility, likely most of the stuff you want that’s not fully out of the box can be added in 20 lines of code or so.

input_sh an hour ago | parent | prev [-]

It's meant to be a Firebase / Supabase alternative.

Yes, you can always build a better backend yourself if you know what you're doing, or you can go from zero to having a proper auth (username/password, 0auth providers, one-time emails, multi-factor) to plug into by running a binary.

Unlike Firebase, you can run it anywhere. Unlike Supabase, you don't need 10+ containers to do so.

rubenvanwyk 3 hours ago | parent | prev | next [-]

Trailbase is the same concept, but written in Rust instead of Go.

odie5533 3 hours ago | parent | next [-]

TrailBase has a comparison page https://trailbase.io/comparison/pocketbase/

cyco130 3 hours ago | parent | next [-]

What a respectfully and humbly written comparison page. Ditto for their Supabase comparison. I can't rate the objectivity since I know very little about TrailBase but they got my attention now. It brings me such joy to see such a writeup in a world where humility is perceived as weakness. Kudos.

rahulroy 39 minutes ago | parent [-]

> It brings me such joy to see such a writeup in a world where humility is perceived as weakness.

I think the trend will shift in the opposite direction with advancement of all the genAI tools.

On a personal level, my reading time has reduced. Unless I know/respect the author, I don't bother reading genAI slop.

rudedogg 3 hours ago | parent | prev [-]

I appreciate their honesty. After a quick look I’d give another point to Pocketbase for it’s admin UI. The TrailBase one is pretty sloppy (on mobile at least), and looks like it’s using bootstrap.

Pocketbase has a sense of quality/care around it that seems missing.

input_sh 2 hours ago | parent [-]

Pocketbase's admin UI is not optimised for phones at all.

raybb 2 hours ago | parent | prev [-]

Looks pretty nice! Do I understand correctly you can have it run any JS in an endpoint too? Seems you could host your whole app with this

https://trailbase.io/getting-started/first-ui-app/#custom-en...

aleda145 2 hours ago | parent | prev | next [-]

Pocketbase is awesome. I'm using it as the auth layer for my side project (https://kavla.dev/).

The hooks are great, even relatively complex things like spinning up infrastructure is easy (https://pocketbase.io/docs/go-event-hooks/)

rubenbe 2 hours ago | parent | prev | next [-]

I've built OpenSOHO using this, and it has been an amazing timesaver! Even though I modified it a bit to reuse the backend. It's clearly not what it's made for, but it wasn't too hard either. If you have a look at the screenshot, you'll recognize the Pocketbase pedigree immediately.

https://github.com/rubenbe/opensoho/

matt_callmann 2 hours ago | parent | prev | next [-]

I'll give it a try, but I'm not a fan of the SPA approach. Try using it with Templ and server-side rendering (SSR) instead of any JavaScript framework.

If anyone has already done this and can share their experience, I would love to hear about it!

jddj an hour ago | parent [-]

I can speak to this.

It works, though if you need auth/authz you'll probably want to add some middleware to get a cookie flow working instead of the jwt approach PB uses by default.

If I remember right, essentially you set the cookie on login and on auth refresh and pull it out and into the auth header on all incoming requests.

mickael-kerjean 4 hours ago | parent | prev | next [-]

Is this some sort of supabase but with sqlite and without the operational complexity?

odie5533 3 hours ago | parent [-]

Yes that is what it is.

aitchnyu 3 hours ago | parent | prev | next [-]

Whats the method to maintain a git repo of JS and unit tests? I remember a team with Firebase copy pasting code from dev to prod and between "modules" within an env and making a ton of mistakes.

EvanAnderson 4 hours ago | parent | prev | next [-]

It got some good discussion back in January, 2024: https://news.ycombinator.com/item?id=38898934

There have been a ton of releases since then. It looked like a pretty interesting project at the time. It made me want to look for a project to use it for but I never got around to it.

I'd be interested to hear from people who have been using it and how keeping up with the releases has been (compatibility / breaking changes in API, ease of migration, issues, etc).

input_sh 2 hours ago | parent | next [-]

Been using it for about a year now, but not in a way it's "intended to be". I wrote some scripts that add data to it and then I have a (static) website that pulls data from it and builds pages. So, for me it's more of a REST API and a web interface in front of sqlite than a proper auth provider (at least for now).

My biggest gripe with it by far is that the web interface is not phone-optimised at all, which prevents me from quickly correcting a field or two when I'm not behind a computer. For my use case, that happens at least once a week. Another gripe I have is that the search bar in the admin interface could be far more powerful than it currently is. Anything more complex than searching my records by exactly one field and I'm better off writing one-off scripts to do so than by using the web interface.

Good things: the control it gives me over which fields get exposed publicly, ability to resize images (instead of slowing down my build by doing so from the frontend), overall stability (never had it go down unexpectedly), S3-compatible storage, automated backups.

To give some sense of scale, ~10k records scattered across 30 or so tables (or collections as they call it), most with some attachments, and plenty of one-to-one and one-to-many relations between the tables. The database itself is only a couple of megabytes in size, but the whole backup (attachments included) is nearing 3 gigabytes now.

While updates happen pretty frequently, they don't change the parts I actually use, so I can't say I ever struggled with keeping up to date.

impure 3 hours ago | parent | prev [-]

I've been using it for a while. There was only one release that required manual migrations. I think 0.23.0 and apparently the dev is backporting security updates for those who haven't upgraded.

I use Go so all I have to do is `go get -u` and `go mod tidy` and then it's upgraded. It works great.

tommica 3 hours ago | parent [-]

How is it in production? Does it it live up to your requirements?

impure 3 hours ago | parent [-]

Yes, I use it with an RSS reader and an email app and it works great.

jharohit 2 hours ago | parent | prev | next [-]

love it. been using for personal projects.

some things that still need to be done before v1 launch:

- easy data migration in and out (right now is a pain if its large volume of data from other DB eg firebase or sqlite!)

- API/programmatic setup of tables (right now its only via UI making it hard to setup large complex tables with variable permissions)

- Multi-instance: easiest is to have another pocketbase in "mirror" mode that it updates once a day or whatever with primary (primary > secondary method like in mongo is a great mechanism, with some kind of voting for primary)

wowamit 3 hours ago | parent | prev | next [-]

> PocketBase is an open source backend consisting of embedded database (SQLite) with realtime subscriptions

I am not sure I understand—is this a wrapper around SQLite?

odie5533 3 hours ago | parent | next [-]

It makes SQLite a service that provides you with an authenticated data access layer via a REST API. It is not a wrapper although it does use SQLite as its database.

RedShift1 3 hours ago | parent | prev [-]

It creates a REST API for your SQLite database with some extras.

rjh29 an hour ago | parent | prev | next [-]

> Please keep in mind that PocketBase is still under active development and full backward compatibility is not guaranteed before reaching v1.0.0. PocketBase is NOT recommended for production critical applications yet, unless you are fine with reading the changelog and applying some manual migration steps from time to time.

thisgoodlife 44 minutes ago | parent [-]

Even for battle-tested software like Postgresql, always read the changelog and test it thoroughly before upgrading.

jddj an hour ago | parent | prev | next [-]

We use pocketbase for a lot of our internal LoB apps and it's been bulletproof. Saved us a lot of time and money.

I'm a control freak and I like well defined endpoints with well defined performance characteristics, so the expressiveness of the API is in my mind a drawback for anything public facing, but it's undeniably a great experience on the front end, and if you design your tables with the API and filters in mind you can get to a good place.

Overposting is another thing to be aware of when the db is so ergonomically shaped to the front end

sjdonado 4 hours ago | parent | prev | next [-]

This is an amazing project, can't wait to see the 1.0

wowamit 3 hours ago | parent | prev | next [-]

I am curious to better understand the benchmarks against simple SQLite, especially under typical load. Any level of latency will be an unnecessary overhead.

victorbjorklund 2 hours ago | parent [-]

How do you use simple SQLite without any code in a webapp where the database is on the server?

wowamit an hour ago | parent [-]

You can't. I am curious if this adds another layer of latency.

krzyk an hour ago | parent | prev | next [-]

I would love something similar but for frontend.

I like developing backends, but writing JavaScript is to tiring.

foul 6 minutes ago | parent | next [-]

In the last years a market for "no code" software has sprawled, just etch the interface on a tables SPA, plug Okta, plug your backend or Firebase to their apis and you should be set.

You can also find dozens of drag n drop builders and block editors working for modern frontend dev, there are a lot for React for example, just vibe code the components.

throwaway77385 23 minutes ago | parent | prev | next [-]

There are so, so many frameworks that it can be overwhelming to find a good fit, but give htmx or svelte a try, they often come up as great ways to simplify JS. I'd steer clear of NextJS. Maybe even React, as they have become convoluted messes over time that rarely offer much benefit, unless you are on a big team and working on a huge, complex code base. Though job prospects are better for those frameworks. If you use AI in your workflow, however, due to the huge amount of public knowledge available, React and NextJS can become easier to work with. Be wary of the sometimes extreme breaking changes introduced quite suddenly however.

andsoitis 19 minutes ago | parent | prev [-]

What facilities would an equivalent frontend solutuon have in your mind?

yungeeker an hour ago | parent | prev | next [-]

This is 100% sick. Have been use this for one year.

zipping1549 3 hours ago | parent | prev | next [-]

Been following this for some time now and it's a real delight to use. SSE subscription is really nice.

tommica 3 hours ago | parent [-]

Do you use it in small projects only?

ffsm8 3 hours ago | parent | prev | next [-]

Is this really realtime?

From looking at the description it sounds more like subscriptions to events of data changes that are dispatched close to the data operation

How would realtime even work for a networked system going over tcp?

https://en.wikipedia.org/wiki/Real-time_computing

SerCe 3 hours ago | parent | next [-]

I believe there is no contradiction with the definition from the linked article?

> A system is said to be real-time if the total correctness of an operation depends not only upon its logical correctness, but also upon the time in which it is performed. Real-time systems, as well as their deadlines, are classified by the consequence of missing a deadline:

> Hard – missing a deadline is a total system failure.

> Firm – infrequent deadline misses are tolerable, but may degrade the system's quality of service. The usefulness of a result is zero after its deadline.

> Soft – the usefulness of a result degrades after its deadline, thereby degrading the system's quality of service.

From what I can tell, https://pocketbase.io/ attempts to be a soft-realtime system.

phplovesong 3 hours ago | parent | prev | next [-]

There is realtime, and there is "realtime". The other one being realtime in apps doing some sort of music thing, flight controllers etc. Then there is web "realtime" that basically only means 2sec in the past-realtime.

cess11 2 hours ago | parent | prev | next [-]

It's common to distinguish between hard real-time and soft real-time (and sometimes firm real-time).

This software is supposedly soft real-time, similar to what you'd expect from e.g. an Erlang system. Delayed tasks aren't considered fatal failures but overall you get a user experience close to what hard real-time systems are supposed to deliver.

zwnow 3 hours ago | parent | prev [-]

Realtime in tech is considered in timespans with short delays allowed, last time i have read about it it was like 100ms.

anonymousiam 2 hours ago | parent | next [-]

Heh. I wasn't aware that there was a new definition of realtime. My 40+ year career consisted of about 20% realtime embedded firmware development. In all of my experience, 100ms is an absurdly long delay. Most RTOSs (that call themselves such) have latency measured in μs. The last serious RTOS that I wrote (MSP430, non-preemptive) had a firm requirement that any task must complete within 1ms. That one ran on a single threaded MCU clocked at 25MHz. It had a unix-like scheduler, with prioritized tasks, and I even threw in a 'top' display that showed per-task MCU usage, and load average.

JSR_FDED 2 hours ago | parent | next [-]

Yeah, and I’m using Pocketbase as my game engine and it isn’t giving me 60 frames per second either.

zwnow 2 hours ago | parent | prev [-]

Well Pocketbase isnt embedded firmware.

foul 11 minutes ago | parent | prev | next [-]

Are you talking about (very good) webapps?

Your average RT software has an average of 10 to 30 ms delay between operations. Performs tasks in the order of nanoseconds.

fragmede 3 hours ago | parent | prev [-]

Realtime in tech has a specific definition. The Wikipedia article covers it in more detail, but think about things like airplane wing control or space rocket computers needing to do things exactly when asked, or else people die.

zwnow 3 hours ago | parent [-]

Even that stuff has a delay.

anonymousiam 2 hours ago | parent [-]

FYI, my above referenced RTOS was for a space-based application.

JodieBenitez 2 hours ago | parent | prev | next [-]

Database, admin, auth... is this some kind of Go's Django ?

cess11 2 hours ago | parent [-]

It's a platform similar to Supabase, Firebase and the like. I guess Heroku is also a somewhat reasonable comparison.

ftchd 3 hours ago | parent | prev | next [-]

using it on mobile too

https://apps.apple.com/us/app/pocketbase-mobile-pok/id674828...

rjh29 an hour ago | parent [-]

Wow you charge a subscription for this? The Apple ecosystem is wild.

noodletheworld 2 hours ago | parent | prev | next [-]

Hmmm… firebase clones are many and varied.

Whats special about this one?

Being a single file binary doesnt impress me; thats true of many projects in many langauges.

It seems nice you can use it as a go framework if you happen to use go, but Im not really compelled by the “it doesn't scale at all” aspects of it.

Someone whos used some other similar stuff comment on why this over any of the others, eg. self hosted superbase?

gjvc an hour ago | parent [-]

Hmmm… firebase clones are many and varied.

Can you recommend any in particular, were I wanting to migrate a project from firebase?

postbase 3 hours ago | parent | prev | next [-]

Congrats on the launch!

ranger_danger 4 hours ago | parent | prev | next [-]

Apparently 1 file just means a static go binary with a bunch of separate assets compiled in.

I guess for some reason I was hoping for source code that was only one file.

wowamit 3 hours ago | parent | next [-]

Same here. At first, I thought it was a one-file-based database, which would have been even more commendable.

florians 3 hours ago | parent | prev [-]

Same

dustbunny 3 hours ago | parent [-]

Like a single header c lib from some eastern European S tier programmer.

ftchd 3 hours ago | parent [-]

tsoding mentioned

phplovesong 3 hours ago | parent [-]

I really loved his ocaml days. Learnt alot. He does only C these days, but his streams are fun to watch nontheless.

m00dy 3 hours ago | parent | prev | next [-]

I can vibe code this in rust in a day most

a96 4 minutes ago | parent | next [-]

Neat. You should do a video of that and comparing the results.

steve_adams_86 2 hours ago | parent | prev | next [-]

This project is so well thought out, you couldn't vibe code it in a week or a month. Genuinely, it's quite a wonderfully designed piece of software. It seems simple at a glance, but what makes it so good is almost intangible; it's a joy to use not only because of what it is, but what it isn't as well. And I really believe that's not something you can achieve with vibes in such short order.

Kind of like people said they could write airbnb or dropbox's software in a weekend. Sure, you can approximate it, but there's a bit of soul and momentum and history there that makes it more than a repository of code and gives it a unique capacity and potential all its own.

razemio 2 hours ago | parent | prev [-]

No, simple answer. Try it, link to the repo and I will tell you all the placed it failed. Vibe coding has its places. For something like pocketbase it most definitely is not ready yet.

postbase an hour ago | parent | prev [-]

Postbase uses PostgreSQL and BetterAuth. No GUI yet, but it's in the plan and will be called Admin (Panel).

I had the same instinct of using SQLite, but then, after a bit of research, PostgreSQL seemed a better alternative for serious projects.

andsoitis 12 minutes ago | parent [-]

Postbase, in contrast to PocketBase, doesn’t seem ready for primetime : ” Brand new project launched 02 Nov 2025, this is boiler plate but working! Expect heavy changes coming every few hours until stable

Mostly all code is ChatGPT generated but manually tested by human.”