02Projects
arrow_backAll Projects
build
AI-Enabled E-Commerce

AutoSmart Parts

Auto parts e-commerce with VIN-based fitment verification and AI-powered compatibility recommendations.

The Problem

Auto parts buyers regularly order the wrong parts. Incompatible fitment is the #1 cause of returns in auto e-commerce, costing sellers 20-30% of revenue in restocking and reshipping costs. Standard e-commerce platforms have no native way to verify part-to-vehicle compatibility at browse time.

My Role

Full-stack developer. Built the fitment data model, VIN decoder integration, Elasticsearch indexing strategy, AI recommendation engine, and Stripe checkout flow. Also responsible for the inventory management admin.

Core Features

VIN-Based Fitment Verification

Buyers enter their vehicle's VIN; the system decodes make, model, year, engine, and trim via a NHTSA API integration. Every product page shows a real-time 'Fits your [Vehicle]' or 'Does not fit' badge, with no manual year/make/model selection required.

AI Compatibility Recommendations

An OpenAI-powered agent answers 'Will this fit my car?' questions in plain English, referencing the product's fitment data and the buyer's decoded VIN. Handles edge cases like mid-year model changes and regional variants.

Elasticsearch Full-Text Search

Part number, OEM cross-reference, brand, description, and fitment data are all indexed in Elasticsearch. Fuzzy matching handles typos and partial part numbers, which is critical for a domain where precision matters.

Inventory & Order Management

Django admin-backed inventory system with low-stock alerts, bulk CSV import for parts catalogs, and order fulfillment workflow. Celery handles async tasks like order confirmation emails and stock level recalculations.

Stripe Checkout & Returns

Stripe integration with support for multiple payment methods. Returns workflow generates prepaid labels and initiates refunds via Stripe API. Fitment mismatch returns are flagged for catalog data review.

Tech Stack

Next.jsDjango RESTPostgreSQLElasticsearchStripeOpenAICeleryRedis

Architecture Overview

Next.js frontend communicates with a Django REST Framework API. The fitment data model in PostgreSQL stores vehicle-part compatibility as a normalized many-to-many relation; one part can fit hundreds of vehicles and one vehicle can use thousands of parts. At product indexing time, fitment data is denormalized into Elasticsearch for fast filtered search. The VIN decoder calls the NHTSA vPIC API and caches results in Redis for 30 days. The AI fitment assistant is a lightweight OpenAI function-calling chain that receives structured product and vehicle data as context. Celery + Redis handles async background tasks (email dispatch, index updates, restock alerts).

Impact

Fitment verification at browse time reduced simulated cart abandonment due to compatibility uncertainty by 55% in user testing. AI fitment assistant resolved 80% of 'will this fit?' questions without human support escalation. Elasticsearch fuzzy search improved product discoverability for part numbers with minor variations (e.g., OEM vs. aftermarket cross-references).

What I Learned

Fitment data is messy in the real world: the same part fits slightly different vehicles depending on production date, not just model year. Learned to handle this with date-range fitment records rather than year-only keys. Also learned that Elasticsearch index design matters enormously for automotive search: separate fields for part number (keyword), description (text), and vehicle fitment (nested) require different analyzer strategies.

AutoSmart Parts | Zoraiz Sibtain