greenter/core
Greenter Core provides shared definitions and abstractions for the Greenter ecosystem. Use it as the foundation for building Peru electronic invoicing (SUNAT) solutions, with common contracts and core structures used across Greenter packages.
SaleDetail, DespatchDetail, ErrorCodeProvider) aligns well with domain-driven design (DDD) for financial/ERP systems.BaseSale, Notification, Attachment) suggests it can be integrated as a self-contained module within a Laravel app, avoiding tight coupling with core business logic.AppServiceProvider).spatie/pdf or dompdf).sales, sale_details, despatch_details, etc. Migrations would need alignment with existing schemas (e.g., renaming Unit → UnitMeasure if conflicts arise).symfony/validator). If these are outdated, they could introduce security vulnerabilities or PHP version incompatibilities.| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Deprecated PHP/Symfony | High | Fork/rebase to PHP 8.2+ and Laravel 10+ |
| XML/PDF Generation | Medium | Test with spatie/pdf or custom renderer |
| Validation Conflicts | Medium | Isolate validator logic or use PHP attributes |
| No Active Maintenance | High | Plan for long-term support (e.g., internal fork) |
| UBL 2.1 Compliance | Low | Validate against Sunat’s latest schemas |
07, 08, 39) for our use case?Sale, Notification) can map cleanly to Laravel’s Eloquent models or API resources, with custom accessors/mutators for Sunat-specific fields (e.g., sunat_code).GreenterInvoiceService).ErrorCodeProvider) to concrete implementations.spatie/pdf for PDF rendering or Laravel Excel for XML exports.GreenterDocumentRenderer service to handle UBL 2.1 templates.#[\Validated]).vendor/greenter-adapter) to wrap Greenter with Laravel-friendly interfaces.SaleDetail).pipeline to isolate Greenter’s middleware.Notification system aligns with webhook requirements.FacturaElectronica) with Greenter.1001 for "Invalid IGV").ErrorCodeProvider outputs to track Sunat rejections.laravel-invoices) would require significant refactoring.Illuminate\Support\Facades\Cache for repeated templates).generate-invoice-pdf:delayed).sale_details and despatch_details tables are indexed for high-read scenarios.How can I help you explore Laravel packages today?