phoenixadi2002/saas_whatsapp_frappe_crm ? reverse-engineered prompt

Reverse engineered prompt

Build me a Frappe based SaaS master control panel for a proof of concept.

I want a simple admin app where I can create a new tenant from a web form, enter the tenant slug, optional website title, PostgreSQL database name and password if the database already exists, and the tenant admin login details. After I submit it, the app should create a Tenant Request record, queue the provisioning work in the background, and show me whether it is still running, done, or failed.

The provisioning should set up a new Frappe CRM site for that tenant, and if a database name is provided it should install CRM into that existing Postgres database instead of making a new one. Please include the API endpoint for backend payment hooks too, plus the shared secret check. Keep it compatible with a normal Frappe bench setup, and make sure it can use remote Postgres if those settings are configured. If you need current Frappe docs, look them up online.