Automated Customs Declarations (DUA) Processing Engine
Operational Challenge
Round-the-clock customs document processing for supply chain logistics required an operations department working continuous 24/7 shifts. Manual compilation of customs declarations and spreadsheets for the port agency generated shipping delays, port detention surcharges, and compliance risks.
What the Solution Solves
Development and production deployment of the automated customs declaration engine for Mercadona:
- PHP Processing & Excel Generation: Pre-flight data validation rules and automated generation of structured Excel spreadsheets required by the port authority.
- Direct Integration with Itramit: Native connection to Itramit customs services for expedited filing and clearance of customs records.
Production Risks & Failures Prevented
- Prevents Port Logistics Stalls: Immediate automated document preparation ensuring shipments are not held up with expensive demurrage fees.
- Prevents Tariff Compliance Errors: Pre-submission business rule validation eliminating inconsistencies on high-value cargo.
- Cuts Operational Overhead by 50%: Halved the manual workload required by the 24/7 operations team.
Engineering Notes & Systems Design
Technical trade-offs, performance benchmarks, and lessons learned building mission-critical software.
Laya on CPU, No GPU: What I Measured on Three Machines Before Putting It in Production
38ms was with a GPU. On CPU, 94 to 848ms depending on the machine. Real benchmarks, the thread trap, ONNX vs PyTorch, and how the deployment ended up on a VPS.
Hexagonal Architecture and DDD in Laravel: Decoupling Domain from Eloquent with DTOs and Repositories
How to architect complex enterprise applications in Laravel without letting Eloquent pollute business rules: Ports and Adapters, immutable PHP 8.2 Value Objects, and strict layer boundaries.
PHP at Planetary Scale: Slack, Meta, Strict Typing with PHPStan, and Fibers Concurrency (Part 4)
Why tech giants like Slack, Wikipedia, and Meta continue investing in PHP: the operational economics of stateless workloads in Kubernetes, maximum static analysis, and cooperative concurrency with Fibers.