6.3 KiB
6.3 KiB
System Overview
What Is This Tool?
The Ford BnP (Build & Price) QC system is an automated quality control pipeline for Ford vehicle configurator asset packs. These asset packs are ZIP files containing:
- A
linkingrecord.jsonmanifest that describes every image in the pack, its type, viewing angle, features, and layer information - Hundreds of images (JPEG, PNG, AVIF) — exterior/interior renders, color chips, carousel thumbnails, beltline animations, and more
The QC system extracts the ZIP, parses the manifest, and runs 14 sequential checks that validate everything from image resolutions and file formats to business logic like MEC/BAU compliance and series permutation coverage. It produces an HTML report summarizing all findings.
Modes of Operation
The system runs in two distinct modes:
| Mode | Entry Point | Use Case |
|---|---|---|
| CLI | qc_engine.py |
Local development, ad-hoc testing, manual QC runs |
| Box Hotfolder | ford_qc_box_hotfolder_process.py |
Production — monitors a Box folder, auto-processes new uploads |
Both modes execute the same QC checks via the same profile. The difference is how files arrive and where reports go.
High-Level Pipeline
flowchart LR
A[Asset Pack ZIP] --> B[Extract & Verify]
B --> C[Run 14 QC Checks]
C --> D[JSON Results]
D --> E[HTML Report]
style A fill:#f9f,stroke:#333
style E fill:#9f9,stroke:#333
Component Architecture
flowchart TB
subgraph Entry Points
CLI[qc_engine.py<br/>CLI Interface]
HOT[ford_qc_box_hotfolder_process.py<br/>Production Service]
end
subgraph Core
MOD[qc_module.py<br/>Library Interface]
end
subgraph Utilities
CFG[utils/config.py<br/>Configuration]
PR[utils/path_resolver.py<br/>Path Resolution]
CH[utils/check_helpers.py<br/>Check Helpers]
end
subgraph Checks
C1[unzip_and_verify_check]
C2[colour_existence_check]
C3[missing_images_check]
C4[special_requirements_mec_bau]
C5[mec_powertrain_validation]
C6[lifestyle_inventory_validation]
C7[image_resolution_check]
C8[image_format_check]
C9[file_size_check]
C10[image_linking_check]
C11[layer_depth_check]
C12[check_series_permutations]
C13[beltline_validation_check]
C14[extra_carousel_validation_check]
end
subgraph Reporting
HR[html_reporter.py<br/>QC Report]
HER[html_error_reporter.py<br/>Error Report]
end
subgraph Config
PROF[profiles/ford_bnp.json<br/>Check Definitions]
ENV[.env.prod / .env.dev<br/>Environment Config]
end
CLI --> PR
CLI --> C1 & C2 & C3 & C4 & C5 & C6 & C7 & C8 & C9 & C10 & C11 & C12 & C13 & C14
HOT --> MOD
MOD --> PR
MOD --> C1 & C2 & C3 & C4 & C5 & C6 & C7 & C8 & C9 & C10 & C11 & C12 & C13 & C14
HOT --> CFG
HOT --> HR & HER
CLI --> HR & HER
PR --> PROF
CFG --> ENV
C7 & C8 & C9 & C11 & C13 --> CH
Directory Structure
Ford_BnP_QC/
├── checks/ # QC check modules + reporters
│ ├── __init__.py
│ ├── unzip_and_verify_check.py # Check 1: ZIP extraction & manifest validation
│ ├── colour_existence_check.py # Check 2: Color chip file presence
│ ├── missing_images_check.py # Check 3: Image file existence
│ ├── special_requirements_mec_bau.py # Check 4: MEC/BAU rules
│ ├── mec_powertrain_validation.py # Check 5: MEC powertrain requirements
│ ├── lifestyle_inventory_validation.py # Check 6: Lifestyle/inventory rules
│ ├── image_resolution_check.py # Check 7: Image dimensions
│ ├── image_format_check.py # Check 8: Image format validation
│ ├── file_size_check.py # Check 9: File size limits
│ ├── image_linking_check.py # Check 10: Orphan image detection
│ ├── layer_depth_check.py # Check 11: Layer/filename consistency
│ ├── check_series_permutations.py # Check 12: Series combination coverage
│ ├── beltline_validation_check.py # Check 13: Beltline frame validation
│ ├── extra_carousel_validation_check.py # Check 14: Extra carousel WERS coverage
│ ├── html_reporter.py # Generates HTML QC reports
│ └── html_error_reporter.py # Generates HTML error reports
├── utils/
│ ├── config.py # Centralized environment configuration
│ ├── path_resolver.py # Working directory resolution
│ └── check_helpers.py # Shared check utilities
├── profiles/
│ └── ford_bnp.json # Production QC profile (14 checks)
├── tests/ # Unit tests for individual checks
├── example packs/ # Sample asset packs for testing (~37GB)
├── working/ # Temp extraction directory (gitignored)
├── reports/ # Local QC reports output (gitignored)
├── download_tmp/ # Box download cache (gitignored)
├── log/ # Service logs (gitignored)
├── qc_engine.py # CLI entry point
├── qc_module.py # Library interface (used by hotfolder)
├── ford_qc_box_hotfolder_process.py # Production Box monitoring service
├── ford-qc-hotfolder-prod.service # Systemd service (production)
├── ford-qc-hotfolder-dev.service # Systemd service (development)
├── .env.example # Environment config template
├── requirements.txt # Python dependencies
└── CLAUDE.md # AI assistant instructions
Technology Stack
| Component | Technology | Version | Purpose |
|---|---|---|---|
| Runtime | Python | 3.8+ | Core language |
| Image Processing | Pillow | 11.1.0 | Resolution/format validation |
| Cloud Storage | Box SDK | 3.13.0 | Box API integration |
| Authentication | PyJWT + cryptography | 2.10.1 / 44.0.0 | Box JWT auth |
| Configuration | python-dotenv | 1.0.1 | Environment variable management |
| HTTP | requests | 2.32.3 | Network operations |
| Process Management | systemd | 235 | Production service lifecycle |