- Reuse a single SQLite connection instead of open/close per query
- Add in-memory cache for frequently accessed data (brands, models,
categories) — 1000x faster on repeated access
- Enable WAL journal mode, 8MB cache, 64MB mmap for faster reads
- Cache terminal size per render cycle to avoid repeated getmaxyx()
- Close DB connection on app exit
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Models and engines tables have many duplicate names (e.g. 24 ASTRA rows,
210 F-150 rows, 398 "5.7L 350CID V8" rows). Changed get_models() and
get_engines() to use GROUP BY UPPER(name) instead of DISTINCT on id+name
so each model/engine appears only once in the navigation lists.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Console README with usage instructions, keybindings reference, architecture
overview, and test commands. Updated root README with console section, updated
architecture diagram, and installation instructions. Includes approved design
doc and implementation plan.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add MockRenderer-based integration tests that verify the full screen-to-
renderer pipeline without a real terminal. Update main.py with proper
--db flag handling, database existence check, startup banner, and
graceful error handling.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implement TextualRenderer in console/renderers/textual_renderer.py using
the Rich library for a modern dark-themed TUI with blue/cyan accents.
All 18 BaseRenderer methods are implemented: lifecycle (init_screen,
cleanup), primitives (clear, refresh, get_key, get_size), widgets
(draw_header, draw_footer, draw_menu, draw_table, draw_detail,
draw_form, draw_filter_list, draw_comparison, draw_text, draw_box),
and dialogs (show_message, show_input). Keyboard input uses raw
terminal mode via tty/termios with full escape sequence decoding
for arrow keys, F-keys, Page Up/Down, Home/End.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add the three core modules that all screens depend on:
- keybindings.py: Key constants (curses codes) and KeyBindings registry
- navigation.py: Stack-based screen navigation with breadcrumbs
- screens.py: Screen base class with on_enter/on_key/render lifecycle
Includes 31 tests covering all public APIs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implement console/db.py with Database class providing all data access
methods for the console application, plus 36 passing tests in
console/tests/test_db.py covering vehicle navigation, parts catalog,
search, VIN cache, stats, manufacturers, and admin CRUD operations.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix breadcrumb group name fetch using existing /api/categories/<id>/groups
- Fix diagramModalLabel → diagramModalTitle DOM ID mismatch
- Replace bootstrap.Modal.getInstance() with classList.remove('active') for modal close
- Escape single quotes in brand/model names in breadcrumb onclick handlers
- Implement editAftermarket() form population in admin panel
- Handle VIN decoder response wrapper in landing page
- Fetch models count from API instead of hardcoded '13K+'
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Make brand and model name queries case-insensitive using UPPER()
- Add /api/diagrams/<id>/hotspots endpoint for fetching diagram hotspots
- Add /admin and /landing clean URL routes for HTML pages
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add admin interface (admin.html, admin.js) for managing catalog data
- Add enhanced search module with advanced filtering capabilities
- Expand server.py with new API endpoints and admin functionality
- Add Gonher catalog import scripts (import_gonher_catalog.py, import_gonher_complete.py)
- Add demo data population script and sample CSV data
- Update customer landing page and dashboard with UI improvements
- Update database with enriched vehicle and parts data
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Vehicle cards now display 6 motor data fields:
1. Fuel type (Gasolina/Diésel/Híbrido/Eléctrico)
2. Power (HP)
3. Torque (Nm) - NEW
4. Displacement (formatted as liters, e.g., 3.0L)
5. Cylinders
6. Engine config (V6, I4, etc. - derived from name)
Changes:
- dashboard.js: Added helper functions for formatting
- getEngineConfig(): Extracts V6, I4, H4, etc. from engine name
- formatDisplacement(): Converts cc to liters
- formatFuelType(): Spanish translations
- server.py: Added torque_nm to vehicles API response
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
New script (enrich_engine_data.py):
- Parses engine names to extract displacement, cylinders, fuel type
- Estimates HP and torque based on engine characteristics
- Turbo engines get +35% power estimate
- Handles V6, V8, I4, diesel, electric, hybrid patterns
Results:
- 13,287 engines updated with technical data
- 99% coverage for displacement_cc
- 59% coverage for cylinders
- 99.9% coverage for fuel_type
- 95.7% coverage for power_hp and torque_nm
Example data:
- Chevrolet avg: 4945cc, 337HP, 7.6 cyl
- Toyota avg: 2767cc, 202HP, 6.5 cyl
- BMW avg: 3117cc, 262HP, 8.7 cyl
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Added 108 brands total:
- 90 main brands (international)
- 18 regional brands (Mexico, China, etc.)
Features:
- Interactive menu with multiple options
- Search brand by name
- Select by initial letter
- Process range of brands (e.g., 1-10)
- View all brands status with pagination
- Skip wait time with ENTER
- Years: 1975-2026, 5 years per batch
New brands: Dodge, Honda, Mitsubishi, Jeep, BMW, Fiat,
Hyundai, Infiniti, Kia, Land Rover, Lexus
Features:
- Interactive menu to select brand and batch
- Skip wait time by pressing ENTER
- Years range: 1975-2026
- 5 years per batch with 3 min pause
- Base de datos SQLite con información de vehículos
- Dashboard web con Flask y Bootstrap
- Scripts de web scraping para RockAuto
- Interfaz CLI para consultas
- Documentación completa del proyecto
Incluye:
- 12 marcas de vehículos
- 10,923 modelos
- 10,919 especificaciones de motores
- 12,075 combinaciones modelo-año-motor