The e-invoice-eu repository is a monorepo providing a toolchain for generating EN16931-compliant electronic invoices (UBL, CII, Factur-X/ZUGFeRD, XRechnung) from spreadsheet data or JSON. It consists of a core TypeScript library, a CLI tool, a NestJS-based REST API server, and documentation. The core library implements a strategy pattern for format services, a factory for creating them, a mapping service for spreadsheet-to-invoice transformation, and validation services. The architecture is modular and well-tested, with clear separation of concerns.
Invoice Ninja is a full-featured open-source invoicing and billing platform designed for small to medium businesses. It handles the complete lifecycle of invoices, quotes, credits, purchase orders, payments, and expenses. The system supports multi-tenant SaaS and self-hosted deployments with per-company database isolation, and integrates with over 20 payment gateways (Stripe, PayPal, Mollie, GoCardless, etc.). It provides client and vendor portals for self-service, along with extensive reporting, CSV export, and e-invoicing capabilities (Peppol, Verifactu, France e-reporting). The application follows a monolithic MVC architecture built on a custom PHP framework (Illuminate) similar to Laravel. It uses an event-driven architecture with domain events and listeners for side effects (email, webhooks, activity logging). Background jobs are queued for async processing. The frontend uses Blade templates, Livewire components, and a separate React app for some admin panels. The API is RESTful with OpenAPI documentation. Key entry points are HTTP controllers under app/Http/Controllers, with request validation classes. Core data flows involve creating entities through factories, persisting via repositories, and triggering events that listeners handle. Payment flows go through abstract payment drivers that encapsulate gateway-specific logic. The system also includes extensive reporting, CSV export, and e-invoicing (Peppol, Verifactu, France e-reporting). External dependencies include a relational database (MySQL/PostgreSQL), Redis for caching and queues, Elasticsearch for search, and various third-party APIs for payment processing, tax calculation (ZipTax), bank integration (Nordigen, Yodlee), email delivery (Mailgun, Postmark, Brevo), and e-invoicing gateways (Storecove, Qvalia).