How devtres/autofix-hub works
AutoFix Hub is a prototype storefront for automotive and motorcycle parts, with customer browsing, cart, demo checkout, order lookup/history, and an admin area. The main customer flow routes through the React app to browse products, build a cart, save an order in browser storage, and view confirmation or tracking. The README describes a planned Express/MySQL backend and broader admin capabilities, but the sampled checkout and tracking code use browser-local data; no client-to-API calls were shown.
Main entry points: App.jsx Route application · orders.js Order creation and storage · Checkout.jsx Checkout · TrackOrder.jsx Order tracking
Components 25
Storefront
- Route application
client/src/App.jsx - Store layout
client/src/layouts/StoreLayout.jsx - Product catalog
client/src/pages/store/Home.jsx - Product detail
client/src/pages/store/ProductDetail.jsx - Product data
client/src/data/products.js - Product card
client/src/components/store/ProductCard.jsx
Cart and Orders
- Cart and wishlist
client/src/context/CartContext.jsx - Cart drawer
client/src/components/store/CartDrawer.jsx - Checkout
client/src/pages/store/Checkout.jsx - Order creation and storage
client/src/utils/orders.js - Order confirmation
client/src/pages/store/OrderConfirmation.jsx - Order history
client/src/pages/store/OrderHistory.jsx - Order tracking
client/src/pages/store/TrackOrder.jsx - Philippine locations and routes
client/src/utils/philippineLocations.js
Admin
- Admin layout
client/src/layouts/AdminLayout.jsx - Product management demo
client/src/pages/admin/Products.jsx - Admin operations
client/src/pages/admin
Backend and Data
- Express API
server/index.js - MySQL connection pool
server/db.js - Database schema
database/schema.sql - Seed data
database/seed.sql - Views and indexes
database/views_and_indexes.sql
Other components
- Customer
- Admin user
- OpenStreetMap tiles
Connections 34
- Customer → Route application: uses storefront
README.md - Admin user → Route application: uses admin
README.md - Route application → Store layout: routes to
client/src/App.jsx - Route application → Product catalog: routes to
client/src/App.jsx - Route application → Product detail: routes to
client/src/App.jsx - Route application → Checkout: routes to
client/src/App.jsx - Route application → Order confirmation: routes to
client/src/App.jsx - Route application → Order history: routes to
client/src/App.jsx - Route application → Order tracking: routes to
client/src/App.jsx - Route application → Admin layout: routes to
client/src/App.jsx - Route application → Product management demo: routes to
client/src/App.jsx - Route application → Admin operations: routes to
client/src/App.jsx - Product catalog → Product data: reads
client/src/pages/store/Home.jsx - Product catalog → Product card: renders
client/src/pages/store/Home.jsx - Product detail → Product data: reads
client/src/pages/store/ProductDetail.jsx - Product detail → Product card: renders
client/src/pages/store/ProductDetail.jsx - Product card → Cart and wishlist: updates
client/src/components/store/ProductCard.jsx - Store layout → Cart drawer: renders
client/src/layouts/StoreLayout.jsx - Cart drawer → Cart and wishlist: reads and updates
client/src/components/store/CartDrawer.jsx - Checkout → Cart and wishlist: reads and clears
client/src/pages/store/Checkout.jsx - Checkout → Order creation and storage: creates and saves
client/src/pages/store/Checkout.jsx - Checkout → Philippine locations and routes: reads options
client/src/pages/store/Checkout.jsx - Order confirmation → Order creation and storage: reads saved orders
client/src/pages/store/OrderConfirmation.jsx - Order history → Order creation and storage: reads saved orders
client/src/pages/store/OrderHistory.jsx - Order tracking → Order creation and storage: reads saved orders
client/src/pages/store/TrackOrder.jsx - Order tracking → Philippine locations and routes: uses route helper
client/src/pages/store/TrackOrder.jsx - Order creation and storage → Philippine locations and routes: builds delivery route
client/src/utils/orders.js - Order tracking → OpenStreetMap tiles: loads map tiles
client/src/pages/store/TrackOrder.jsx - Product management demo → Admin operations: implements product subset
- Express API → MySQL connection pool: uses pool
server/index.js - Express API → Database schema: uses database
README.md - Database schema → Seed data: initialized with
README.md - Database schema → Views and indexes: extended by
README.md - MySQL connection pool → Database schema: connects to MySQL
README.md