I am working on an project which is completely offline (windows), the frontend is in react where i display a base map using react-leaflet library, and i serve the base map through a node backend from XYZ directory files stored locally. I'm trying to find a better solution to serve the map files for my frontend. The XYZ directory files stored locally are huge and its a pain when my end user need a new map displayed in the frontend. As of right now, i create new maps using QGIS as XYZ directory and send it to them, and they would have to copy the entire folder to the project directory. I'm looking for a solution where they can upload the map file (like osm or any other readily available format) from the frontend and the node backend do the conversion. This way my clients don't have to access the project directory directly.
So i guess what i am looking for is a solution to convert osm file to mbtiles format or xyz directory files format in my node backend so that it can be served to my react app. Is this possible ?
PS: I'm a beginner and new to GIS.
I tried using tilerser-gl and i was able to use mbtiles, which is a better option than xyz files because of smaller size. But i would rather have the user download the osm file from geofabrik and upload it from the frontend whenever they need a new map.