{
  "schema_version": 1,
  "type": "app",
  "slug": "dhl-tracker",
  "title": "DHL Tracker",
  "brief": "Internal Adom tool for tracking DHL freight + duty/VAT invoices, auto-pulling them from Gmail, and surfacing customs HS codes from freight PDFs.",
  "version": "0.2.1",
  "tags": [],
  "license": "MIT",
  "discovery_triggers": [
    "dhl",
    "dhl invoice",
    "dhl tracker",
    "freight invoice",
    "duty invoice",
    "vat invoice",
    "customs entry",
    "hs code",
    "tariff",
    "tariff refund",
    "ieepa",
    "ieepa refund",
    "track shipment",
    "shipment status",
    "mybill",
    "transaction report",
    "import customs",
    "cape",
    "duty refund"
  ],
  "discovery_pitch": "Track DHL freight + duty/VAT invoices, auto-pulled from Gmail, with HS-code extraction, tariff analysis, and IEEPA refund claims management.",
  "sample_prompts": [
    {
      "label": "Track DHL",
      "prompt": "Open the DHL tracker to review my invoices and shipments"
    },
    {
      "label": "Import invoices",
      "prompt": "Import a MyBill zip into the DHL tracker"
    },
    {
      "label": "Check refunds",
      "prompt": "Show me the IEEPA tariff refund status for my DHL shipments"
    },
    {
      "label": "Duty breakdown",
      "prompt": "What's my duty/tariff breakdown by origin country?"
    },
    {
      "label": "Sync tracking",
      "prompt": "Sync the latest DHL tracking status for all active shipments"
    }
  ],
  "install": {
    "binary_name": "dhl-tracker",
    "install_dir": "",
    "install_hint": "",
    "version_cmd": ""
  },
  "readme": "# DHL Tracker\n\nInternal Adom ERP tool for tracking DHL Express freight + duty/VAT invoices, auto-pulling them from Gmail, extracting HS codes from freight PDFs, and managing IEEPA tariff refund claims.\n\n## What it does\n\n- **Invoice tracking**: Pairs DHL's parallel invoice streams (freight + duty/VAT) by waybill. Surfaces payment status, overdue amounts, and spend breakdown.\n- **Auto-pull from Gmail**: Apps Script poller watches the dhl-invoices@adom.inc group for MyBill exports. New invoices arrive automatically — no manual CSV uploads needed.\n- **HS code extraction**: Parses freight invoice PDFs (pdftotext) for Description of Contents + HTS tables. Classifies shipments by product category (PCB, optical, electronics, etc.) and computes true tariff rates.\n- **DHL Tracking API**: Background cron syncs tracking status every 10 minutes (rate-budgeted to stay under the 250 calls/day free tier).\n- **IEEPA Refund Tracker**: Dashboard for managing tariff refund claims following the Supreme Court ruling. Auto-populates claims from eligible duty invoices, classifies by IOR/track/phase, tracks forms and action-plan checklist.\n- **Tariff analysis**: Spend-by-period breakdowns, duty-per-kg by origin, true tariff rate from declared customs values.\n\n## Stack\n\nFastify 4 + better-sqlite3 + vanilla ES modules (no build step). Runs on port 8852 in the user's Adom container. UI is a Hydrogen webview tab.\n\n## Install\n\n```bash\ngit clone git@github.com:adom-inc/dhl-tracker.git ~/project/dhl-tracker\ncd ~/project/dhl-tracker\nnpm install\n./bin/dhl-tracker.mjs install\n```\n\nThen configure `.env` with your DHL Tracking API key and inbound token.\n\n## CLI\n\n```\ndhl-tracker install         Symlink into ~/.local/bin\ndhl-tracker serve            Run server in foreground\ndhl-tracker start            Daemonise (writes data/dhl-tracker.pid)\ndhl-tracker stop             POST /api/shutdown\ndhl-tracker status           Print server state\ndhl-tracker open             Print proxy URL or add Hydrogen tab\ndhl-tracker sync-tracking    POST /api/tracking/sync\ndhl-tracker import-zip       POST a MyBill DocumentDownload.zip\ndhl-tracker tail-console     Stream UI console buffer\n```\n\n## Key views\n\n- **By shipment (AWB)**: One row per waybill with freight + duty inline. Click to expand line breakdown.\n- **Invoices**: One row per invoice. Filter by type (shipping/duty) and status.\n- **Refunds**: IEEPA tariff refund claims dashboard. KPI cards, breakdown by phase/track/IOR/status, claims table with inline editing, action-plan checklist, forms tracker.\n- **Stats**: Open AR, overdue, paid last 30d, shipping vs duty split, top senders.\n- **Tariffs**: Duty burden by origin, true tariff rate, spend-by-period table.\n\n## Data sources\n\n| Source | Method |\n|---|---|\n| MyBill CSV/XLSX/ZIP | Manual upload or Gmail auto-pull |\n| Freight PDFs | HS code + goods description extraction via pdftotext |\n| DHL Tracking API | Background cron (10-min interval, rate-budgeted) |\n| Customs duty PDFs | Entry number + entry type extraction |\n\n## Repo\n\nPrivate: [adom-inc/dhl-tracker](https://github.com/adom-inc/dhl-tracker)\n",
  "author": {
    "name": "Kyle Bergstedt",
    "email": "kyle@adom.inc"
  },
  "visibility": {
    "public": true
  },
  "hero": null,
  "metadata": {},
  "created_at": "2026-05-28T05:28:47.376Z",
  "updated_at": "2026-05-28T05:28:47.376Z",
  "skills": []
}