by dgudkov on 1/7/24, 6:08 AM with 149 comments
by rijavecb on 1/7/24, 12:41 PM
- It's super easy to host. I was initially thinking of using Appwrite or Supabase but found it a tricky to self-host them, especially Supabase. I could spin up Appwrite quickly via CapRover, but found it an overkill for what I needed.
- View collections [1] make it easy to return just a subset of the data that you need. In my case I'm using a view collection as a join for users and paid_users collections, where I just return their paid through date.
- The fact that you can extend it with Go or JS [2] should make it possible to completely skip having a backend, at least if your needs aren't very complex.
I definitely plan to continue using it for some smaller/side projects. Currently I'm thinking of trying to use it as CMS for an Astro blog and in the future as backend for some browser extensions.
[1] - https://pocketbase.io/docs/collections/#view-collection
by mdnahas on 1/7/24, 9:07 PM
I'm exceptionally happy with it. I'm developing an webapp for a friend's company and wanted a very simple system to hand-off. The whole thing is running with one binary: Pocketbase. It runs a webserver, server-side Javascript (compiled TypeScript) code, and SQLite database. The single process is hosted on Vultr for $12 per month. My frontend is written in SvelteKit (static adapter) + Svelte + TypeScript.
Pocketbase is well done. The author has been exceptionally responsive to my questions. He is fast and clear.
I have had a few minor issues: The documentation has bare spots (but is very good for most things). I had to write my own CSV loader. (I hope to open-source it.) Writing lots of objects through the CRUD interface is slow. (It's possible to write faster using server-side code.) Unit testing for the server-side JavaScript had to be shoehorned in. And I wish Copilot/ChatGPT could answer questions better. But these issues have been minor, given all my work on the project.
It has some quirks. There's no way to set the 404 page on the webserver. And the binary's location in the filesystem matters. It was designed for the author's use and you have to live with these choices.
As I said, I've been happy using it. It fit my needs exactly: simple and I could code everything in one language, TypeScript. Pocketbase is not high-performance, but I didn't need that. I've had a few ideas for side projects and, when I'm done this work, I'll implement one on Pocketbase because it is that easy.
And, as part of my contract, my friend's company will donate to Pocketbase. :)
by jddj on 1/7/24, 12:17 PM
The development philosophy is on point. It's genuinely pleasant, pragmatic software which serves a real purpose and it improves weekly without feature creep.
I watch the discussions and issues slowly getting more tiresome as it becomes more mainstream and worry that he'll burn out trying to keep up with the level of support he's offered until now.
I would very strongly encourage anyone using this to generate income to support the project on open collective.
by BilalBudhani on 1/7/24, 9:03 AM
After they introduced Javascript support in the backend - I feel it became a serious contender to challenge Remix, Next.js etc. frameworks.
Looking forward to v1
by melicerte on 1/7/24, 4:30 PM
Looks like a single executable, the admin interface and the database I can store on my laptop (and add it to my backup) is all I was looking for. Thank you for PocketBase and thank you for sharing it.
That's why I always come back to HN :-)
by karencarits on 1/7/24, 12:12 PM
by notyoutube on 1/7/24, 1:06 PM
* Something like row-level access control, so that people can only access the data in tables that belong to them (say clients can only view their own purchases, and also not modify them after they checked them out).
* Integration with the rest of the world, e.g. sending email, acting on triggers, etc.
* Something like CSV export/import.
* Internationalization.
Would that all be possible? Straightforward? Do those all require extending (with go or js)?
Looks like a nice tool.
by ilrwbwrkhv on 1/7/24, 4:15 PM
by sonovice on 1/7/24, 9:48 AM
by fayazara on 1/8/24, 5:22 AM
https://github.com/fayazara/pocketbase-nuxt
Example has 1. Auth 2. Route rules 3. CRUD actions 4. Realtime events 5. Storage
Needs refactoring but I really enjoyed working with it, I want to add stripe subscriptions to this taking routes rules to it's limits, not sure how yet, will figure it out.
by efields on 1/7/24, 8:06 PM
It’s just… right there :)
by Ilasky on 1/7/24, 12:01 PM
It plus SvelteKit has been a dream to get up and running using the JS SDK.
by thangngoc89 on 1/7/24, 10:38 AM
by WM6v on 1/7/24, 11:41 AM
by fullstackchris on 1/7/24, 3:39 PM
Need to spend some more time looking into these go based frameworks, they seem great for quick prototyping
by rbosinger on 1/7/24, 5:44 PM
by jadayesnaamsi on 1/7/24, 4:36 PM
Where does it come from?
Why is it useful here?
What are the alternatives? Advantages/Drawbacks?
Is there an article somewhere, outside of the Pocketbase docs, presenting that pattern?
- https://github.com/pocketbase/pocketbase/blob/master/core/ap...
- https://github.com/pocketbase/pocketbase/tree/master/tools/h...
by twsted on 1/7/24, 1:28 PM
I am building something similar but at a lower level and based on PostgreSQL.
https://github.com/sted/smoothdb
It aims to be compatible with the PostgREST API.
by turtlebits on 1/7/24, 6:40 PM
by eternityforest on 1/7/24, 11:47 AM
Really nice, looks like something I'd love to work with someday!
by Fire-Dragon-DoL on 1/7/24, 7:50 PM
by tiffanyh on 1/7/24, 6:54 PM
Aren't there entire classes of problems that shouldn't exist for SQLite because it's intended to be an embedded database, as opposed to a client/server architecture like Postgres/Supabase?
And as such, I'm confused why this exists.
by miguelgargallo on 1/13/24, 5:25 PM
by chazeon on 1/7/24, 3:25 PM
by tamimio on 1/7/24, 4:51 PM
by tommica on 1/7/24, 8:23 PM
by mihalycsaba on 1/8/24, 9:36 AM
by rolisz on 1/7/24, 11:10 AM
by account-5 on 1/7/24, 11:35 AM
by mrwyndham on 1/8/24, 2:52 AM
by remram on 1/7/24, 3:24 PM
Or is it actually the backend, e.g. the frontend (browser) talks to it directly?
by imperialdrive on 1/7/24, 7:48 PM
by igtztorrero on 1/7/24, 2:50 PM
by RamblingCTO on 1/8/24, 1:18 PM
by xsumirx on 1/7/24, 12:33 PM
by Humphrey on 1/8/24, 12:06 AM
by wg0 on 1/7/24, 7:53 PM
The simplicity is simply mind boggling!
Going to give it a try!
by air7 on 1/7/24, 4:34 PM
by jarekceborski on 1/7/24, 9:04 PM
by 082349872349872 on 1/7/24, 11:15 AM
by oschvr on 1/7/24, 9:05 AM
by brabel on 1/7/24, 10:58 AM
As a bonus, the same file runs on basically any OS without any dependencies on the local system, not even libc.
by Fire-Dragon-DoL on 1/7/24, 11:56 PM
by bambax on 1/7/24, 12:19 PM
by saasjosh on 1/7/24, 12:01 PM
by punnerud on 1/7/24, 1:24 PM
by zffr on 1/7/24, 3:44 PM
by TruthWillHurt on 1/7/24, 1:23 PM
Having the auth, db and file server in the same service.. an attacker doesn't even need lateral traversal or privilege escalation once inside..
by doublerabbit on 1/7/24, 12:02 PM