Skip to content

feat(api): schematics catalog (backend + data model + 3 CC0 seed SVGs) - #45

Merged
ohgeeceee merged 1 commit into
mainfrom
feat/schematics-mvp
Jul 12, 2026
Merged

feat(api): schematics catalog (backend + data model + 3 CC0 seed SVGs)#45
ohgeeceee merged 1 commit into
mainfrom
feat/schematics-mvp

Conversation

@ohgeeceee

Copy link
Copy Markdown
Owner

First PR of the schematics MVP series. Establishes the read-only catalog that follow-ups (PR #2: viewer, PR #3: DTC cross-link) will build on.

Schema:

  • New 'schematics' table with slug, series, system, file_path, mime, license, tags, year range, etc. Idempotent migration via CREATE TABLE IF NOT EXISTS.

API:

  • GET /api/schematics — list/filter (series, system, q substring).
  • GET /api/schematics/ — single row, 404 if unknown, 503 if the asset file is missing on disk (distinct from not-in-catalog).

Files served by nginx from /static/schematics/.svg, never through Python (same pattern the rest of the API uses).

Seed (CC0, hand-drawn):

  • e89-z4-rcd3302-power-can — RCD 3302 retrofit, power + K-CAN tap
  • e90-cas3-pinout — CAS3/4 connector pin reference (e90)
  • e60-n54-dme-power — N54 DME main-relay + power tree (e60)

Wiring:

  • bootstrap_dtc.py seeds schematics alongside DTCs on every deploy.
  • No new Python deps. Stdlib-only, matches the rest of the backend.

Tests:

  • test_schematics.py — 18 unit tests (schema, list filters, slug lookup, mime→extension map, seed idempotency).
  • test_app_schematics_endpoints.py — 8 HTTP integration tests against a live ThreadingHTTPServer.
  • Full suite: 109/109 passing.

Out of scope (follow-ups): viewer UI, DTC cross-link, community upload pipeline, hotspot annotations, desktop bundling.

Protected paths: none touched (this PR is backend-only).

Closes: schematics-mvp#1 of the agreed 3-PR plan.

What this adds

For data contributions (community/*.toml)

  • Vehicle: chassis + engine + year
  • How verified:
  • Loads cleanly (checked the Diagnostics tab — no warnings)
  • Original / community-derived knowledge, not from ISTA or other
    proprietary software

For code contributions

  • cargo fmt and cargo clippy are clean
  • Tested against the Simulator (and, if possible, a real car — say which)
  • No BMW proprietary data or trademarks added

First PR of the schematics MVP series. Establishes the read-only catalog
that follow-ups (PR #2: viewer, PR #3: DTC cross-link) will build on.

Schema:
* New 'schematics' table with slug, series, system, file_path, mime,
  license, tags, year range, etc. Idempotent migration via
  CREATE TABLE IF NOT EXISTS.

API:
* GET /api/schematics  — list/filter (series, system, q substring).
* GET /api/schematics/<slug>  — single row, 404 if unknown, 503 if the
  asset file is missing on disk (distinct from not-in-catalog).

Files served by nginx from /static/schematics/<slug>.svg, never through
Python (same pattern the rest of the API uses).

Seed (CC0, hand-drawn):
* e89-z4-rcd3302-power-can  — RCD 3302 retrofit, power + K-CAN tap
* e90-cas3-pinout          — CAS3/4 connector pin reference (e90)
* e60-n54-dme-power        — N54 DME main-relay + power tree (e60)

Wiring:
* bootstrap_dtc.py seeds schematics alongside DTCs on every deploy.
* No new Python deps. Stdlib-only, matches the rest of the backend.

Tests:
* test_schematics.py — 18 unit tests (schema, list filters, slug
  lookup, mime→extension map, seed idempotency).
* test_app_schematics_endpoints.py — 8 HTTP integration tests against
  a live ThreadingHTTPServer.
* Full suite: 109/109 passing.

Out of scope (follow-ups): viewer UI, DTC cross-link, community
upload pipeline, hotspot annotations, desktop bundling.

Protected paths: none touched (this PR is backend-only).

Closes: schematics-mvp#1 of the agreed 3-PR plan.
@ecc-tools

ecc-tools Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

ECC bundle files are already tracked in this repository. Skipping generation of another bundle PR.

@ohgeeceee
ohgeeceee merged commit 7aa33c1 into main Jul 12, 2026
7 checks passed
@ohgeeceee
ohgeeceee deleted the feat/schematics-mvp branch July 12, 2026 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant