A Next-Generation OEM Automotive Parts E-Commerce Platform & Autonomous AI Store Management System
AutoGenuine is an enterprise-grade, full-stack e-commerce platform and store management suite built specifically for local and nationwide automotive spare parts distributors.
It pairs a high-performance React + Vite customer storefront with a real-time Node.js / Express / MongoDB backend, featuring an AI-powered Store Manager, AutoPilot order verification, 1-Click storewide flash sales, live Socket.IO updates, and Stripe card payments.
- π Year-Make-Model Vehicle Compatibility Finder: Live autocomplete search matching exact vehicle models (e.g. Toyota Camry 2015β2020, Suzuki Alto 660cc).
- π·οΈ Strikethrough Promotional Pricing: High-visibility MSRP cutoff pricing (
~Rs 25,000~Rs 21,250) with animated discount badges (-15% OFF). - π Multi-Currency & Regional Localization: Real-time price formatting supporting PKR (
Rs), USD ($), and multi-regional currencies. - π Interactive Cart & Checkout: Floating cart drawer with live stock validation, itemized discount summaries, and instant checkout.
- π³ Stripe Payment Gateway: Secure 3D-Secure credit/debit card checkout via Stripe PaymentIntents & Webhooks.
- π΅ Local Payment Support: Cash on Delivery (COD), Direct Bank Transfers, EasyPaisa, and JazzCash workflows.
- π§Ύ Instant PDF Invoicing & Receipts: Automated vector PDF generation for invoices, order slips, and executive summaries.
- π€ Autonomous Customer Concierge: Google Gemini AI assistant providing 24/7 technical compatibility support in English & Urdu.
- π Executive AI Store Manager: Virtual COO for store ownersβanalyzes inventory, detects low stock, and suggests price updates via 1-tap [Approve] / [Reject] proposal cards.
- β‘ AutoPilot Away Mode: Autonomous order verification and dispatch alerts for pending orders when staff are offline.
- π Live Socket.IO Broadcasts: Real-time sound chimes and header alerts when customers place orders or request live chat support.
- π₯ 1-Click Storewide Flash Sale Manager: Store owners can launch or clear storewide promotional sales (10%, 12%, 15%, 20% OFF) with a single click.
- π₯ Role-Based Access Control (RBAC): Tiered permissions for Primary Owner, Admins, and Customers.
- Framework: React 18 (Vite 8 SPA)
- Styling: Tailwind CSS + Vanilla CSS Transitions
- Icons: Lucide React
- Real-Time: Socket.io Client
- PDF Generation: jsPDF + autoTable
- Runtime: Node.js (ES Modules)
- Web Framework: Express.js
- Database: MongoDB + Mongoose ODM
- Real-Time Engine: Socket.IO
- AI Integration: Google Gemini API (
@google/genai) - Payments: Stripe Node SDK (
stripe) - Email Dispatch: Nodemailer (SMTP Gmail Integration)
- Node.js v18.0 or higher
- MongoDB Atlas cluster URI or local MongoDB instance
git clone https://github.com/sammemon/AutoGenuine.git
cd AutoGenuineInstall both root frontend and server dependencies:
# Install frontend dependencies
npm install
# Install backend server dependencies
cd server
npm install
cd ..Create a .env file inside the server/ directory:
cp server/.env.example server/.envConfigure your credentials inside server/.env:
MONGODB_URI=mongodb+srv://<user>:<password>@<cluster>.mongodb.net/?appName=Cluster0
JWT_SECRET=your_jwt_secret_key
PORT=5000
FRONTEND_URL=http://localhost:5173
# Staff Account Seeding Credentials
OWNER_NAME=Store Owner
OWNER_EMAIL=owner@example.com
OWNER_PASSWORD=your_owner_password
ADMIN_NAME=Store Admin
ADMIN_EMAIL=admin@example.com
ADMIN_PASSWORD=your_admin_password
# Stripe Credentials
STRIPE_SECRET_KEY=your_stripe_secret_key
STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key
# Google Gemini AI
GEMINI_API_KEY=your_gemini_api_key
GEMINI_MODEL=gemini-3.5-flash
# SMTP Email
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your_email@example.com
SMTP_PASS="your_app_password"
EMAIL_FROM="AutoGenuine Parts <no-reply@example.com>"cd server
npm run seed
cd ..Start both backend API server and frontend SPA concurrently:
# Terminal 1: Backend API Server (Port 5000)
cd server
npm run dev
# Terminal 2: Frontend Vite App (Port 5173)
npm run devOpen your browser at http://localhost:5173.
AutoGenuine/
βββ public/ # Static assets & OEM category images
βββ src/ # React Frontend Source
β βββ auth/ # RBAC permissions logic
β βββ components/ # Reusable UI components & modals
β β βββ chat/ # Support chat workspace components
β β βββ dashboard/ # Owner & Admin panel sections
β βββ context/ # Multi-Context state providers
β βββ data/ # Initial fallback catalogues
β βββ pages/ # Route views (Home, Category, Dashboard)
β βββ services/ # Frontend API client
β βββ utils/ # Invoice PDF & Auth utilities
βββ server/ # Express Node.js Backend Source
β βββ config/ # DB connection configuration
β βββ controllers/ # Business logic controllers
β βββ middleware/ # Express Auth, Upload & Logger middleware
β βββ models/ # Mongoose schemas (Users, Orders, Parts)
β βββ routes/ # Express REST API routes
β βββ services/ # Gemini AI, Stripe, Email & Notification services
β βββ seed.js # Database seed script
β βββ server.js # Express app entry point
βββ .gitignore # Git exclusion rules
βββ package.json # Root package configuration
βββ tailwind.config.js # Tailwind CSS theme configuration
βββ vite.config.js # Vite build configuration
| Domain | Route | Method | Description | Access |
|---|---|---|---|---|
| Auth | /api/auth/login |
POST |
User & Staff authentication | Public |
| Auth | /api/auth/register |
POST |
Customer registration | Public |
| Catalog | /api/catalog/parts |
GET |
List OEM parts with compatibility filter | Public |
| Catalog | /api/catalog/categories |
GET |
List catalog categories | Public |
| Orders | /api/orders |
POST |
Place a new parts order | Authenticated |
| Orders | /api/orders/track/:ref |
GET |
Live public order tracking | Public |
| Payments | /api/payments/create-intent |
POST |
Generate Stripe PaymentIntent | Authenticated |
| Chat | /api/chat/support/message |
POST |
Send message to AI Support Concierge | Authenticated |
| Admin | /api/admin/orders |
GET |
Staff order management | Admin/Owner |
| Admin | /api/admin/promotions/apply-campaign |
POST |
1-Click Storewide Flash Sale launch | Admin/Owner |
| AI Manager | /api/admin/ai-manager/chat |
POST |
Executive AI Store Manager workspace | Owner Only |
- Protected Secrets:
.envsecret files are strictly excluded from version control. - Password Security: Salted
bcryptjspassword hashing (10 rounds). - Session Security: Stateless JWT authentication tokens.
- Payment Compliance: Stripe hosted & PaymentIntent elements ensuring zero PCI data touches local servers.
This project is licensed under the MIT License β see the LICENSE file for details.
Developed with β€οΈ by sammemon.