Iāve been having this idea for about a year. The idea to switch the Panel file storage system to a database.
Use 20.000+ pages in the Panel
In some cases when we have 20.000+ child pages with the same parent, with categories, tags, search etc. Itās commonly asked if Kirby is still the way to go. Most of us say yes, Kirby has database support. Then how can we use the Panel for it? Short answer, we canāt. It would take too long to load, especially the page listings.
Using a database in the panel
Iāve been thinking of the idea how Kirby could implement a database solution in the Panel. If Kirby is going to set up a databas structure, it would not be optimal for all sites, because every database structure is very different. Kirby could never get it right. One database structure does not fit all, if we want the real strength of a database, performance.
Solution
To not have Kirby set up a database structure, we need to figure out a way to be able to do it ourselves. I think being able to register three components could solve the problem.
PanelListing component
When using this component we could change the listing of the children of a page. Instead of list pages from the folder structure we could populate it from the database.
PanelPage component
This component could be used to present the data into the Panel page form. Send it as an array would probably be the best. Then the panel can just present the data in the form.
PanelSave component
On save if we have this component it could hijack the save function and let us to what we want, save data to the database in this case and trigger a success or an error.
There are probably some pitfalls that I did not think about, but so far I like the idea to be able to control the data in and out of the panel. These components could probably be used for other things as well.