Live data from Hacker News

Pocketbase: Open-source back end in one file

pocketbase.io

61–70 of 151 posts

Re: Pocketbase: Open-source back end in one file

#61

What minimal front-ends are there that one could combine with this minimal back-end to provide a minimal end-to-end?

I would say - htmx ( https://htmx.org/ ) - Alpine.js ( https://alpinejs.dev/ ) both are minimal and very easy to get started.

are you using one of them or both? I'm using htmx and not sure if I really need alpine.js yet.

Re: Pocketbase: Open-source back end in one file

#62

Earlier quoted context omitted.

Been enjoying using PocketBase with Astro + htmx + Alpine

nice! I'm curious to know why would you need Alpine or Htmx if you have one of them in your app? I thought they are mutually exclusive.

htmx = client-server networking Alpine = JS sprinkles

Alpine is for example, I want to show/hide a menu on mobile. I want to upload files via drag and drop. I want to have a bin icon over an image when I hover with mouse to delete it. I want to double click an input field to edit it. I want to close an overlay when I click outside of it, or when I press “esc”.

Also modals, although you can do them in htmx very nicely too, so that’s borderline.

Anything that involves network, htmx. Things that are just frontend, Alpine suits better.

_hyperscript is basically the Alpine equivalent.

It's like the difference between Turbo and Stimulus in the Rails world

Re: Pocketbase: Open-source back end in one file

#63

Earlier quoted context omitted.

nice! I'm curious to know why would you need Alpine or Htmx if you have one of them in your app? I thought they are mutually exclusive.

htmx = client-server networking Alpine = JS sprinkles Alpine is for example, I want to show/hide a menu on mobile. I want to upload files via drag and drop. I want to have a bin icon over an image when I hover with mouse to delete it. I want to double click an input field to edit it. I want to close an overlay when I click outside of it, or when I press “esc”. Also modals, although you can do them in htmx very nicely…

Gotcha! I'm gonna dig more into this stack. Thanks for breaking it down for me.

Re: Pocketbase: Open-source back end in one file

#64
post #53
post #31

I've been using Pocketbase in production for a few months now, with alpinejs on the front end. 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…

What other technologies in the stack you have?

There are two C# services which do some background bits and pieces.

This logic could have been put within pocketbase as well, but the body of work they depend on was already .net.

Other than that it's just little JavaScript callbacks in the back and typescript in the front.

There isn't much missing that you truly need to bolt things on for, provided SQLite is appropriate for your usecase.

Re: Pocketbase: Open-source back end in one file

#67
post #65

I am a bit confused, is it the backend's backend? E.g. something that is used by the HTTP server app, like a DBMS would be? Or is it actually the backend, e.g. the frontend (browser) talks to it directly?

It can be the backend itself if you just need auth (both authentication and authorization) and your SQL tables to be a REST API. This often suits frontend single page applications in JS/TS and Pocketbase also provides a JS SDK to ease this (with realtime updates). It's a similar model to Firebase but without the lock-in.

However if you want to write more logic you can also import Pocketbase as a library and extend it with hooks, custom endpoints etc. all written in Go.

Edit: Added more info about using Pocketbase with a JS SPA frontend.

Re: Pocketbase: Open-source back end in one file

#68
post #57

Pocketbase is amazing! So far I had a great experience using it as a backend/database for the app I'm building where I'm using React with Vite for the frontend. I'm using it mainly for auth and for keeping track of paid and free accounts. Some things that I found rather useful: - 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 Supabas…

I feel like super easy to host needs to be re-emphasized. We're talking about dropping a single binary into your server and you're off to the races. If only more things were so simple.

Didnt docker make this easy for all projects?

Re: Pocketbase: Open-source back end in one file

#69
post #57

Earlier quoted context omitted.

I feel like super easy to host needs to be re-emphasized. We're talking about dropping a single binary into your server and you're off to the races. If only more things were so simple.

Didnt docker make this easy for all projects?

Not really because then projects started needing multiple containers and orchestration, and might be fussy about the order the different services come up.
Post reply on HN