Teaching a compliance platform to read tariff books
A trade-compliance product: classify a product, then see the duties, regulations and landed cost for any trade lane, grounded in official sources.
- Role
- Product engineer
- Timeline
- Feb 2026 to Sept 2026
- Status
- In development
- Stack
- NestJS, AWS Lambda, Step Functions, DynamoDB, React
- Problem
- Tariff and dangerous-goods rules arrive as APIs, spreadsheets and PDFs that differ by country.
- What I did
- Built tariff adapters for six countries behind one API, and parsed the UN dangerous-goods list into structured records.
- Result
- 2,835 dangerous-goods records and 139 packing instructions the product can query and cite.
The system
Every country publishes its tariff and regulatory data differently: some through APIs, some as spreadsheets, others as sectioned or scanned PDFs and government portals. Compliance answers are only as good as that data, so ingestion has to be exact and traceable back to its source.
Product engineer on a two-person team in 2026. I built country tariff adapters and the dangerous-goods parser on a serverless ingestion pipeline my teammate designed, and the landed cost calculator and material-intelligence workflow in the web app.
- jurisdictions
- 10
- DG records parsed
- 2,835
From official sources to answers in the app. Hover or tap a node.
A PDF that became a database
The UN list of dangerous goods is published as an eleven-column PDF table, full of abbreviations, legends and references to special provisions and packing instructions. I wrote the parser that turns it into queryable records: legends and catalogs are expanded, special provisions and packing instructions become a companion table, and edge cases like the class 7 and class 9 packing notes survive intact.
The result is 2,835 structured records and 139 packing instructions, stored as facts rather than copied text, so the app can answer questions instead of quoting a PDF.
Sole author of the module, with about 1,150 lines of tests.
Ten countries, one shape
I built the tariff adapters for India, New Zealand and Pakistan and the export-code lookups for Australia, Canada and the US. India merges trade-policy chapters with separate duty lookups; New Zealand's headings come out of sectioned PDFs; each needed its own parsing, but all expose the same seed, preview and export endpoints.
On top, a normalized HS hierarchy (sections, chapters, headings and their siblings) is shared across the Australian, Chinese, Japanese, Canadian, US and New Zealand data, so the product can compare like with like across a trade lane.
From data to answers
In the web app I built the landed cost calculator and a three-step material intelligence workflow: upload a requirements spec, extract the requirements, benchmark them, then assess a material's compliance, with progress and results at each step.
Decisions worth defending
Store derived facts, not document text
Structured records can be queried, compared and cited; a pasted PDF paragraph can only be read.
One API shape for every source
Seed, preview and export behave the same for every country, so adding a jurisdiction is a parser, not a new integration.