← Selected work
AUTOMOTIVE DIAGNOSTICS / PYTHON / PLATFORM STUDY
Automotive DTC Codes Platform

Canonical database and hybrid search API for 14,204 automotive fault codes.

An open-source diagnostic trouble code platform combining PostgreSQL trigram and full-text search, Redis caching, FastAPI endpoints, PDF/OCR ingestion pipelines, portable SQLite exports, and a static GitHub Pages JSON API.

PythonFastAPIPostgreSQLRedisDockerMIT

Open-source automotive diagnostic platform and static JSON API. Schema, ETL pipeline, and API verified on GitHub.

PACKAGE ENGINEERING

Normalizing fragmented OBD-II and OEM fault codes into one search engine.

Automotive diagnostic trouble codes are often trapped in inconsistent manufacturer PDFs, disparate CSV dumps, and scanner firmware lacking severity context, standardized system taxonomy, or bilingual coverage.

The Automotive DTC Codes Platform consolidates 14,204 fault codes across OBD-II, J1939, and UDS into a strict canonical JSON schema and normalized PostgreSQL database with pg_trgm trigram and full-text hybrid search.

Alongside the containerized FastAPI + Redis + PostgreSQL service and Python CLI, the four-stage pipeline exports portable SQLite files for offline diagnostic tools and publishes a serverless static JSON API via GitHub Pages.

INDEXED CODES14,204 DTCs
STANDARDSOBD-II, J1939, UDS
REST APIFastAPI + Redis + PostgreSQL
SEARCH ENGINEpg_trgm + Full-Text Hybrid
LOCALESen-US & pt-BR
STATIC APIlucasveneno.github.io/dtc
EDGE EXPORTPortable SQLite + JSON
LICENSEMIT
QUICK START & INTEGRATION

Docker stack, CLI lookup, and static JSON API.

Provision PostgreSQL, Redis, and the FastAPI service with ./setup.sh, run diagnostic lookups via src/service/cli.py, or query 14,204 pre-exported codes on GitHub Pages.

dtc — FastAPI Service, CLI Lookup & Static JSON APIPYTHON 3.10+ / FASTAPI / POSTGRES
Terminal — Setup, CLI & FastAPI
# Provision PostgreSQL, Redis & ingest pipeline
./setup.sh

# CLI lookup & bilingual search
python src/service/cli.py lookup P0300
python src/service/cli.py search "misfire" --locale pt-BR

# FastAPI REST search with X-API-Key
curl -H "X-API-Key: dev_key_2026" \
  "http://localhost:8000/search?q=P010"
Static API — GET /api/dtc/P0300.json
{
  "code": "P0300",
  "system": "powertrain",
  "category_letter": "P",
  "generic": true,
  "description": "Random/Multiple Cylinder Misfire Detected",
  "severity": "critical"
}
01. Dual Runtime & Zero-Cost Static Distribution. Serve hybrid PostgreSQL search and trend analytics through FastAPI, or fetch pre-generated /api/dtc/{CODE}.json, /api/dtc/{PREFIX}xx.json, and /api/dtc/index.json endpoints directly from GitHub Pages.
TECHNICAL ARCHITECTURE

From legacy PDFs to hybrid diagnostic search.

A four-stage ETL pipeline feeding both a Redis-cached FastAPI backend and portable offline/static artifacts.

01

4-Stage ETL & OCR Pipeline

src/pipeline/ handles Extraction from JSON, CSV, and PDF manuals (with OCR fallback for scanned legacy files), Normalization against schema/dtc.schema.json, PostgreSQL Ingestion, and SQLite/static export.

02

PostgreSQL pg_trgm Hybrid Search

schema/schema.sql models dtc_codes, dtc_definitions, manufacturers, systems, and severities, pairing PostgreSQL full-text search with trigram similarity ranking for typo-tolerant suggestions.

03

FastAPI Service, Auth & Analytics

src/service/api.py verifies X-API-Key credentials, caches responses in Redis, logs query metrics to search_analytics, and exposes /dtc/{code}, /search, /trends, /stats, Swagger UI, and ReDoc.

04

Static JSON API & Portable SQLite

export_static_api.py generates 14,204 per-code JSON files, prefix bundles, and index.json for GitHub Pages, while export_sqlite.py outputs lightweight SQLite databases for edge and mobile scanners.

PLATFORM CAPABILITIES

API Surface, Pipeline Modules & Stack

14,204 CODES • MIT
API & CLI ENDPOINTS
  • GET /dtc/{code}?locale=en-US|pt-BR
  • GET /search?q=...&limit=20&offset=0
  • GET /trends, /stats & /health
  • CLI: lookup & search commands
  • Static: /api/dtc/{CODE}.json & index.json
DATA & PIPELINE
  • schema/dtc.schema.json canonical model
  • schema/schema.sql with pg_trgm extension
  • extract_aptta.py, extract_dicas.py & mega_merge.py
  • deduplicate.py & normalize.py
  • export_sqlite.py & export_static_api.py
RUNTIME & DEPLOYMENT
  • Python 3.10+ & FastAPI REST backend
  • PostgreSQL + Redis container stack
  • Swagger UI (/docs) & ReDoc (/redoc)
  • GitHub Pages static API & search portal
  • MIT License
OPEN SOURCE PLATFORM

Built transparently under the MIT License.

The Automotive DTC Codes Platform is open source under the MIT License. Explore the schema, Python ETL pipeline, FastAPI service, and live static API on GitHub and GitHub Pages.

EXPLORE PACKAGEBTC & Altcoins Trend IndicatorEXPLORE PACKAGESignal Dashboard: Traffic Light PanelEXPLORE PRODUCTStokivEXPLORE PRODUCTCatalisador
LET’S BUILD WHAT’S NEXTIDEA → PRODUCTION

Have something
worth building?

Tell us what you’re working on.

Start a conversation

New product · Existing platform · Engineering partnership · Technical challenge