moatasimm/erpnext-saas-provisioning ? reverse-engineered prompt

Reverse engineered prompt

Build me a small Python service that can automatically create new ERPNext tenant sites for a SaaS setup, with Saudi Arabia defaults already applied.

I want an API I can call to provision a new customer site from a subdomain and admin password, then check the job status, list existing sites, delete a site, and run a post setup step after the user finishes the ERPNext setup wizard. It should also handle the usual server setup work like creating the site, installing ERPNext and ZATCA related setup, configuring Nginx and SSL, and applying Saudi defaults like country, SAR currency, and Arabic language. After the wizard, it should create the VAT setup the business needs, including the standard tax accounts and templates.

Please make it easy to deploy on a server, include health check and clear logging, and use an API key for protection. If you need current ERPNext or Frappe setup details, look up the latest docs online and wire it up in a practical way.