How tips-sa/facturacionelectronicapy-recibo-xmlgen works
Project type and purpose
• This is a Node.js library (an open-source tool) whose sole responsibility is to generate the XML “Recibo” file compliant with Paraguay’s SIFEN (SET) schema.
• It consumes a JSON data structure and produces a validated, standards-compliant XML payload to be sent later to the SET endpoint.
File structure
• Top-level:
• package.json, tsconfig.json, tslint.json – Node/TypeScript config and dependencies
• src/index.ts – library entry point
• src/services/… – collection of cohesive service modules, each encapsulating a logical piece of the XML generation process
• src/services/type.interface.ts – shared TypeScript interfaces for the JSON input structure
• The “services” folder shows a clear separation of concerns: utilities (FechaUtil, StringUtil, constants), JSON validation and transformation (JsonReciboValidate, JsonReciboDocumentoAsociado), XML-specific algorithms and assembly (reciboXmlAlgoritmos, reciboXmlTotales), and the orchestration layer (reciboXmlMain).
README for additional insights
• Describes the module’s purpose: XML generation from JSON for SIFEN
• Mentions companion packages for signing, QR generation, and API interaction, indicating that this is one component in a larger suite
Final advice
• Don’t group all services into one blob—each service is a separable component