AutoPart Pro is a full-stack web application built specifically for automotive parts retailers who need a single platform to manage their inventory, track sales, and serve customers through an integrated e-commerce experience. Rather than juggling spreadsheets for stock levels, a separate point-of-sale system, and a disconnected online storefront, AutoPart Pro unifies all three into one cohesive solution — with role-based access control ensuring every user sees exactly what they need and nothing more.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/JFKoryy/autopart-pro/llms.txt
Use this file to discover all available pages before exploring further.
Tech Stack
AutoPart Pro is built on a modern, production-proven stack chosen for reliability and developer ergonomics:| Layer | Technology |
|---|---|
| Backend runtime | Node.js 18+ |
| API framework | Express ^5.2.1 |
| Database | MySQL 8 (mysql2 ^3.22.5) |
| Authentication | jsonwebtoken ^9.0.3 + bcryptjs ^3.0.3 |
| Frontend framework | React ^19.0.0 |
| Build tool | Vite ^6.4.3 |
| Styling | Tailwind CSS ^4.0.0 |
| Routing | React Router DOM ^7.1.1 |
Key Features
AutoPart Pro ships with everything a growing auto parts shop needs on day one:- JWT authentication with roles — Every request to a protected endpoint is validated against a signed JWT. Three roles (
admin,employee,client) govern what each user can see and do. - Full product CRUD with SKU tracking — Create, read, update, and delete products. Each product carries a unique SKU, brand, compatible vehicle list, price, stock count, category, description, and an optional image URL.
- Configurable minimum stock alerts — Each product has a
min_stockthreshold. When stock falls to or below that threshold, the server emits alow-stockevent via Node’s built-inEventEmitter, surfacing a console alert immediately. - Shopping cart and checkout — Clients browse products, add items to a persistent cart, and complete a checkout that records a real sale and automatically deducts stock from inventory.
- Sales history with line-item detail — Every completed sale is stored with its associated
sale_items, giving admins and employees a full breakdown of what was sold, at what price, and by whom. - Admin panel for user and role management — Administrators can view all registered users, assign roles, and maintain the workforce without touching the database directly.
- Role-differentiated dashboards — Admins see full inventory controls and sales analytics; employees see inventory and sales workflows; clients see the storefront and their order history.
Architecture Overview
AutoPart Pro follows a classic decoupled REST API + React SPA architecture:config/ handles the MySQL connection pool, models/ contain raw SQL queries, controllers/ hold business logic, middleware/ enforces authentication and role guards, routes/ wire HTTP verbs to controllers, and events/ holds the stock-alert EventEmitter. The frontend mirrors this separation: context/ manages global auth and cart state, services/ wrap all API calls, pages/ compose full views, and components/ provide reusable UI building blocks.
User Roles
Access in AutoPart Pro is governed by three roles stored in theusers table:
| Role | Capabilities |
|---|---|
admin | Full access — inventory CRUD, user management, sales history, admin panel |
employee | Inventory management, sales processing, and order history; no user administration |
client | Storefront browsing, cart, checkout, and personal order history |
Explore the Docs
Quickstart
Clone the repo, seed the database, and have both servers running in under 10 minutes.
Architecture Overview
A deeper look at the MVC backend structure, React context patterns, and data flow.
Inventory Management
Product CRUD, SKU management, stock thresholds, and low-stock alert events.
API Reference
Complete endpoint reference for auth, products, sales, and users.