Overview
VIN Insight adds a PILOT navigation tab with a vehicle tree and a main panel for decoded VIN data. It loads vehicles from PILOT, lets each user save their own auto.dev API key in browser localStorage, sends selected VINs to a Cloudflare Worker endpoint, and displays both a readable summary and the raw JSON response.
Files
| File | Purpose |
|---|---|
index.html |
Cloudflare assets-root marker and simple landing page. |
Module.js |
PILOT extension entry point. Defines Store.vininsight.Module. |
_worker.js |
Cloudflare Worker proxy for auto.dev VIN decode requests. |
doc/index.html |
This static documentation page. |
Data Sources
PILOT Vehicles
The vehicle tree is loaded from the standard PILOT endpoint:
GET /ax/tree.php?vehs=1&state=1
auto.dev VIN Decode
The Worker calls the auto.dev v2 VIN endpoint with the API key supplied by the current browser user:
GET https://api.auto.dev/vin/{vin}
Authorization: Bearer USER_API_KEY
Cloudflare Worker Proxy
The extension calls:
/store/vininsight/api/vin/{VIN}
After PILOT registration, that path is proxied to the hosted Cloudflare Worker route:
https://YOUR-WORKER.workers.dev/api/vin/{VIN}
The Worker also exposes a health endpoint:
GET /api/health
Deployment
- Create a Cloudflare Worker that uses the included
_worker.jscode. - Attach this folder as static assets so
/Module.jsand/doc/index.htmlare served. - Open
https://YOUR-WORKER.workers.dev/Module.jsand confirm JavaScript source is shown. - Open
https://YOUR-WORKER.workers.dev/api/healthand confirm it returnsok: true. - Register the base URL in PILOT, for example
https://YOUR-WORKER.workers.dev/. - Use the PILOT extension name
vininsight.
Module.js URL itself. Register the base URL with a trailing slash.
Using the Extension
- Open the VIN Insight tab in PILOT.
- Click API key, enter your auto.dev API key, and save it for this browser.
- Select a vehicle from the tree.
- Click Decode selected VIN.
- Open a vehicle editor and use Decode VIN there to fill editable vehicle fields before saving.
- Use Test proxy to check the Worker with the sample VIN.
Troubleshooting
| Problem | Check |
|---|---|
Module.js returns 404 |
Upload the contents of the vininsight folder as the assets root, not a parent folder. |
| Proxy says API key is required | Click API key in the extension toolbar and save a valid auto.dev API key. |
| VIN decode returns 400 | VINs must be 17 characters and cannot include I, O, or Q. |
| No vehicles are shown | Check PILOT permissions and verify /ax/tree.php?vehs=1&state=1 returns vehicles. |