Propose new Mautic features
#MauticRoadmap Building Mautic together!
Änderungen an „Marketplace database“
Titel
- +{"en"=>"Marketplace database"}
Haupttext
-
+["
Has your proposal been discussed on the Mautic Forums already?
https://forum.mautic.org/t/mautic-marketplace/12108Is your feature request related to a problem? Please describe.
The marketplace is using Packagist API which is very limited. We cannot filter for example packages that have requirements on Mautic 5. We could get the list of the packages and filter in the UI, but in the list view we get only limited information and the required libraries are missing.So instead we've created the Allow List where we manually set the minimal Mautic version for each package. But that's tedious and so not many packages are listed in the Marketplace.
Another issue is that we need to support at least 2 types of packages:
- mautic-plugin
- mautic-theme
Because both types are installable via Marketplace. But Packagist API does not allow us to get both in 1 request. If we try use 2 requests then we get twice as many packages than the user requested by the pagination settings. So if the user wants 10 packages per page, they get 20. And what to do in the next page?
Another issue is that the API doesn't allow us to sort by any parameter.
In summary, we cannot build a good package listing using just the Packagist API.
Describe the solution you'd like
I suggest to build a simple app that will periodically download the packages from Packagist and dump the data to a publicly accessible database that each and every Matuic instance could connect to by a simple API.The tricky part is the database. It must be hosted somewhere together with the API layer and cron job. We can start a new DO droplet for example but I fear it will get outdated fast as we have no dev ops team in the community and it could become an security nightmare for all Mautic instances.
I'm following Supabase for a while and just browsing through their docs it seems it has all we'd need out of the box. It's a hosted Postgres database with generous free plan, it's open source so if we grow out we can either pay for the increased metrics or host it ourselves (or ask for a free account for OS). But it also has edge functions that can react on database changes or use cron. It has also REST API (also GraphQL) out of the box so we won't have to build the API layer.
It would solve around 75% of the features we need for this public marketplace database/API and we'd have to just write the edge function that would insert the date from Packagist to Supabase every day or so.
Describe alternatives or workarounds you've considered
Perhaps we could use a similar APP to dump all packages into a big JSON file to avoid the database part. Then each Mautic instance would download it once in a while and dump it to its own database table which we could use to load the UI.The issue here is that it won't scale as the package list will get longer. And remember that each package can have tens of versions so the size will grow fast.
Does this issue could impact on users private data?
We could gather our own statistics on what plugins were installed, add our own rating, reviews. Plugin developers could get stats on what Matuic and PHP versions is the plugin installed. We'd have to agree what data to send to the database from Mautic instances to this middleware service.Funded by
\ngid://app/Decidim::Hashtag/2/_Mautic gid://app/Decidim::Hashtag/3/_MauticFeatures"]
Just me so far. Any funding is welcome!