Download the PHP package azaharizaman/nexus-statutory without Composer
On this page you can find all versions of the php package azaharizaman/nexus-statutory. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download azaharizaman/nexus-statutory
More information about azaharizaman/nexus-statutory
Files in azaharizaman/nexus-statutory
Package nexus-statutory
Short Description Statutory reporting engine for generating tax and regulatory reports in country-specific formats
License MIT
Informations about the package nexus-statutory
Nexus\Statutory
Statutory reporting engine for generating tax and regulatory reports in country-specific formats (XBRL, JSON, XML, CSV).
Overview
The Statutory package provides a framework-agnostic engine for generating statutory reports required by regulatory authorities. It supports multiple output formats and can be extended with country-specific adapters for compliance with local regulations.
Features
- Report Generation: Generate statutory reports (P&L, Balance Sheet, Tax Forms, Payroll Reports)
- Multiple Formats: Support for JSON, XML, XBRL, CSV, PDF, Excel
- Default Adapters: Built-in default implementations for basic accounting and payroll
- Country-Specific Adapters: Extensible architecture for country-specific requirements
- Metadata Management: Comprehensive report metadata (schema, validation, filing frequency)
- Validation Engine: Schema validation before report submission
- Framework-Agnostic: Pure PHP with no Laravel dependencies
Installation
Architecture
This package follows the Nexus architecture principles:
- Framework-Agnostic: No Laravel dependencies in core services
- Contract-Driven: All external dependencies defined via interfaces
- Adapter Pattern: Country-specific implementations via adapters
- Default Implementations: Safe defaults for basic functionality
- Value Objects: Immutable objects for domain concepts (FilingFrequency, ReportFormat)
Package Structure
Usage
Generating Statutory Reports
Payroll Statutory Calculations
Report Metadata
Supported Report Formats
Filing Frequencies
Default Adapters
The package includes two default adapters:
- DefaultAccountingAdapter: Basic P&L, Balance Sheet, Trial Balance (JSON/CSV only)
- DefaultPayrollStatutoryAdapter: Zero deductions (safe default for testing)
These adapters provide safe defaults when no country-specific adapter is configured.
Creating Country-Specific Adapters
To create a country-specific adapter (e.g., Malaysia):
Integration with Applications
This package defines contracts that must be implemented by the consuming application:
- Repository Implementations: Implement all repository interfaces with Eloquent models
- Entity Implementations: Implement all entity interfaces
- Database Migrations: Create required tables in application layer
- Service Provider Bindings: Bind interfaces to implementations in IoC container
- Adapter Registration: Register country-specific adapters based on feature flags
Required Tables (Application Layer)
Dependencies
- PHP: ^8.3
- azaharizaman/nexus-finance: *@dev (for financial data extraction)
- azaharizaman/nexus-period: *@dev (for period management)
- psr/log: ^3.0 (for logging interface)
Development
Running Tests
Code Style
This package follows PSR-12 coding standards.
📖 Documentation
Quick Links
- 📘 Getting Started Guide - Setup, core concepts, and first integration
- 📚 API Reference - Complete interface and service documentation
- 🔧 Integration Guide - Laravel and Symfony integration examples
- 💡 Basic Examples - Report generation basics
- 🚀 Advanced Examples - Country adapters, XBRL, multi-format
Package Documentation
- 📋 Requirements - Detailed requirements specifications (61 requirements)
- 📊 Implementation Summary - Development progress and metrics
- ✅ Test Suite Summary - Test coverage and strategy (55 tests planned)
- 💰 Valuation Matrix - Package valuation and ROI analysis ($95K)
Additional Resources
- 🏗️ Architecture Guidelines - Nexus architecture principles
- 📖 Package Reference - All Nexus packages overview
- 📑 Compliance/Statutory Analysis - Package separation rationale
Integration with Other Packages
This package integrates with:
- Nexus\Finance - Financial data extraction (GL accounts, trial balance)
- Nexus\Period - Period validation and fiscal year management
- Nexus\Tenant - Multi-tenancy context
- Nexus\Payroll - Payroll statutory calculation delegation
- Nexus\Accounting - Financial statement generation
- Nexus\Compliance - Operational compliance (separate from statutory reporting)
License
MIT License. See LICENSE file for details.
Contributing
Contributions are welcome! Please follow the Nexus architecture principles:
- Keep the package framework-agnostic
- Define all dependencies via interfaces
- Use immutable Value Objects for domain concepts
- Place all business logic in services
- No database access or migrations in this package
- Country-specific logic belongs in separate adapter packages
Support
For issues, questions, or contributions, please refer to the main Nexus monorepo documentation.