guruperl/mlm ? reverse-engineered prompt

Reverse engineered prompt

Build me a complete multi level marketing web app with a member portal, admin backend, shopping, ticketing, and automated commission tracking.

I want people to be able to register, manage memberships, join under a sponsor, place orders, and see their downline and earnings. The system should support the built in bonus plans, Unilevel, Team, Pairing, and Affiliate, and make it easy to add new ones later. Please also include the basic backend tools for managing members, products, compensation data, and ledger style records.

Make it run with a MySQL database, and keep the app usable as a normal web app plus a JSON API for mobile or external clients. If it helps, look up current docs online for anything unclear, and keep the code organized so it matches a real production ready open source project. I’d also like sensible sample data, config files, and a clean setup so I can test it locally without too much work.