aghfatehi/django-zatca — reverse-engineered prompt
Reverse engineered prompt
Build me a reusable Django package for Saudi ZATCA Fatoora e invoicing that I can plug into an existing accounting system.
It should handle Phase 1 simplified invoices by creating the proper TLV QR code and returning it as an SVG. It should also support Phase 2 for onboarding an EGS unit, creating the needed keys and CSR, storing certificates, signing invoice XML, and sending invoices to ZATCA for clearance or reporting.
Please include Django models to keep certificate and invoice submission logs, management commands for onboarding, checking setup, and syncing an invoice, plus simple REST endpoints for status, onboarding with an OTP, and invoice sync. I want settings to work from Django settings or environment variables, with sandbox and production options.
Keep it production ready, tested, and compatible with modern Django and Python versions. Add clear README examples for installation, configuration, generating a QR code, onboarding, and submitting an invoice.
Want more depth? Deep Reverse