Thanks, JusanSG for clearing my question and you are right I want to know how API work and I have plan to build a web version and launch it on firebase hosting then I can use Cloudflare mobile redirect to my original foodomaa install site when the user comes on mobile it will redirect it to original PWA and when user com from the desktop it will stay there and I will achieve desktop redirect with Cloudflare page rule and .htaccess
Here is an example:
user 1 visit type website.com from desktop he will be on the desktop version in another word headless website using API to call from main cms which will be hosted at m.website.com.
User two visits to website.com and will be redirected to the mobile site (the original script of foodomaa) using cloudflare mobile redirect and if user type m.website.com from desktop he will be redirected to website.com by Cloudflare page rule and .htaccess