Share My Creation SithasoDaisy: PocketBase Database Schema & Data Sync Source Code @ $10.00

Hi

Netlify Demo

The purpose of this tool is to sync your pocketbase database instances. I have synced a database source residing on PocketHost to a local hosted database, ensuring these have the same schema and records.

1691956165568.png



 
Last edited:

Mashiane

Expert
Licensed User
Longtime User


Transcript

The purpose of this tool is to sync schemas and data between two instances of pocketbase databases. This tool has been developed using b4x, a rapid application development toolset from Anywhere Software. The IDE being used is called b4j, more like basic for java, and is used to develop desktop applications that run on windows, linux and mac-os. One is also able to create web applications, single page applications and websites using b4j. This is possible because of a code transpiler, named Banano. The b4x programming language is a feel at home language that resembles visual basic. With it, one is able to create native android and iOS mobile applications too. It also boasts a nice abstract designer.

Once our app is transpiled to JavaScript, it runs on our default web browser. With this app we want to sync schemas between two instances of pocketbase. One instance is running locally on our PC, and the other instance is running on pockethost. We want to replicate some collections of our choice to the local hosted instance. To access collections in pocketbase, one needs the administrator credentials. We developed our front end using DaisyUI, a TailwindCSS component framework, right inside b4j. The end result is a pure native javascript web application.

The application will get all our collections from the source database, and then list them. Those collections that are not on the target database will be color coded with red. One can then choose which collections to sync to the target. The application will get the schemas and the data of the selected collections and then perform the sync process, giving a result of how many records were synced. Once this process is complete, the table is updated with the outcome.

A notification will also indicate that the process is complete. One can then go and check the target database of the result. In this case we wanted to sync all the pmu collections, this has now been done.
 
Last edited:
Top