Recent

Author Topic: Pocketbase  (Read 1890 times)

steve612

  • Newbie
  • Posts: 4
Pocketbase
« on: March 12, 2026, 09:10:08 pm »
Hello team,

What is your opinion making a database application using Pocketbase for backend?

Is it possible to use DbGrid will something like this. I am a beginner please advice :)

Main reason is to avoid direct connection with database, but use something between database and Application, in case you host online.
« Last Edit: March 12, 2026, 09:16:57 pm by steve612 »

PierceNg

  • Sr. Member
  • ****
  • Posts: 434
    • SamadhiWeb
Re: Pocketbase
« Reply #1 on: March 13, 2026, 01:30:48 am »
Their how-to-use intro says,

Quote
The easiest way to use PocketBase is by interacting with its Web APIs directly from the client-side (e.g. mobile app or browser SPA).

It was designed with this exact use case in mind and it is also the reason why there are general purpose JSON APIs for listing, pagination, sorting, filtering, etc.

Other than the web API, there are also Javascript and Dart SDKs.

From Pascal, the API is your best bet. Then you're building a Pascal SDK for Pocketbase, essentially. But https://github.com/pocketbase/pocketbase/issues/945 was closed "not planned" on providing an OpenAPI/Swagger API spec. So no automatic code gen, meaning you'll have to wrap the APIs in Pascal manually.

Pocketbase is a simpler, one-server non-scalable clone of Firebase/Supabase. The latter two have unofficial Delphi SDKs which may or may not be usable with FPC/Lazarus.

steve612

  • Newbie
  • Posts: 4
Re: Pocketbase
« Reply #2 on: March 13, 2026, 05:50:42 pm »
Thanks for the information!

What is your opinion would building a public API for Lazarus would help?

With local databases Lazarus is great but not secure hosting a database over the internet with Lazarus that interacts with it. That is the main goal.

PierceNg

  • Sr. Member
  • ****
  • Posts: 434
    • SamadhiWeb
Re: Pocketbase
« Reply #3 on: March 14, 2026, 06:29:04 am »
If you make a database open over the Internet then it will be attacked. Here's a recent example; if no data of value was lost I suppose one can lol it off: https://akselmo.dev/posts/they-broke-my-server/

Services like Firebase and Supabase are backed by big money to buy the people and tech to protect their databases. Other people build server-side applications to expose a smaller (than databases) surface to their data.

As for Pocketbase, are you planning to self-host or use their cloud service?

If you are self-hosting, you may want to look into mORMot to program both server- and client-side in Pascal instead.

 

TinyPortal © 2005-2018