Thanks to visit codestin.com
Credit goes to github.com

Skip to content

way-platform/vin-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

38 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

vin-go

Go Reference Go Report Card License: MIT

A Go SDK for decoding Vehicle Identification Numbers (VINs).

Features

  • Standards Compliant: ISO 3779 and SAE J1044 parsing logic.
  • OEM-specific Decoding: Parsers for European commercial vehicles
  • Data Enrichment: Integrated datasets from NHTSA vPIC, German KBA, and open sources.
  • Validation: Check digit verification (North America) and structural analysis.
  • Structured Output: Strictly typed Protobuf / JSON data model.

Installation

Library

go get github.com/way-platform/vin-go

CLI

go install github.com/way-platform/vin-go/cmd/vin@latest

Usage

Library

package main

import (
    "fmt"
    "log"

    "github.com/way-platform/vin-go"
)

func main() {
    v := "W1T98300010712345"
    decoded, err := vin.Decode(v)
    if err != nil {
        log.Fatalf("Error: %v", err)
    }
    fmt.Printf("Region: %s\n", decoded.GetRegion())
    fmt.Printf("Manufacturer: %s\n", decoded.GetManufacturer().GetDisplayName())
    fmt.Printf("Brand: %s\n", decoded.GetVehicle().GetBrand())
    fmt.Printf("Model: %s\n", decoded.GetVehicle().GetModel())
}

CLI

vin decode W1T98300010712345

Output (JSON):

{
  "value": "W1T98300010712345",
  "wmi": "W1T",
  "vds": "983000",
  "vis": "10712345",
  "year": 2001,
  "region": "EUROPE",
  "country": "GERMANY",
  "calculatedCheckDigit": "0",
  "checkDigitValid": true,
  "manufacturer": {
    "kbaId": 7070,
    "country": "GERMANY",
    "brands": ["MERCEDES_BENZ"],
    "dataSources": ["KBA", "WIKIBOOKS"]
  },
  "vehicle": {
    "brand": "MERCEDES_BENZ",
    "type": "HEAVY_GOODS_VEHICLE",
    "model": "E_ACTROS",
    "fuelTypes": ["ELECTRIC"],
    "dataSources": ["DEEP_RESEARCH"]
  }
}

Data Sources

This SDK combines data from various sources to provide comprehensive VIN decoding. The following diagram illustrates the primary data flows:

graph BT
    %% Root Node
    Root["vin.Decode"]

    %% Data Sources Level
    KBA["KBA"]
    vPIC["vPIC"]
    Wikibooks["Wikibooks"]
    Wikipedia["Wikipedia"]
    DeepResearch["Deep Research"]

    %% Source Details Level
    KBAPDF["πŸ“„ PDF Document"]
    vPICDB[("MS SQL Database")]

    %% Connect Sub-sources to Sources
    KBAPDF --> KBA
    vPICDB --> vPIC

    %% Connect Sources to Root
    KBA --> Root
    vPIC --> Root
    Wikibooks --> Root
    Wikipedia --> Root
    DeepResearch --> Root
Loading

Development

Prerequisites

  • Go 1.24+

Build

./tools/mage build

License

MIT License - see LICENSE for details.