How johanwilfer/siephp works
Project type and purpose
• This is an open-source PHP library (not a full‐stack app) whose sole purpose is to export bookkeeping data into the Swedish SIE format (currently SIE4).
• Key indicators: a “src” folder containing domain/data classes, a “Dumper” component, examples, and no “frontend” or “backend” web folders.
File structure
• Top‐level artifacts
• composer.json / composer.lock – declares it as a PHP library
• src/SIE/Data – domain model classes (Company, Account, Transaction, Verification, etc.)
• src/SIE/Dumper – SIEDumper which turns a populated Company model into a text stream
• src/SIE/Exception – domain exceptions (validation errors)
• examples/ – consumer code showing how to build the model and call the dumper
• tests/ – PHPUnit tests covering Data and Dumper
• docker/, compose.yml – development containers for PHP 8.3–8.5
• CI config in .github/workflows – automated code checks
• Patterns: a clear separation between domain model, dumping logic, and usage examples/tests.
README for additional insights
• Confirms the library builds around simple data‐classes, then dumps to SIE.
• No runtime web/API server—pure in-process library.
• Example usage: create Company → add Accounts & VerificationSeries → add Verifications & Transactions → validate → dump.
Detail is key
• Every folder as a component if it plays a role (e.g., tests + CI)
• Future maintainers can glance at it and instantly see how data flows from client code into the SIE file via the model and dumper layers.