Skip to content

Repository files navigation

WDS Viewer

Modern web viewer for BMW WDS (Wiring Diagram System) data. Replaces the legacy Java applet-based system with a fast, responsive SvelteKit application.

License Node Svelte

Features

Navigation & Search

  • πŸ“ Tree Navigation β€” hierarchical browsing with collapsible folders
  • πŸ” Global Search β€” find diagrams and info pages by name instantly
  • πŸ“œ History β€” quick access to recently viewed items
  • ⭐ Favorites β€” bookmark frequently used diagrams/info pages
  • πŸ“‚ Collections β€” organize items into named collections

Diagram Viewer

  • πŸ–ΌοΈ SVG Diagrams β€” interactive wiring diagrams with pan & zoom
  • πŸ”— Clickable Links β€” navigate between diagrams or trigger searches
  • 🏷️ Label Scaling β€” adjust text size independently of zoom
  • πŸ–¨οΈ Print Support β€” optimized print layout for diagrams

Info Pages

  • πŸ“ Markdown Rendering β€” technical documentation with images
  • πŸ” Image Magnifier β€” Alt+hover to zoom into image details (5x, 300px lens)
  • πŸ“‘ Section Navigation β€” jump to headings via sidebar
  • πŸ”— Related Diagrams β€” quick links to referenced schematics

Interface

  • πŸŒ™ Dark Mode β€” system-aware theme with manual toggle
  • πŸ“± Resizable Panels β€” drag to adjust tree/content split
  • ⌨️ Keyboard Shortcuts β€” efficient navigation
  • πŸ’Ύ PWA Ready β€” installable, works offline with cached data

Project Structure

wdsx/
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ core/          # Shared TypeScript types
β”‚   β”œβ”€β”€ importer/      # CLI: WDS β†’ JSON/SVG/MD converter
β”‚   └── viewer/        # SvelteKit web application
β”œβ”€β”€ Dockerfile         # Production container (nginx)
└── docs/              # Additional documentation

Documentation

  • User Guide β€” visual walkthrough of all viewer features (with screenshots)

Quick Start

Prerequisites

  • Node.js 22+
  • pnpm 9+
  • BMW WDS source data (not included)

Install

git clone https://github.com/emdzej/wdsx.git
cd wdsx
pnpm install

Importer User Guide

The importer converts legacy BMW WDS data into a modern web-friendly format.

Commands

list-models β€” Discover Available Models

pnpm --filter @emdzej/wds-importer exec wds-importer list-models \
  --source /path/to/wds/release \
  --language us

Shows all vehicle models available in your WDS source.

import β€” Convert WDS Data

pnpm --filter @emdzej/wds-importer exec wds-importer import \
  --source /path/to/wds/release \
  --output apps/viewer/static/data \
  --language us

Options:

Option Default Description
--source <path> ~/WDS/release Path to WDS release folder
--output <path> ./data Output directory for converted files
--language <code> us Source language folder (us, de, etc.)
--models <list> all Comma-separated model IDs (e.g., e46,e60,e90)
--parallel <n> 4 Number of parallel workers
--tree-only false Import only tree data, skip shared files
--dry-run false Validate without writing files
--verbose, -v false Enable detailed logging

Examples:

# Import all models
wds-importer import --source /mnt/wds/release --output ./data

# Import specific models only
wds-importer import --models e46,e90 --source /mnt/wds/release

# Add a new model to existing data (tree-only mode)
wds-importer import --models e60 --tree-only --output ./data

# Validate before actual import
wds-importer import --dry-run --verbose --source /mnt/wds/release

validate β€” Check Source Data

wds-importer validate --source /path/to/wds/release --verbose

Validates source data integrity without writing files.

stats β€” Show Import Statistics

wds-importer stats --output ./data

Displays summary of imported data (diagram count, info pages, etc.).

Output Structure

After import, the output directory contains:

data/
β”œβ”€β”€ models.json           # Vehicle model list with metadata
β”œβ”€β”€ diagrams/
β”‚   β”œβ”€β”€ index.json        # Diagram metadata index
β”‚   └── *.svgz            # Compressed SVG diagrams
β”œβ”€β”€ info/
β”‚   β”œβ”€β”€ index.json        # Info page metadata index
β”‚   └── *.md              # Markdown documentation
β”œβ”€β”€ trees/
β”‚   └── <model-id>.json   # Navigation tree per model
└── zi_images/
    └── *.png             # Info page images

Running the Viewer

Local Development

# Ensure data is imported first
pnpm --filter @emdzej/wds-importer exec wds-importer import \
  --source /path/to/wds/release \
  --output apps/viewer/static/data

# Start dev server
pnpm dev

Opens at http://localhost:5173

Production Build (Static)

pnpm build

Output: apps/viewer/build/ β€” serve with any static file server.

Docker

Build Image

docker build -t wdsx:latest .

Run Container

docker run -d \
  --name wdsx \
  -p 8080:80 \
  -v /path/to/data:/data:ro \
  wdsx:latest

Access at http://localhost:8080

Volume Mount:

  • /data β€” Mount your imported WDS data directory here

Docker Compose

version: '3.8'
services:
  wdsx:
    image: ghcr.io/emdzej/wdsx:latest
    ports:
      - "8080:80"
    volumes:
      - ./data:/data:ro
    restart: unless-stopped

Environment

The container uses nginx and expects:

  • Static app files at /usr/share/nginx/html (built-in)
  • Data files mounted at /data

Health check endpoint: GET /health


Keyboard Shortcuts

Key Action
/ or Ctrl+K Focus search
Escape Close search / clear selection
Alt + hover Activate image magnifier (info pages)

Tech Stack

  • Framework: SvelteKit 2 + Svelte 5 (runes)
  • Styling: Tailwind CSS
  • Build: Vite + Turborepo
  • SVG Interaction: Custom pan/zoom implementation
  • Markdown: marked
  • Container: nginx (Alpine)

Note: Original BMW WDS data is property of BMW AG and is not included in this repository. You must provide your own legally obtained WDS source files.

Right to Repair

The Right to Repair movement advocates for consumers' ability to fix the products they own β€” from electronics to vehicles β€” without being locked out by manufacturers through proprietary tools, paywalled documentation, or artificial restrictions.

I build these tools because I believe repair is a fundamental right, not a privilege.

Too often, service manuals, diagnostic software, and technical documentation are kept behind closed doors β€” unavailable to individuals even when they're willing to pay. This wasn't always the case. Products once shipped with schematics and repair guides as standard. The increasing complexity of modern technology doesn't change the fact that capable people exist who can β€” and should be allowed to β€” use that information.

These projects exist to preserve access to technical knowledge and ensure that owners aren't left at the mercy of vendors who may discontinue support, charge prohibitive fees, or simply refuse service.

Support

If you find this project useful, consider buying me a coffee β˜• or sponsoring on GitHub.

License

Licensed under PolyForm Noncommercial 1.0.0 β€” free for personal and educational use, no commercial use permitted.

About

BMW Wiring Diagram System - Modern web port of legacy Java applet WDS

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Contributors

Languages