Tax system in production
DTE Electronic Invoicing System
Production tax platform that connects a legacy system with the modern electronic invoicing flow, reducing manual work and improving traceability.
Production
Tools
- Next.js
- TypeScript
- PostgreSQL
- AWS
- JWT
- Docker
- Playwright
- Zod
- Cloudflare
- ESLint
- pnpm

A faster, more traceable fiscal operation
Real impact
- +300 monthly invoices handled in production
- Saved more than half of the invoicing time
- Eliminated double entry between the legacy system and DTE
- Integration with the Ministry of Finance, PDF, email, and storage
- Better traceability of documents issued, sent, and backed up
- Internal control over the fiscal workflow without relying entirely on third parties
A modern fiscal flow connected to a legacy system
Operational problem
The company needed to adapt to electronic invoicing as required in El Salvador, but its operations depended on a legacy system with no direct integration. The old process forced people to re-enter information, review data manually, and issue documents through too many steps, increasing operational time and the risk of errors.
Automation, issuance, signing, delivery, and backup
Implemented solution
Built a full-stack web system for issuing Electronic Tax Documents, pulling data from the legacy system through authorized Playwright automation, validating the information, generating the fiscal JSON, signing it, sending it to the Ministry of Finance, generating a PDF, sending emails, and storing backups securely.
The pieces that support the full DTE flow
Modules and integrations
- Issuance of invoices, tax credit receipts, credit notes, and excluded-subject receipts
- Data extraction from the legacy system using Playwright
- Generation and validation of JSON against fiscal schemas
- Digital signing of documents with RS512 JWT
- Submission of documents to the Ministry of Finance
- PDF generation with a graphical representation of the DTE
- Transactional email delivery to customers
- Storage of JSON and PDF files in AWS S3
- Secure document access via signed URLs
- Storage lifecycle policies for long-term backups
- Authentication, sessions, and internal access control
- Reporting and lookup of issued documents
Technology applied to a real fiscal process
Technical decisions
- Next.js as the full-stack framework for the interface and system logic
- TypeScript to model complex fiscal flows with greater safety
- Playwright to automate authorized extraction from the legacy system
- JWT and RS512 signing to meet the digital signature flow
- PDFKit to generate the document’s graphical representation
- AWS S3 to store fiscal documents and backups
- Signed URLs for temporary, secure file access
- Docker to deploy components with dependencies such as Playwright
Full development, implementation, and maintenance
My role
I designed, developed, implemented, maintained, and deployed the system end to end. I worked on the fiscal logic, the issuance experience, integration with external services, PDF generation, digital signing, authentication, storage, and adapting to the company’s real operational workflow.
Fewer steps for a critical task
Issuance experience
The interface was designed to reduce the process to the minimum number of steps: select the document type, enter the series and correlative from the legacy system, load the information, review key data, and issue. The goal was for a critical, repetitive task to be completed quickly, with clear validations and less risk of human error.
A fiscal system demands precision, traceability, and judgment
Key takeaway
The biggest lesson was that a fiscal system isn’t solved with code alone: it requires mastering business rules, official schemas, strict validations, human errors, traceability, deployment, and operational trust. I also reinforced the value of adapting modern technology to legacy systems without disrupting the real workflow.