feat: migrate to PostgreSQL + SQLAlchemy ORM, rebrand to Nexus Autoparts

- Migrate from SQLite to PostgreSQL with normalized schema
- Add 11 lookup tables (fuel_type, body_type, drivetrain, transmission,
  materials, position_part, manufacture_type, quality_tier, countries,
  reference_type, shapes)
- Rewrite dashboard/server.py (76 routes) using SQLAlchemy text() queries
- Rewrite console/db.py (27 methods) using SQLAlchemy ORM
- Add models.py with 27 SQLAlchemy model definitions
- Add config.py for centralized DB_URL configuration
- Add migrate_to_postgres.py migration script
- Add docs/METABASE_GUIDE.md with complete data entry guide
- Rebrand from "AUTOPARTS DB" to "NEXUS AUTOPARTS"
- Fill vehicle data gaps via NHTSA API + heuristics:
  engines (cylinders, power, torque), brands (country, founded_year),
  models (body_type, production years), MYE (drivetrain, transmission, trim)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-19 05:24:47 +00:00
parent 7ecf1295a5
commit 7b2a904498
41 changed files with 3519 additions and 3489 deletions

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin Panel - Autopartes DB</title>
<title>Admin Panel - Nexus Autoparts</title>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Orbitron:wght@700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="/shared.css">
<style>

View File

@@ -1,6 +1,6 @@
/**
* Admin Panel JavaScript
* CRUD operations and CSV import/export for Autopartes DB
* CRUD operations and CSV import/export for Nexus Autoparts
*/
// State

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AutoParts DB - Tienda de Autopartes</title>
<title>Nexus Autoparts - Tu conexión directa con las partes que necesitas</title>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Orbitron:wght@400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="/shared.css">
<style>
@@ -1095,7 +1095,7 @@
<div class="footer-brand">
<div class="logo">
<div class="logo-icon">⚙️</div>
<div class="logo-text">AUTOPARTS DB</div>
<div class="logo-text">NEXUS AUTOPARTS</div>
</div>
<p>Sistema de catálogo de autopartes con navegación jerárquica, diagramas explosionados y decodificador de VIN.</p>
<div class="social-links">
@@ -1131,7 +1131,7 @@
</div>
</div>
<div class="footer-bottom">
<p>© 2024 AutoParts DB. Sistema de Catálogo de Autopartes.</p>
<p>© 2026 Nexus Autoparts. Tu conexión directa con las partes que necesitas.</p>
<p>Desarrollado con Flask + SQLite</p>
</div>
</footer>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Diagramas de Suspensión - AutoParts DB</title>
<title>Diagramas - Nexus Autoparts</title>
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🔧</text></svg>">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Orbitron:wght@400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">

View File

@@ -10,7 +10,7 @@ const enhancedSearch = {
debounceMs: 300,
maxResults: 8,
maxRecent: 5,
storageKey: 'autopartes_recent_searches'
storageKey: 'nexus_recent_searches'
},
// State

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Catálogo de Autopartes - AutoParts DB</title>
<title>Catálogo - Nexus Autoparts</title>
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🔧</text></svg>">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Orbitron:wght@400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">

View File

@@ -1,5 +1,5 @@
/**
* nav.js -- Shared navigation component for AutoParts DB
* nav.js -- Shared navigation component for NEXUS AUTOPARTS
*
* Injects a consistent header/nav bar into <div id="shared-nav"></div>.
* Auto-highlights the current page link based on window.location.pathname.
@@ -86,7 +86,7 @@
+ '-webkit-background-clip: text;'
+ '-webkit-text-fill-color: transparent;'
+ 'background-clip: text;'
+ '">AUTOPARTS DB</span>'
+ '">NEXUS AUTOPARTS</span>'
+ '</a>'
// Slot for extra page-specific content (search bars, stats, etc.)
+ '<div id="shared-nav-extra" style="display: contents;"></div>'

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
/* ============================================================
shared.css -- Common styles for all AutoParts DB pages
shared.css -- Common styles for all Nexus Autoparts pages
============================================================ */
/* --- Reset --- */