Files
Autoparts-DB/dashboard
consultoria-as d4d1c9b7ba Implement complete autoparts catalog system (5 phases)
FASE 1: Parts Database
- Added part_categories, part_groups, parts, vehicle_parts tables
- 12 categories, 190 groups with Spanish translations
- API endpoints for categories, groups, parts CRUD

FASE 2: Cross-References & Aftermarket
- Added manufacturers, aftermarket_parts, part_cross_references tables
- 24 manufacturers, quality tier system (economy/standard/premium/oem)
- Part number search across OEM and aftermarket

FASE 3: Exploded Diagrams
- Added diagrams, vehicle_diagrams, diagram_hotspots tables
- SVG viewer with zoom controls and interactive hotspots
- 3 sample diagrams (brake, oil filter, suspension)

FASE 4: Search & VIN Decoder
- SQLite FTS5 full-text search with auto-sync triggers
- NHTSA VIN decoder API integration with 30-day cache
- Unified search endpoint

FASE 5: Optimization & UX
- API pagination (page/per_page, max 100 items)
- Dark mode with localStorage persistence
- Keyboard shortcuts (/, Ctrl+K, Escape, Backspace, Ctrl+D)
- Breadcrumb navigation
- ARIA accessibility (labels, roles, focus management)
- Skip link for keyboard users

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 07:13:46 +00:00
..
2026-01-19 08:45:03 +00:00

Vehicle Database Dashboard

A web-based dashboard for searching and filtering vehicle data from your database.

Features

  • Filter vehicles by brand, model, year, and engine
  • Responsive web interface with Bootstrap
  • Real-time filtering and search
  • Detailed vehicle information display
  • Modern UI with cards and badges

Prerequisites

  • Python 3.x
  • Flask (installed via sudo apt-get install python3-flask)
  • SQLite database with vehicle data (created in the vehicle_database directory)

Setup

  1. Make sure you have the vehicle database created in the ../vehicle_database/vehicle_database.db path
  2. Install Flask: sudo apt-get install python3-flask
  3. Run the dashboard server: python3 server.py

Usage

  1. Start the server:

    cd dashboard
    python3 server.py
    
  2. Open your web browser and navigate to http://localhost:5000

  3. Use the filters on the left panel to search for vehicles:

    • Select a brand from the dropdown
    • Select a model (based on the selected brand)
    • Select a year
    • Select an engine type
    • Click "Search Vehicles" to apply filters
  4. The results will appear in the right panel with detailed information

API Endpoints

The dashboard uses the following API endpoints:

  • GET /api/brands - Get all vehicle brands
  • GET /api/models?brand=[brand] - Get models for a specific brand
  • GET /api/years - Get all years
  • GET /api/engines - Get all engines
  • GET /api/vehicles?[filters] - Search vehicles with optional filters

File Structure

dashboard/
├── index.html          # Main dashboard page
├── dashboard.js        # Frontend JavaScript
├── server.py           # Flask backend
├── requirements.txt    # Python dependencies
├── start_dashboard.sh  # Startup script
└── README.md           # This file

Customization

You can customize the dashboard by:

  • Modifying the CSS styles in index.html
  • Adding more filters in the JavaScript
  • Changing the layout in index.html
  • Adding more vehicle details in the display

Troubleshooting

  • If the server won't start, make sure the vehicle database exists
  • If filters don't populate, check that the database has data
  • If the page doesn't load, verify that Flask is installed correctly